mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-30 05:06:14 -05:00
Add direct matching to window, executable, and ignored switches
Reverts part of commit 5f87a61177
Direct matching occurs in the same loop as regex in order to allow the list order to function as indicated in the UI
This commit is contained in:
@@ -295,7 +295,12 @@ bool isInFocus(const QString &exeToCheck)
|
||||
string curWindow;
|
||||
GetCurrentWindowTitle(curWindow);
|
||||
|
||||
return QString::fromStdString(curWindow).contains(QRegularExpression(exeToCheck));
|
||||
// True if executable switch equals current window
|
||||
bool equals = (exeToCheck.toStdString() == curWindow);
|
||||
// True if executable switch matches current window
|
||||
bool matches = QString::fromStdString(curWindow).contains(QRegularExpression(exeToCheck));
|
||||
|
||||
return (equals || matches);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user