From 80b611890aaaee09b9ce0d54d1d5bea0fe219011 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 1 Feb 2025 00:15:04 -0800 Subject: [PATCH] fix(reaper): reap invisible "visible" windows Another day, another stupid hack because Microsoft Office developers are morons. --- komorebi/src/workspace.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/komorebi/src/workspace.rs b/komorebi/src/workspace.rs index e2dd2c9b..2df2e323 100644 --- a/komorebi/src/workspace.rs +++ b/komorebi/src/workspace.rs @@ -490,7 +490,15 @@ impl Workspace { } for window in self.visible_windows().into_iter().flatten() { - if !window.is_window() { + if !window.is_window() + // This one is a hack because WINWORD.EXE is an absolute trainwreck of an app + // when multiple docs are open, it keeps open an invisible window, with WS_EX_LAYERED + // (A STYLE THAT THE REGULAR WINDOWS NEED IN ORDER TO BE MANAGED!) when one of the + // docs is closed + // + // I hate every single person who worked on Microsoft Office 365, especially Word + || !window.is_visible() + { hwnds.push(window.hwnd); } }