From d397375d574bc64fdc0ecb91daa267a2fedff4fe Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Fri, 8 Dec 2023 08:32:42 +0400 Subject: Move regular pointer to tablet pointer pos on proximity out --- src/input.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index cf2c59ba..300577be 100644 --- a/src/input.rs +++ b/src/input.rs @@ -701,6 +701,15 @@ impl State { } ProximityState::Out => { tool.proximity_out(event.time_msec()); + + // Move the mouse pointer here to avoid discontinuity. + // + // Plus, Wayland SDL2 currently warps the pointer into some weird + // location on proximity out, so this shuold help it a little. + if let Some(pos) = self.niri.tablet_cursor_location { + self.move_cursor(pos); + } + self.niri.tablet_cursor_location = None; } } -- cgit