Commit graph

21 commits

Author SHA1 Message Date
Peter Hutterer
002ef1635d cosmetic: drop double empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-20 09:57:39 +10:00
Friedrich Schöller
529ce8e4ac tools: Check if axis value is available in debugging GUI
libinput complained with lots of "client bug" messages because the GUI tool
did not check which axis values were available.

Signed-off-by: Friedrich Schöller <code@schoeller.se>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-27 13:34:23 +10:00
Friedrich Schöller
4a90910895 tools: Use correct event axis in debugging GUI
Vertical axis values were used for the horizontal axis as well.

Introduced 1baf109b40

Signed-off-by: Friedrich Schöller <code@schoeller.se>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-27 12:29:52 +10:00
Peter Hutterer
1baf109b40 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>
2015-01-13 13:54:21 +10:00
Peter Hutterer
df47231719 tools: pass the userdata to the context
The event-gui needs this but it got dropped in
6ee8c585, causing a crash. Oops.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-23 11:14:39 +10:00
Peter Hutterer
6ee8c5854c tools: use the new shared lib from event-gui
This gives the event gui the ability to use the path backend, and any
configuration toggles given on the commandline.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-23 10:50:31 +10:00
Peter Hutterer
b7c324ba32 tools: print the device name on DEVICE_ADDED
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-11-20 08:11:42 +10:00
Peter Hutterer
fb5f44f794 tools: map KEY_UP/DOWN to pointer acceleration
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-23 10:46:40 +10:00
Peter Hutterer
3b0c97c78b tools: keep a list of devices around for run-time changes
Hard-coded to 50 devices, because for a debugging tool that's plenty.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-23 10:46:40 +10:00
Peter Hutterer
125e98a1f8 style fix: Remove duplicate empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-22 09:00:45 +10:00
Peter Hutterer
5019b25a6b tools: always enable tapping in the event-gui program
This is a debugging tool, so the features to debug should be enabled by
default.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-07-22 08:19:29 +10:00
Jonas Ådahl
60ac2eb813 tools/event-gui: Silence a couple of compiler warnings
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-07-15 23:44:50 +02:00
Peter Hutterer
86d3628d55 tools: fix touch/abs event coordinate transformation in event-gui
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-03 09:59:22 +10:00
Peter Hutterer
3758f38bfd tools: draw the circle for abs events in the right position
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-03 09:54:29 +10:00
Peter Hutterer
6d033dfa14 Merge branch 'master' of git+ssh://git.freedesktop.org/git/wayland/libinput 2014-06-25 13:37:02 +10:00
Peter Hutterer
ac5fc23e49 Drop the deprecated LIBINPUT_POINTER_*_SCROLL enums
We have enough API breakage in this release that it's not worth keeping
these around. Every caller must be fixed for all the other stuff anyway,
so drop this too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-06-25 11:41:16 +10:00
Peter Hutterer
bad56cac5b Merge branch 'ref-counting-context'
Conflicts:
	src/udev-seat.c
	test/log.c
2014-06-25 10:32:42 +10:00
Jonas Ådahl
faab25c25c Make context reference counted
Instead of only allowing one owner keeping a libinput context alive,
make context reference counted, replacing libinput_destroy() with
libinput_unref() while adding another function libinput_ref().

Even though there might not be any current use cases, it doesn't mean we
should hard code this usage model in the API. The old behaviour can be
emulated by never calling libinput_ref() while replacing
libinput_destroy() with libinput_unref().

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-06-25 10:27:03 +10:00
Jonas Ådahl
86c5fba0d2 event-gui: Don't drop fraction of pointer motion events
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-06-23 23:36:48 +02:00
Peter Hutterer
6250397ac8 udev: split libinput_udev context init into two functions
This is preparation work for context-specific log handlers.

Callers are now encouraged to first initialize the context with
libinput_udev_create_context() and then set the seat for this context with
libinput_udev_assign_seat().

In the upcoming patch to support context-specific log handlers this enables a
caller to set the log handler for a context before any devices are
initialized. Otherwise, a log message generated by a new device may pass a
libinput context that the caller is not yet aware of.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-06-23 15:39:08 +10:00
Peter Hutterer
82e81e8790 tools: add a tool for GUI-based debugging
Looking at debugging output is nice but not useful when testing for the feel
of a device. Add a tool that presents a canvas and draws the various events
onto it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-06-23 14:53:27 +10:00