From e563dc85bf28f927db0241c1dc83fd4afce233b2 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Wed, 19 Aug 2026 18:07:37 +0200 Subject: [PATCH] input: Don't update pointer position on proximity_out --- src/input/mod.rs | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/input/mod.rs b/src/input/mod.rs index 11466266..76d2c355 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1787,28 +1787,30 @@ impl State { tool.frame(self, event.time()); } - let mut shell = self.common.shell.write(); - shell.update_pointer_position(position.to_local(&output), &output); - shell.update_focal_point( - &seat, - position, - self.common.config.cosmic_conf.accessibility_zoom.view_moves, - ); + if event.state() == ProximityState::In { + let mut shell = self.common.shell.write(); + shell.update_pointer_position(position.to_local(&output), &output); + shell.update_focal_point( + &seat, + position, + self.common.config.cosmic_conf.accessibility_zoom.view_moves, + ); - if output != current_output { - for session in cursor_sessions_for_output(&shell, ¤t_output) { - session.set_cursor_pos(None); + if output != current_output { + for session in cursor_sessions_for_output(&shell, ¤t_output) { + session.set_cursor_pos(None); + } + seat.set_active_output(&output); } - seat.set_active_output(&output); - } - update_output_image_copy_cursor_position( - &shell, - &self.common.clock, - &output, - &seat, - position, - ); + update_output_image_copy_cursor_position( + &shell, + &self.common.clock, + &output, + &seat, + position, + ); + } } } InputEvent::TabletToolTip { event, .. } => {