mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
Warp mouse to focus on window closing
This commit is contained in:
@@ -460,7 +460,15 @@ impl XdgShellHandler for State {
|
||||
return;
|
||||
};
|
||||
|
||||
let active_window = self.niri.layout.active_window().map(|(w, _)| w);
|
||||
let was_active = active_window == Some(&window);
|
||||
|
||||
self.niri.layout.remove_window(&window);
|
||||
|
||||
if was_active {
|
||||
self.maybe_warp_cursor_to_focus();
|
||||
}
|
||||
|
||||
self.niri.queue_redraw(output);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user