summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
authorItsOhen <TNordfeldt@gmail.com>2026-01-27 13:13:29 +0100
committerGitHub <noreply@github.com>2026-01-27 12:13:29 +0000
commitbcb34275eaaa3b3eb2dd479b582a3b47bcc4b305 (patch)
tree49407c2efacbc63ae979b40781f4c2fd44e69b8e /src/debug
parent21325f93855e7053f562c722247eb3e1c62581e6 (diff)
hyprctl: fix layerrules not being applied dynamically with hyprctl (#13080)
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/HyprCtl.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index c2237afd..8dbe3a1d 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -1296,8 +1296,13 @@ static std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in)
g_pHyprCtl->m_currentRequestParams.isDynamicKeyword = false;
+ if (COMMAND == "source") {
+ g_pConfigManager->m_wantsMonitorReload = true;
+ g_pEventLoopManager->doLater([] { g_pConfigManager->reloadRules(); });
+ }
+
// if we are executing a dynamic source we have to reload everything, so every if will have a check for source.
- if (COMMAND == "monitor" || COMMAND == "source")
+ if (COMMAND == "monitor")
g_pConfigManager->m_wantsMonitorReload = true; // for monitor keywords
if (COMMAND.contains("monitorv2"))
@@ -1340,6 +1345,14 @@ static std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in)
if (COMMAND.contains("windowrule ") || COMMAND.contains("windowrule["))
g_pConfigManager->reloadRules();
+ if (COMMAND.contains("layerrule") || COMMAND.contains("layerrule[")) {
+ g_pConfigManager->reloadRules();
+ // Damage all monitors to redraw static layers.
+ for (auto const& m : g_pCompositor->m_monitors) {
+ g_pHyprRenderer->damageMonitor(m);
+ }
+ }
+
if (COMMAND.contains("workspace"))
g_pConfigManager->ensurePersistentWorkspacesPresent();