From d3cb9e07f7fc0a7b03774c90b2c6bdba5920a836 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Mon, 18 Oct 2021 13:43:58 -0700 Subject: [PATCH] fix(wm): keep multi-window app hwnds when stacking This commit fixes a boolean logic error with an extra pair of parens to ensure that apps like Firefox don't end up with their HWNDs reaped by Workspace.remove_window() when another window is stocked on top of them. fix #51 --- komorebi/src/process_event.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/komorebi/src/process_event.rs b/komorebi/src/process_event.rs index 4d6c9ad2..5357f6b1 100644 --- a/komorebi/src/process_event.rs +++ b/komorebi/src/process_event.rs @@ -120,10 +120,10 @@ impl WindowManager { // they are not on the top of a container stack. let programmatically_hidden_hwnds = HIDDEN_HWNDS.lock(); - if (!window.is_window() + if ((!window.is_window() || tray_and_multi_window_identifiers.contains(&window.exe()?)) - || tray_and_multi_window_identifiers.contains(&window.class()?) - && !programmatically_hidden_hwnds.contains(&window.hwnd) + || tray_and_multi_window_identifiers.contains(&window.class()?)) + && !programmatically_hidden_hwnds.contains(&window.hwnd) { hide = true; }