feat(wm): keep track of known_hwnds on wm

This commit is contained in:
alex-ds13
2025-01-31 13:23:51 +00:00
committed by LGUG2Z
parent a1ab1c5724
commit 1cd28652aa
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -751,6 +751,8 @@ impl WindowManager {
serde_json::to_writer_pretty(&file, &known_hwnds)?; serde_json::to_writer_pretty(&file, &known_hwnds)?;
self.known_hwnds = known_hwnds;
notify_subscribers( notify_subscribers(
Notification { Notification {
event: NotificationEvent::WindowManager(event), event: NotificationEvent::WindowManager(event),
+1
View File
@@ -1207,6 +1207,7 @@ impl StaticConfig {
pending_move_op: Arc::new(None), pending_move_op: Arc::new(None),
already_moved_window_handles: Arc::new(Mutex::new(HashSet::new())), already_moved_window_handles: Arc::new(Mutex::new(HashSet::new())),
uncloack_to_ignore: 0, uncloack_to_ignore: 0,
known_hwnds: Vec::new(),
}; };
match value.focus_follows_mouse { match value.focus_follows_mouse {
+2
View File
@@ -117,6 +117,7 @@ pub struct WindowManager {
pub pending_move_op: Arc<Option<(usize, usize, isize)>>, pub pending_move_op: Arc<Option<(usize, usize, isize)>>,
pub already_moved_window_handles: Arc<Mutex<HashSet<isize>>>, pub already_moved_window_handles: Arc<Mutex<HashSet<isize>>>,
pub uncloack_to_ignore: usize, pub uncloack_to_ignore: usize,
pub known_hwnds: Vec<isize>,
} }
#[allow(clippy::struct_excessive_bools)] #[allow(clippy::struct_excessive_bools)]
@@ -364,6 +365,7 @@ impl WindowManager {
pending_move_op: Arc::new(None), pending_move_op: Arc::new(None),
already_moved_window_handles: Arc::new(Mutex::new(HashSet::new())), already_moved_window_handles: Arc::new(Mutex::new(HashSet::new())),
uncloack_to_ignore: 0, uncloack_to_ignore: 0,
known_hwnds: Vec::new(),
}) })
} }