Change axis events to carry all directions
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 24 Dec 2014 01:10:04 +0000 (11:10 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 13 Jan 2015 03:54:21 +0000 (13:54 +1000)
commit1baf109b40e5d610cb46d313d7c412419af8c9e0
treef94b29c1db47a7b298fb35f4ab506861fe70d665
parentc35885e87dabdcba016cbfa124c384dd440411f1
Change axis events to carry all directions

Sending separate axis events instead of one unified events is limiting,
especially when simultaneously scrolling in both directions and the caller
tries to implement kinetic scrolling.

Take a page from the tablet-support branch and instead implement the axis
event as a generic event that can contain multiple axes simultaneously.

Right now we only have two (scroll) axes and we could easily just check both
for non-zero values. If we want to allow further axes in the future, we need
a check whether an axis is set in an event, that's what
libinput_event_pointer_has_axis to scroll events() is for.

We also need the mask to notify of a scroll stop event, which could otherwise
be confused as a vertical-only or horizontal-only event.

This is an API and ABI break.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
12 files changed:
src/evdev-mt-touchpad-edge-scroll.c
src/evdev.c
src/libinput-private.h
src/libinput-util.h
src/libinput.c
src/libinput.h
src/libinput.sym
test/litest.c
test/pointer.c
test/touchpad.c
tools/event-debug.c
tools/event-gui.c