From aea16ba5d2896ef22bf0bea45e5e8142c0ff1c2a Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 15 Jun 2024 10:17:01 +0200 Subject: 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 --- wayland.h | 1 + 1 file changed, 1 insertion(+) (limited to 'wayland.h') diff --git a/wayland.h b/wayland.h index 7688fbdb..9577f08f 100644 --- a/wayland.h +++ b/wayland.h @@ -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; -- cgit v1.3