mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 09:05:57 -05:00
Add ability to use regex for executable switching
Previously, only exact matches to a window title would switch scenes
This commit is contained in:
@@ -295,10 +295,7 @@ bool isInFocus(const QString &exeToCheck)
|
||||
string curWindow;
|
||||
GetCurrentWindowTitle(curWindow);
|
||||
|
||||
return (QString::compare(
|
||||
QString::fromStdString(curWindow),
|
||||
exeToCheck,
|
||||
Qt::CaseInsensitive) == 0) ? true : false;
|
||||
return QString::fromStdString(curWindow).contains(QRegularExpression(exeToCheck));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user