Skip to content

Commit

Permalink
fix(border): stop removing borders on wrong monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ds13 authored and LGUG2Z committed Dec 9, 2024
1 parent 4f306e5 commit 192af67
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions komorebi/src/border_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,11 @@ pub fn handle_notifications(wm: Arc<Mutex<WindowManager>>) -> color_eyre::Result
continue 'monitors;
}

let is_maximized = WindowsApi::is_zoomed(
WindowsApi::foreground_window().unwrap_or_default(),
);
let foreground_hwnd = WindowsApi::foreground_window().unwrap_or_default();
let foreground_monitor_id =
WindowsApi::monitor_from_window(foreground_hwnd);
let is_maximized = foreground_monitor_id == m.id()
&& WindowsApi::is_zoomed(foreground_hwnd);

if is_maximized {
let mut to_remove = vec![];
Expand Down

0 comments on commit 192af67

Please sign in to comment.