1
0
Fork 0
forked from wry/wry

seat: keep track of serials that are allowed to steal keyboard focus

This commit is contained in:
Julian Orth 2024-10-17 16:08:54 +02:00
parent 324540c41e
commit 18bddbc987
4 changed files with 21 additions and 1 deletions

View file

@ -1041,6 +1041,18 @@ impl WlSeatGlobal {
ei_seat.regions_changed();
});
}
#[expect(dead_code)]
pub fn handle_focus_request(self: &Rc<Self>, client: &Client, node: Rc<dyn Node>, serial: u64) {
let Some(max_serial) = client.focus_stealing_serial.get() else {
return;
};
let serial = serial.min(max_serial);
if serial <= self.keyboard_node_serial.get() {
return;
}
self.focus_node_with_serial(node, serial);
}
}
impl CursorUserOwner for WlSeatGlobal {