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
This commit is contained in:
LGUG2Z
2021-10-18 13:43:58 -07:00
parent 6f6181625f
commit d3cb9e07f7

View File

@@ -120,10 +120,10 @@ impl WindowManager {
// they are not on the top of a container stack. // they are not on the top of a container stack.
let programmatically_hidden_hwnds = HIDDEN_HWNDS.lock(); 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.exe()?))
|| tray_and_multi_window_identifiers.contains(&window.class()?) || tray_and_multi_window_identifiers.contains(&window.class()?))
&& !programmatically_hidden_hwnds.contains(&window.hwnd) && !programmatically_hidden_hwnds.contains(&window.hwnd)
{ {
hide = true; hide = true;
} }