From 85564f033699e6371600da552a7ee0e889d8114e Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Tue, 18 Aug 2026 19:15:27 +0200 Subject: [PATCH] input: Focus on tool tip down --- src/input/mod.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/input/mod.rs b/src/input/mod.rs index fe210612..11466266 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1834,6 +1834,21 @@ impl State { if let Some(seat) = maybe_seat { self.common.idle_notifier_state.notify_activity(&seat); notify_cursor_activity(self, &seat); + + let serial = SERIAL_COUNTER.next_serial(); + let output = seat.active_output(); + let shell = self.common.shell.write(); + let position = + transform_output_mapped_position(&output, &event, shell.zoom_state()); + let under = State::element_under(position, &output, &shell, &seat); + drop(shell); + + if event.tip_state() == TabletToolTipState::Down + && let Some(target) = under.as_ref() + { + Shell::set_focus(self, Some(target), &seat, Some(serial), false); + } + if let Some(tool) = seat.tablet_seat().get_tool(&event.tool()) { let serial = SERIAL_COUNTER.next_serial(); match event.tip_state() {