From 77ef259ea84b3699b505952d3690797ec40bc27f Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 17 Jan 2025 16:06:09 -0800 Subject: [PATCH] fix(wm): handle minimize event edge case This commit handles an edge case where minimize events would not be processed if both transparency and animations were enabled at the same time. fix #1231 --- komorebi/src/process_event.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/komorebi/src/process_event.rs b/komorebi/src/process_event.rs index d7e74b5d..a539298e 100644 --- a/komorebi/src/process_event.rs +++ b/komorebi/src/process_event.rs @@ -93,8 +93,18 @@ impl WindowManager { .map(|w| w.hwnd) .collect::>(); - if w.contains_managed_window(event_hwnd) - && !visible_hwnds.contains(&event_hwnd) + let contains_managed_window = w.contains_managed_window(event_hwnd); + + // this is for an old stackbar clicking fix + if contains_managed_window && !visible_hwnds.contains(&event_hwnd) { + transparency_override = true; + } + + // but we always want to handle a minimize event when transparency overrides + // are applied + if !transparency_override + && contains_managed_window + && matches!(event, WindowManagerEvent::Minimize(_, _)) { transparency_override = true; }