summaryrefslogtreecommitdiff
path: root/src/desktop/rule/windowRule/WindowRule.cpp
diff options
context:
space:
mode:
authorNikolai Nechaev <nikolay_nechaev@mail.ru>2025-11-26 07:44:26 +0900
committerGitHub <noreply@github.com>2025-11-25 22:44:26 +0000
commit40d8fa84919c6d0e9fcb1536f4bc09710d4c031c (patch)
treee45044c92e5d8f716f2aa15668c61fed5aaf5895 /src/desktop/rule/windowRule/WindowRule.cpp
parent1c1746de61a90dbbae072f3fc618c45af33fdd59 (diff)
compositor: Configurable behavior when window to be focused conflicts with fullscreen (#12033)
Renames `misc:new_window_takes_over_fullscreen` into `misc:on_focus_under_fullscreen` and implements the following behavior: - By default, when a tiling window is being focused on a workspace where a fullscreen/maximized window exists, respect the `misc:on_focus_under_fullscreen` config variable.
Diffstat (limited to 'src/desktop/rule/windowRule/WindowRule.cpp')
-rw-r--r--src/desktop/rule/windowRule/WindowRule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/desktop/rule/windowRule/WindowRule.cpp b/src/desktop/rule/windowRule/WindowRule.cpp
index 6a6878d2..893243b0 100644
--- a/src/desktop/rule/windowRule/WindowRule.cpp
+++ b/src/desktop/rule/windowRule/WindowRule.cpp
@@ -3,6 +3,7 @@
#include "../../../helpers/Monitor.hpp"
#include "../../../Compositor.hpp"
#include "../../../managers/TokenManager.hpp"
+#include "../../../desktop/state/FocusState.hpp"
using namespace Desktop;
using namespace Desktop::Rule;
@@ -72,7 +73,7 @@ bool CWindowRule::matches(PHLWINDOW w, bool allowEnvLookup) {
return false;
break;
case RULE_PROP_FOCUS:
- if (!engine->match(g_pCompositor->m_lastWindow == w))
+ if (!engine->match(Desktop::focusState()->window() == w))
return false;
break;
case RULE_PROP_GROUP: