From 5334e1944e224e3e15fb6a86ae659e403ff3f73f Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 13 Apr 2024 12:02:44 -0700 Subject: [PATCH] fix(wm): ensure stackbar tab clicks trigger This commit fixes a small regression that prevented events emitted from clicks on stackbar tabs from being handled. --- komorebi/src/process_event.rs | 9 ++++++++- komorebi/src/window.rs | 4 ---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/komorebi/src/process_event.rs b/komorebi/src/process_event.rs index 63be96c2..1c261555 100644 --- a/komorebi/src/process_event.rs +++ b/komorebi/src/process_event.rs @@ -91,7 +91,14 @@ impl WindowManager { // All event handlers below this point should only be processed if the event is // related to a window that should be managed by the WindowManager. - if !should_manage { + if !should_manage + && !matches!( + event, + WindowManagerEvent::DisplayChange(_) + | WindowManagerEvent::ForceUpdate(_) + | WindowManagerEvent::FocusChange(_, _) + ) + { return Ok(()); } diff --git a/komorebi/src/window.rs b/komorebi/src/window.rs index c18317b5..019aa0c5 100644 --- a/komorebi/src/window.rs +++ b/komorebi/src/window.rs @@ -372,10 +372,6 @@ impl Window { #[tracing::instrument(fields(exe, title))] pub fn should_manage(self, event: Option) -> Result { - if let Some(WindowManagerEvent::DisplayChange(_)) = event { - return Ok(true); - } - #[allow(clippy::question_mark)] if self.title().is_err() { return Ok(false);