forge
Explore
Log in

Don't you dare go Hollow

Move regular pointer to tablet pointer pos on proximity out

Browse files at this commit

d397375d574bc64fdc0ecb91daa267a2fedff4feIvan MolodetskikhParent: cb3ba51
src/input.rsmodified+9 -0
@@ -701,6 +701,15 @@ impl State {
701 }701 }
702 ProximityState::Out => {702 ProximityState::Out => {
703 tool.proximity_out(event.time_msec());703 tool.proximity_out(event.time_msec());
704+
705+ // Move the mouse pointer here to avoid discontinuity.
706+ //
707+ // Plus, Wayland SDL2 currently warps the pointer into some weird
708+ // location on proximity out, so this shuold help it a little.
709+ if let Some(pos) = self.niri.tablet_cursor_location {
710+ self.move_cursor(pos);
711+ }
712+
704 self.niri.tablet_cursor_location = None;713 self.niri.tablet_cursor_location = None;
705 }714 }
706 }715 }