summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-12 20:02:57 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-12 20:02:57 +0200
commit17f63bf3e8abf339279a0c0d6df3b618c172476b (patch)
treef6f26875910bf3a10aaf1abfc68eb8ddac2accc7 /src/config/ConfigManager.cpp
parent4bd23604f88708718df0f5e5971b2d1169e13e9b (diff)
Fix exec-once being wack on launch
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 97dae134..6d37c97b 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -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
} \ No newline at end of file