mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Fix ignored switches not directly matching last window
This commit is contained in:
parent
c9f1f9624b
commit
66d847c047
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user