mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
input: implement support for mouse wheel left/right
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.
This commit is contained in:
parent
7a372a8c23
commit
c2cc964116
5 changed files with 55 additions and 29 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue