From 89678c7b1e6ebe6ec5411db5a2b99bd6bea63565 Mon Sep 17 00:00:00 2001 From: Frans Skarman Date: Sun, 5 Jan 2025 10:38:26 +0000 Subject: [PATCH] Set is-active-in-column to true for unmapped windows (#934) * Set is-active-in-column to true for unmapped windows * Update wiki/Configuration:-Window-Rules.md --------- Co-authored-by: Ivan Molodetskikh --- src/window/mapped.rs | 2 +- src/window/mod.rs | 2 +- wiki/Configuration:-Window-Rules.md | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/window/mapped.rs b/src/window/mapped.rs index 4088bb82e..207140c4c 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -165,7 +165,7 @@ impl Mapped { rules, need_to_recompute_rules: false, is_focused: false, - is_active_in_column: false, + is_active_in_column: true, is_floating: false, block_out_buffer: RefCell::new(SolidColorBuffer::new((0., 0.), [0., 0., 0., 1.])), animate_next_configure: false, diff --git a/src/window/mod.rs b/src/window/mod.rs index 868620f04..c8345aa88 100644 --- a/src/window/mod.rs +++ b/src/window/mod.rs @@ -116,7 +116,7 @@ impl<'a> WindowRef<'a> { pub fn is_active_in_column(self) -> bool { match self { - WindowRef::Unmapped(_) => false, + WindowRef::Unmapped(_) => true, WindowRef::Mapped(mapped) => mapped.is_active_in_column(), } } diff --git a/wiki/Configuration:-Window-Rules.md b/wiki/Configuration:-Window-Rules.md index 131dfac83..fac69a136 100644 --- a/wiki/Configuration:-Window-Rules.md +++ b/wiki/Configuration:-Window-Rules.md @@ -194,6 +194,8 @@ Matches the window that is the "active" window in its column. Contrary to `is-active`, there is always one `is-active-in-column` window in each column. It is the window that was last focused in the column, i.e. the one that will gain focus if this column is focused. +Since: next release This rule will match `true` during the initial window opening. + ```kdl window-rule { match is-active-in-column=true