Ver Fonte

UI: Remove Apple deferred tray load

With the change to how initial startup minimizing-to-tray works,
we can remove the Apple-specific workaround.
Cody Jung há 3 anos atrás
pai
commit
fab293a686
2 ficheiros alterados com 0 adições e 23 exclusões
  1. 0 21
      UI/window-basic-main.cpp
  2. 0 2
      UI/window-basic-main.hpp

+ 0 - 21
UI/window-basic-main.cpp

@@ -1981,9 +1981,7 @@ void OBSBasic::OBSInit()
 	ui->lockUI->setChecked(docksLocked);
 	ui->lockUI->blockSignals(false);
 
-#ifndef __APPLE__
 	SystemTray(true);
-#endif
 
 #if defined(_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
 	taskBtn->setWindow(windowHandle());
@@ -2059,11 +2057,6 @@ void OBSBasic::OBSInit()
 	OnFirstLoad();
 
 	activateWindow();
-
-#ifdef __APPLE__
-	QMetaObject::invokeMethod(this, "DeferredSysTrayLoad",
-				  Qt::QueuedConnection, Q_ARG(int, 10));
-#endif
 }
 
 void OBSBasic::OnFirstLoad()
@@ -2092,20 +2085,6 @@ void OBSBasic::OnFirstLoad()
 		on_actionViewCurrentLog_triggered();
 }
 
-void OBSBasic::DeferredSysTrayLoad(int requeueCount)
-{
-	if (--requeueCount > 0) {
-		QMetaObject::invokeMethod(this, "DeferredSysTrayLoad",
-					  Qt::QueuedConnection,
-					  Q_ARG(int, requeueCount));
-		return;
-	}
-
-	/* Minimizng to tray on initial startup does not work on mac
-	 * unless it is done in the deferred load */
-	SystemTray(true);
-}
-
 /* shows a "what's new" page on startup of new versions using CEF */
 void OBSBasic::ReceivedIntroJson(const QString &text)
 {

+ 0 - 2
UI/window-basic-main.hpp

@@ -1118,8 +1118,6 @@ private slots:
 	void OpenMultiviewWindow();
 	void OpenSceneWindow();
 
-	void DeferredSysTrayLoad(int requeueCount);
-
 	void StackedMixerAreaContextMenuRequested();
 
 	void ResizeOutputSizeOfSource();