-
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: Scott Anderson <scott@anderso.nz> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit cd285922)
48300a77