mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 20:37:25 +03:00
Warp mouse to focus on window closing
This commit is contained in:
parent
81a73eab33
commit
f859f431b8
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user