소스 검색

UI: Fix preview state when minimizing to tray

Makes sure preview is properly enabled/disabled when minimizing to tray,
when restoring from tray, or when starting the program up minimized to
tray
jp9000 5 년 전
부모
커밋
dff05d9fcc
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      UI/window-basic-main.cpp

+ 3 - 1
UI/window-basic-main.cpp

@@ -7180,8 +7180,10 @@ void OBSBasic::IconActivated(QSystemTrayIcon::ActivationReason reason)
 	AddProjectorMenuMonitors(studioProgramProjector, this,
 				 SLOT(OpenStudioProgramProjector()));
 
-	if (reason == QSystemTrayIcon::Trigger)
+	if (reason == QSystemTrayIcon::Trigger) {
+		EnablePreviewDisplay(previewEnabled && !isVisible());
 		ToggleShowHide();
+	}
 }
 
 void OBSBasic::SysTrayNotify(const QString &text,