refactor(windows): process_event.rs reads frames through backend().frame()

Every WindowsApi::window_rect(hwnd) in process_event.rs becomes
backend().frame(WindowId::from_hwnd(hwnd)). WindowsBackend::frame is
Window::window_rect, i.e. the same DWM call with the Win32 error kept; the
callers' ?, ok(), unwrap_or_default() and is_ok_and() behave as before (only
the error text can differ: a window that died meanwhile reports WindowGone).

BEHAVIOUR: none intended; e2e gate needed: commands, lifecycle, resize, move. Verified: Windows clippy
-D warnings via tools/fast-check PASS; e2e not run.
This commit is contained in:
LGUG2Z committed 2026-10-31 10:31:13 -07:00
1 parent 370dab364a
commit d395b0e595
1 file changed
+2 -2
+2 -2
View File
@@ -658,7 +658,7 @@ impl WindowManager {
WindowsApi::bring_window_to_top(window.hwnd)?;
let started_from = WindowsApi::window_rect(window.hwnd)?;
let started_from = backend().frame(WindowId::from_hwnd(window.hwnd))?;
let pending_move_op = Arc::make_mut(&mut self.pending_move_op);
*pending_move_op =
@@ -701,7 +701,7 @@ impl WindowManager {
let workspace = self.focused_workspace_mut()?;
let focused_container_idx = workspace.focused_container_idx();
let new_position = WindowsApi::window_rect(window.hwnd)?;
let new_position = backend().frame(WindowId::from_hwnd(window.hwnd))?;
// Measure against the rect the window had when the drag started, which is what
// the user had under the pointer; a window is not always exactly on its tile
// (cell grids, minimum sizes, border insets)