summaryrefslogtreecommitdiff
path: root/src/Window.hpp
diff options
context:
space:
mode:
authormemchr <118117622+memchr@users.noreply.github.com>2023-06-09 21:44:18 +0000
committerGitHub <noreply@github.com>2023-06-09 23:44:18 +0200
commitbca3068db224d76b2da3f792efe4d0cb8cd2fe3e (patch)
treead65b8486745efa24faca33dfe2ecaadd5451937 /src/Window.hpp
parentcf37922d4285689990a648bc02aecb90a07a36ba (diff)
feat: add lockactivegroup dispatcher (#2478)
* feat: add lockactivegroup dispatcher The `lockactivewindow` dispatcher takes `lock`, `toggle` or `unlock` as arguments. When a group is locked, no window or group can be added to it, nor can it be added to another group, but the `moveintogroup` and `moveoutofgroup` dispatches are not affected. Implementation details: the lock is implement via `SGroupData.locked` flag (defaults to false). The flag is only relevant to the group head, and upon the group head's succession, the flag will be passed down to the new head. Meanwhile, the old head's flag will be set to false. The flag is set to false when a group is dismissed. New condition checks have been added to the dwindle and master layout to check if target group is unlocked (and if the source is also a group and unlocked) before adding windows to the target group. * refactor: `lockactivegroup dispatcher code ordering
Diffstat (limited to 'src/Window.hpp')
-rw-r--r--src/Window.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Window.hpp b/src/Window.hpp
index c1a36d21..437b4a40 100644
--- a/src/Window.hpp
+++ b/src/Window.hpp
@@ -288,6 +288,7 @@ class CWindow {
struct SGroupData {
CWindow* pNextWindow = nullptr; // nullptr means no grouping. Self means single group.
bool head = false;
+ bool locked = false;
} m_sGroupData;
// For the list lookup