Fix exec-once being wack on launch

This commit is contained in:
vaxerski
2022-04-12 20:02:57 +02:00
parent 4bd23604f8
commit 17f63bf3e8
3 changed files with 22 additions and 1 deletions

View File

@@ -263,7 +263,7 @@ void CConfigManager::parseLine(std::string& line) {
return;
} else if (COMMAND == "exec-once") {
if (isFirstLaunch) {
handleRawExec(COMMAND, VALUE);
firstExecRequests.push_back(VALUE);
}
return;
} else if (COMMAND == "monitor") {
@@ -478,4 +478,17 @@ std::vector<SWindowRule> CConfigManager::getMatchingRules(CWindow* pWindow) {
}
return returns;
}
void CConfigManager::dispatchExecOnce() {
if (firstExecDispatched || isFirstLaunch)
return;
firstExecDispatched = true;
for (auto& c : firstExecRequests) {
handleRawExec("", c);
}
firstExecRequests.clear(); // free some kb of memory :P
}