mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-28 19:32:48 +01:00
refactor(windows): stackbar_manager/mod.rs reads frames through backend().frame()
Every WindowsApi::window_rect(hwnd) in stackbar_manager/mod.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, layouts. Verified: Windows clippy -D warnings via tools/fast-check PASS; e2e not run.
This commit is contained in:
1 parent
8a304c62dc
commit
b580b29f44
1 file changed
+4
-2
@@ -7,10 +7,12 @@ use crate::container::Container;
|
||||
use crate::core::StackbarLabel;
|
||||
use crate::core::StackbarMode;
|
||||
use crate::stackbar_manager::stackbar::Stackbar;
|
||||
use crate::windows_backend::backend;
|
||||
use crossbeam_channel::Receiver;
|
||||
use crossbeam_channel::Sender;
|
||||
use crossbeam_utils::atomic::AtomicCell;
|
||||
use crossbeam_utils::atomic::AtomicConsume;
|
||||
use komorebi_backend::WindowId;
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use std::collections::HashMap;
|
||||
@@ -206,9 +208,9 @@ pub fn handle_notifications(wm: Arc<Mutex<WindowManager>>) -> color_eyre::Result
|
||||
|
||||
stackbars_monitors.insert(container.id.clone(), monitor_idx);
|
||||
|
||||
let rect = WindowsApi::window_rect(
|
||||
let rect = backend().frame(WindowId::from_hwnd(
|
||||
container.focused_window().copied().unwrap_or_default().hwnd,
|
||||
)?;
|
||||
))?;
|
||||
|
||||
stackbar.update(container_padding, container, &rect)?;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user