Commit graph

2 commits

Author SHA1 Message Date
Jonas Ådahl
1f1304041c Replace output screen size callback with transform helpers
Instead of automatically transforming absolute coordinates of touch and
pointer events to screen coordinates, the user now uses the corresponding
transform helper function. This means the coordinates returned by
libinput_event_pointer_get_absolute_x(),
libinput_event_pointer_get_absolute_y(), libinput_touch_get_x() and
libinput_touch_get_y() has changed from being in output screen coordinate
space to being in device specific coordinate space.

For example, where one before would call libinput_event_touch_get_x(event),
one now calls libinput_event_touch_get_x_transformed(event, output_width).

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-02-03 23:39:58 +01:00
Peter Hutterer
3444b29ceb tools: add a tool for basic event debugging
Simply prints the various events to make it easier to check what's coming out
of libinput. Works for --udev (the default) or for --device /dev/input/event0.
Example output:

event7 	DEVICE_ADDED	seat0	default
event8 	DEVICE_ADDED	seat0	default
event4 	POINTER_BUTTON	 +1.35s	272 pressed
event5 	POINTER_MOTION	 +2.31s	 -3.00/  2.00

Time is displayed relative to the starting time.

Note: statically linked for easier debugging, but we don't distribute it
(yet) anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2014-01-31 14:57:19 +10:00