mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-17 06:11:21 +01:00
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:
1 parent
370dab364a
commit
d395b0e595
1 file changed
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user