summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 30585502..b2af4eea 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -396,6 +396,13 @@ void CConfigManager::loadConfigLoadVars() {
g_pHyprError->queueCreate("Warning: You're using an autogenerated config! (config file: " + CONFIGPATH + " )\nSUPER+Enter -> kitty\nSUPER+T -> Alacritty\nSUPER+M -> exit Hyprland", CColor(255, 255, 70, 255));
else
g_pHyprError->destroy();
+
+ // Set the modes for all monitors as we configured them
+ // not on first launch because monitors might not exist yet
+ // and they'll be taken care of in the newMonitor event
+ if (!isFirstLaunch) {
+ m_bWantsMonitorReload = true;
+ }
}
void CConfigManager::tick() {
@@ -526,4 +533,13 @@ void CConfigManager::dispatchExecOnce() {
}
firstExecRequests.clear(); // free some kb of memory :P
+}
+
+void CConfigManager::performMonitorReload() {
+ for (auto& m : g_pCompositor->m_lMonitors) {
+ auto rule = getMonitorRuleFor(m.szName);
+ g_pHyprRenderer->applyMonitorRule(&m, &rule);
+ }
+
+ m_bWantsMonitorReload = false;
} \ No newline at end of file