input: implement wl_pointer::axis_value120()

This implements high resolution mouse wheel scroll events. A "normal"
scroll step corresponds to the value 120. Anything less than that is a
partial scroll step.

This event replaces axis_discrete(), when we bind wl_seat v8 (which we
now do, when available).

We calculate the number of degrees that is required to scroll a single
line, based off of the scrollback.multiplier value.

Each high-res event accumulates, until we have at least the number of
degress required to scroll one, or more lines.

The remaining degrees are kept, and added to in the next scroll event.

Closes #1738
This commit is contained in:
Daniel Eklöf 2024-06-15 10:17:01 +02:00
parent f3d848da01
commit aea16ba5d2
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 69 additions and 13 deletions

View file

@ -192,6 +192,7 @@ struct seat {
/* We used a discrete axis event in the current pointer frame */
double aggregated[2];
double aggregated_120[2];
bool have_discrete;
} mouse;