diff --git a/src/executable-switch.cpp b/src/executable-switch.cpp index 05fef095..512be7f3 100644 --- a/src/executable-switch.cpp +++ b/src/executable-switch.cpp @@ -178,10 +178,11 @@ void SwitcherData::checkExeSwitch(bool &match, OBSWeakSource &scene, QRegularExpression(s.mExe)) != -1); // True if focus is disabled OR switch is focused bool focus = (!s.mInFocus || isInFocus(s.mExe)); - // True if current window is ignored AND switch matches last window + // True if current window is ignored AND switch equals OR matches last window bool ignore = - (ignored && QString::fromStdString(title).contains( - QRegularExpression(s.mExe))); + (ignored && (title == s.mExe || + QString::fromStdString(title).contains( + QRegularExpression(s.mExe)))); if ((equals || matches) && (focus || ignore)) { match = true; diff --git a/src/window-title-switch.cpp b/src/window-title-switch.cpp index d31e6f80..f3baf143 100644 --- a/src/window-title-switch.cpp +++ b/src/window-title-switch.cpp @@ -294,12 +294,13 @@ void SwitcherData::checkWindowTitleSwitch(bool &match, OBSWeakSource &scene, bool fullscreen = (!s.fullscreen || isFullscreen(s.window)); // True if focus is disabled OR switch is focused bool focus = (!s.focus || isFocused(s.window)); - // True if current window is ignored AND switch matches last window + // True if current window is ignored AND switch equals OR matches last window bool ignore = (ignored && - QString::fromStdString(title).contains( - QRegularExpression( - QString::fromStdString(s.window)))); + (title == s.window || + QString::fromStdString(title).contains( + QRegularExpression( + QString::fromStdString(s.window))))); if (isRunning(s.window) && (fullscreen && (focus || ignore))) { match = true;