Skip to content
Commit 48300a77 authored by Scott Anderson's avatar Scott Anderson Committed by Olivier Fourdan
Browse files

xwayland: use wayland axis_discrete event



This prevents multiple scroll events happening for wayland compositors
which send axis values other than 10. For example, libinput will
typically return 15 for each scroll wheel step, and if a wayland
compositor sends those to xwayland without normalising them, 2 scroll
wheel steps will end up as 3 xorg scroll events. By listening for the
discrete_axis event, this will now correctly send only 2 xorg scroll
events.

The wayland protocol gurantees that there will always be an axis event
following an axis_discrete event. However, it does not gurantee that
other events (including other axis_discrete+axis pairs) will not happen
in between them. So we must keep a list of outstanding axis_discrete
events.

Signed-off-by: default avatarScott Anderson <scott@anderso.nz>
Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit cd285922)
parent cd19a752
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment