From 917cd9b7dbdc891e8717a711e3343736ff83a828 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 24 Apr 2025 21:41:18 -0700 Subject: [PATCH] fix(borders): destroy all if a different vd is detected This commit ensures that all borders will destroyed if komorebi detects that the user has switched to a Windows Virtual Desktop different from the one it was launched on and associated with. There is still some work to be done to forcibly redraw the borders when a navigation back to the VD associated with komorebi is detected, but that requires tracking the state of the current VD ID outside of the process_event handler somewhere. re #1420 --- komorebi/src/process_event.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/komorebi/src/process_event.rs b/komorebi/src/process_event.rs index 4191055e..291b51d5 100644 --- a/komorebi/src/process_event.rs +++ b/komorebi/src/process_event.rs @@ -123,6 +123,11 @@ impl WindowManager { "ignoring events and commands while not on virtual desktop {:?}", virtual_desktop_id ); + + // TODO: when returning from another VD to the VD associated with komorebi + // if borders are enabled, they will not be drawn again until the user interacts + // with the workspace or forces a retile + border_manager::destroy_all_borders()?; return Ok(()); } }