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/window/mapped.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/window/mapped.rs') diff --git a/src/window/mapped.rs b/src/window/mapped.rs index 4b31da22..bdb62df8 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -49,6 +49,9 @@ pub struct Mapped { /// Whether this window has the keyboard focus. is_focused: bool, + /// Whether this window is the active window in its column. + pub is_active_in_column: bool, + /// Buffer to draw instead of the window when it should be blocked out. block_out_buffer: RefCell, @@ -102,6 +105,7 @@ impl Mapped { rules, need_to_recompute_rules: false, is_focused: false, + is_active_in_column: false, block_out_buffer: RefCell::new(SolidColorBuffer::new((0, 0), [0., 0., 0., 1.])), animate_next_configure: false, animate_serials: Vec::new(), @@ -458,6 +462,12 @@ impl LayoutElement for Mapped { self.need_to_recompute_rules |= changed; } + fn set_active_in_column(&mut self, active: bool) { + let changed = self.is_active_in_column != active; + self.is_active_in_column = active; + self.need_to_recompute_rules |= changed; + } + fn set_bounds(&self, bounds: Size) { self.toplevel().with_pending_state(|state| { state.bounds = Some(bounds); -- cgit