Enable getting variable values from window condition

This commit is contained in:
WarmUpTill
2023-01-14 19:24:36 +01:00
committed by WarmUpTill
parent b12c25fdf4
commit 1c3ff927a5
2 changed files with 4 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ bool MacroConditionWindow::CheckWindowTitleSwitchRegex(
break;
}
}
return match;
}
@@ -56,11 +57,12 @@ bool foregroundWindowChanged()
bool MacroConditionWindow::CheckCondition()
{
const std::string &currentWindowTitle = switcher->currentTitle;
SetVariableValue(currentWindowTitle);
std::vector<std::string> windowList;
GetWindowList(windowList);
bool match = false;
if (std::find(windowList.begin(), windowList.end(), _window) !=
windowList.end()) {
match = CheckWindowTitleSwitchDirect(currentWindowTitle);
@@ -69,7 +71,6 @@ bool MacroConditionWindow::CheckCondition()
windowList);
}
match = match && (!_windowFocusChanged || foregroundWindowChanged());
return match;
}