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

@ -211,6 +211,7 @@ impl TabletTool {
tool.send_frame(time);
});
if state == ToolButtonState::Pressed {
n.client.focus_stealing_serial.set(Some(serial.get()));
if let Some(node) = n.get_focus_node(self.tablet.seat.id) {
self.tablet.seat.focus_node_with_serial(node, serial.get());
}
@ -259,6 +260,7 @@ impl TabletTool {
});
if let Some(changes) = changes {
if changes.down == Some(true) {
n.client.focus_stealing_serial.set(Some(serial.get()));
if let Some(node) = n.get_focus_node(self.tablet.seat.id) {
self.tablet.seat.focus_node_with_serial(node, serial.get());
}