From c2cc964116f9fc6c6432c5c00b113c92bdfcdcd6 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 5 Aug 2021 18:34:09 +0200 Subject: input: implement support for mouse wheel left/right MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now emit button 6/7 events (when the client application grabs the mouse). This buttons map to mouse wheel horizontal scroll events. Or, left/right tilting, if you like. Wayland report these as ‘axis’ events (just like regular scroll wheel events), and thus we need to translate those scroll events to button events. libinput does not define any mouse buttons for wheel tilts, so we add our own defitions. These are added last in the BTN_* range, just before the BTN_JOYSTICK events. --- wayland.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wayland.h') diff --git a/wayland.h b/wayland.h index bc044169..4881c6c5 100644 --- a/wayland.h +++ b/wayland.h @@ -242,7 +242,7 @@ struct seat { struct timeval last_time; /* We used a discrete axis event in the current pointer frame */ - double axis_aggregated; + double aggregated[2]; bool have_discrete; mouse_binding_list_t bindings; -- cgit v1.3