From 47a8e75fd585e351dd2846a58152a7766403ca11 Mon Sep 17 00:00:00 2001 From: TheZoq2 Date: Mon, 22 Apr 2024 22:51:52 +0200 Subject: Add is_active_in_column Add missing ``` Fix tests --- src/layout/mod.rs | 3 +++ src/layout/workspace.rs | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/layout') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 75f6cd4c..0cb8e493 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -152,6 +152,7 @@ pub trait LayoutElement { fn output_leave(&self, output: &Output); fn set_offscreen_element_id(&self, id: Option); fn set_activated(&mut self, active: bool); + fn set_active_in_column(&mut self, active: bool); fn set_bounds(&self, bounds: Size); fn send_pending_configure(&mut self); @@ -2190,6 +2191,8 @@ mod tests { fn send_pending_configure(&mut self) {} + fn set_active_in_column(&mut self, _active: bool) {} + fn is_fullscreen(&self) -> bool { false } diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 3dbb473b..b2d1d5a2 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -2459,9 +2459,11 @@ impl Workspace { for (tile_idx, tile) in col.tiles.iter_mut().enumerate() { let win = tile.window_mut(); - let active = is_active - && self.active_column_idx == col_idx - && col.active_tile_idx == tile_idx; + + let active_in_column = col.active_tile_idx == tile_idx; + win.set_active_in_column(active_in_column); + + let active = is_active && self.active_column_idx == col_idx && active_in_column; win.set_activated(active); win.set_interactive_resize(col_resize_data); -- cgit