diff options
| author | Ramses <ramses@well-founded.dev> | 2024-11-11 07:08:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-11 06:08:29 +0000 |
| commit | 494b438151c6ae94821ebfc612f12a0e1d49229e (patch) | |
| tree | 7273c574140c826d2420a114f573b005273eea2f /src/input | |
| parent | 010a2368823bc3959c1468609cd05367e5b6d0b6 (diff) | |
| download | niri-494b438151c6ae94821ebfc612f12a0e1d49229e.tar.gz niri-494b438151c6ae94821ebfc612f12a0e1d49229e.tar.bz2 niri-494b438151c6ae94821ebfc612f12a0e1d49229e.zip | |
Unhide the pointer on scroll events (#797)
* Unhide the pointer on scroll events
Since we reset the surface under the pointer when we hide the pointer
(see update_pointer_contents), scroll events don't work when the pointer
is hidden.
So to make scrolling work, we make sure that we unhide the pointer when
a scrolling event occurs.
* Update src/input/mod.rs
---------
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to 'src/input')
| -rw-r--r-- | src/input/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs index a8487d14..0bff4637 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1744,6 +1744,12 @@ impl State { fn on_pointer_axis<I: InputBackend>(&mut self, event: I::PointerAxisEvent) { let source = event.source(); + // We received an event for the regular pointer, so show it now. This is also needed for + // update_pointer_contents() below to return the real contents, necessary for the pointer + // axis event to reach the window. + self.niri.pointer_hidden = false; + self.niri.tablet_cursor_location = None; + let horizontal_amount_v120 = event.amount_v120(Axis::Horizontal); let vertical_amount_v120 = event.amount_v120(Axis::Vertical); |
