From d66c6ca51c1728adca05f82b60046e6725b2fff2 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 8 Aug 2026 16:30:55 +0300 Subject: [PATCH] Skip refresh_pointer_contents() during tablet tool use Otherwise it confuses clients with a pointer motion, e.g. when pressing down a tablet on a partially off-screen window (then it scrolls into view and after the animation is done, refresh_pointer_contents() moves the pointer). --- src/niri.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/niri.rs b/src/niri.rs index c7bff2c5..17110d69 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -1028,6 +1028,12 @@ impl State { } pub fn refresh_pointer_contents(&mut self) { + // Don't move the mouse pointer while the user is interacting with the tablet, as it causes + // unwanted jumps for the client. + if self.niri.tablet_cursor_location.is_some() { + return; + } + let _span = tracy_client::span!("Niri::refresh_pointer_contents"); let pointer = &self.niri.seat.get_pointer().unwrap();