mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 20:37:25 +03:00
Warp mouse to focus on new window appearing
This commit is contained in:
parent
1b2a099cdc
commit
81a73eab33
@ -143,6 +143,7 @@ impl CompositorHandler for State {
|
||||
})
|
||||
.map(|(window, _)| window.clone());
|
||||
|
||||
let window = window.clone();
|
||||
let win = window.clone();
|
||||
|
||||
let output = if let Some(p) = parent {
|
||||
@ -161,6 +162,12 @@ impl CompositorHandler for State {
|
||||
|
||||
if let Some(output) = output.cloned() {
|
||||
self.niri.layout.start_open_animation_for_window(&window);
|
||||
|
||||
let new_active_window = self.niri.layout.active_window().map(|(w, _)| w);
|
||||
if new_active_window == Some(&window) {
|
||||
self.maybe_warp_cursor_to_focus();
|
||||
}
|
||||
|
||||
self.niri.queue_redraw(output);
|
||||
}
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user