Skip to content

Commit

Permalink
Set is-active-in-column to true for unmapped windows (#934)
Browse files Browse the repository at this point in the history
* Set is-active-in-column to true for unmapped windows

* Update wiki/Configuration:-Window-Rules.md

---------

Co-authored-by: Ivan Molodetskikh <[email protected]>
  • Loading branch information
TheZoq2 and YaLTeR authored Jan 5, 2025
1 parent 098c826 commit 89678c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/window/mapped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
Expand Down
2 changes: 2 additions & 0 deletions wiki/Configuration:-Window-Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<sup>Since: next release</sup> This rule will match `true` during the initial window opening.

```kdl
window-rule {
match is-active-in-column=true
Expand Down

0 comments on commit 89678c7

Please sign in to comment.