From 0a2dbed1161458b541dde2a4fb1dca34d05af2ae Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 23 Jan 2025 16:43:15 -0800 Subject: [PATCH] fix(wm): handle hide events for layered windows This commit ensures that Hide events on Layered windows (usually added when the transparency feature is enabled) will always be considered eligible for handling. This will avoid situations where ghost borders are left behind because the Hide event was ignored. fix #878 --- komorebi/src/window.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/komorebi/src/window.rs b/komorebi/src/window.rs index d12f4351..32af415a 100644 --- a/komorebi/src/window.rs +++ b/komorebi/src/window.rs @@ -872,7 +872,11 @@ fn window_is_eligible( let known_layered_hwnds = transparency_manager::known_hwnds(); - allow_layered = if known_layered_hwnds.contains(&hwnd) { + allow_layered = if known_layered_hwnds.contains(&hwnd) + // we always want to process hide events for windows with transparency, even on other + // monitors, because we don't want to be left with ghost tiles + || matches!(event, Some(WindowManagerEvent::Hide(_, _))) + { debug.allow_layered_transparency = true; true } else {