Skip to content

Commit

Permalink
fix(wm): handle minimize event edge case
Browse files Browse the repository at this point in the history
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
  • Loading branch information
LGUG2Z committed Jan 18, 2025
1 parent 392e4cc commit 77ef259
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions komorebi/src/process_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,18 @@ impl WindowManager {
.map(|w| w.hwnd)
.collect::<Vec<_>>();

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;
}
Expand Down

0 comments on commit 77ef259

Please sign in to comment.