From 5e714cafab61a5fd8a9bb11adf14504ffe609135 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 5 Apr 2024 15:19:30 -0700 Subject: [PATCH] fix(wm): limit resize/move path to managed hwnds This commit ensures that the MoveResizeEnd handler will only proceed if the window triggering the event is a managed window on the focused workspace. fix #733 --- komorebi/src/process_event.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/komorebi/src/process_event.rs b/komorebi/src/process_event.rs index 000dc268..3c9960c5 100644 --- a/komorebi/src/process_event.rs +++ b/komorebi/src/process_event.rs @@ -339,11 +339,8 @@ impl WindowManager { let new_window_behaviour = self.window_container_behaviour; let workspace = self.focused_workspace_mut()?; - if !workspace - .floating_windows() - .iter() - .any(|w| w.hwnd == window.hwnd) - { + + if workspace.contains_managed_window(window.hwnd) { let focused_container_idx = workspace.focused_container_idx(); let new_position = WindowsApi::window_rect(window.hwnd())?;