Skip to content

Commit

Permalink
feat(wm): keep track of known_hwnds on wm
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ds13 authored and LGUG2Z committed Feb 21, 2025
1 parent a1ab1c5 commit 1cd2865
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions komorebi/src/process_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,8 @@ impl WindowManager {

serde_json::to_writer_pretty(&file, &known_hwnds)?;

self.known_hwnds = known_hwnds;

notify_subscribers(
Notification {
event: NotificationEvent::WindowManager(event),
Expand Down
1 change: 1 addition & 0 deletions komorebi/src/static_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,7 @@ impl StaticConfig {
pending_move_op: Arc::new(None),
already_moved_window_handles: Arc::new(Mutex::new(HashSet::new())),
uncloack_to_ignore: 0,
known_hwnds: Vec::new(),
};

match value.focus_follows_mouse {
Expand Down
2 changes: 2 additions & 0 deletions komorebi/src/window_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ pub struct WindowManager {
pub pending_move_op: Arc<Option<(usize, usize, isize)>>,
pub already_moved_window_handles: Arc<Mutex<HashSet<isize>>>,
pub uncloack_to_ignore: usize,
pub known_hwnds: Vec<isize>,
}

#[allow(clippy::struct_excessive_bools)]
Expand Down Expand Up @@ -364,6 +365,7 @@ impl WindowManager {
pending_move_op: Arc::new(None),
already_moved_window_handles: Arc::new(Mutex::new(HashSet::new())),
uncloack_to_ignore: 0,
known_hwnds: Vec::new(),
})
}

Expand Down

0 comments on commit 1cd2865

Please sign in to comment.