From 4869167f5c3161a3930d5f10b1778d1b53f97d0c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 3 Sep 2020 05:27:37 -0700 Subject: [PATCH] UI: Do not show tray icon if not active Because the virtual camera stops immediately when you call obs_output_stop() rather than with a delay like other outputs, it exposed a bug where the tray icon would show OBS as active when stopping the source, regardless of the fact that it was stopped. The bug was that the expression used to activate the tray icon did not check to make sure that the output was actually active, so add that to the expression. --- UI/window-basic-main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 1274f8f92..02dbc419f 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -5589,7 +5589,8 @@ inline void OBSBasic::OnDeactivate() if (trayIcon && trayIcon->isVisible()) trayIcon->setIcon(QIcon::fromTheme( "obs-tray", QIcon(":/res/images/obs.png"))); - } else if (trayIcon && trayIcon->isVisible()) { + } else if (outputHandler->Active() && trayIcon && + trayIcon->isVisible()) { if (os_atomic_load_bool(&recording_paused)) trayIcon->setIcon(QIcon(":/res/images/obs_paused.png")); else -- GitLab