Add ability to use regex for executable switching

Previously, only exact matches to a window title would switch scenes
This commit is contained in:
Myned
2020-05-14 18:49:35 -04:00
parent 228a18eb77
commit b45b38cf6a
2 changed files with 2 additions and 5 deletions

View File

@@ -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));
}