mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-17 14:21:22 +01:00
refactor(windows): stackbar_manager/stackbar.rs reads frames through backend().frame()
Every WindowsApi::window_rect(hwnd) in stackbar_manager/stackbar.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: stacking. Verified: Windows clippy -D warnings via tools/fast-check PASS; e2e not run.
This commit is contained in:
1 parent
b580b29f44
commit
7ba4327fa0
1 file changed
+5
-4
@@ -343,10 +343,11 @@ impl Stackbar {
|
||||
let gap = DEFAULT_CONTAINER_PADDING.load_consume();
|
||||
|
||||
let focused_window_idx = container.focused_window_idx();
|
||||
let focused_window_rect = WindowsApi::window_rect(
|
||||
container.focused_window().cloned().unwrap_or_default().hwnd,
|
||||
)
|
||||
.unwrap_or_default();
|
||||
let focused_window_rect = backend()
|
||||
.frame(WindowId::from_hwnd(
|
||||
container.focused_window().cloned().unwrap_or_default().hwnd,
|
||||
))
|
||||
.unwrap_or_default();
|
||||
|
||||
for (index, window) in container.windows().iter().enumerate() {
|
||||
let left = gap + (index as i32 * (width + gap));
|
||||
|
||||
Reference in new issue
Block a user