Move regular pointer to tablet pointer pos on proximity out
Browse files at this commitd397375d574bc64fdc0ecb91daa267a2fedff4feParent: cb3ba511 changed file +9 -0
- src/input.rs +9 -0
src/input.rsmodified+9 -0
| @@ -701,6 +701,15 @@ impl State { | ||
| 701 | 701 | } |
| 702 | 702 | ProximityState::Out => { |
| 703 | 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 | 713 | self.niri.tablet_cursor_location = None; |
| 705 | 714 | } |
| 706 | 715 | } |