Commit graph

9 commits

Author SHA1 Message Date
Peter Hutterer
28908b5ea2 tools: add --verbose to event-debug
And redirect the log to stdout. libinput logs to stderr by default, but if
we're running with --verbose we want all msgs on the same stream.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2014-04-10 11:11:56 +10:00
Peter Hutterer
e1d25a9539 tools: drop CLOCK_MONOTONIC call, no longer necessary
Obsolete as of 84c4f40f25.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-06 15:27:47 +10:00
Jonas Ådahl
6f0ca1a386 Split up the touch event into the different touch types
Instead of having one touch events representing different types of touch
events by providing a touch type, have one separate event type per touch
type. This means the LIBINPUT_EVENT_TYPE_TOUCH is replaced with
LIBINPUT_EVENT_TYPE_TOUCH_DOWN, LIBINPUT_EVENT_TYPE_TOUCH_MOTION,
LIBINPUT_EVENT_TYPE_TOUCH_UP and LIBINPUT_EVENT_TYPE_TOUCH_CANCEL.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-02-26 19:32:33 +01:00
Jonas Ådahl
e80cff7b0e Add seat wide slot to touch events
Since a Wayland compositor have to represent all touch devices of a seat
as one virtual device, lets make that easier by also providing seat wide
slots with touch events.

Seat wide slots may be accessed using
libinput_event_touch_get_seat_slot().

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-02-26 19:32:33 +01:00
Jonas Ådahl
63f192c466 event-debug: Display touch event seats as signed integer
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-02-19 22:16:39 +01:00
Peter Hutterer
75427b0788 udev: rename create_from_udev to udev_create_for_seat
Maintain proper namespacing rename the backend-specific calls to
	libinput_<backend>_<foo>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-10 11:23:36 +10:00
Peter Hutterer
606249f91c path: add libinput_path_create_context instead of libinput_create_from_path
Creates an empty context that is not hooked up to a device. Callers can then
add and remove devices to this context using libinput_path_add_device() and
libinput_path_remove_device().

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-10 11:23:36 +10:00
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