Commit graph

120 commits

Author SHA1 Message Date
Peter Hutterer
cbf775ba3d tools: fix output to say TABLET_TOOL instead of just tablet
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-05 15:34:25 +10:00
Peter Hutterer
91a568d1a1 Merge branch 'master' into tablet-support 2016-01-19 12:02:51 +10:00
Peter Hutterer
fec99a28e3 tools: print the button name too, not just the code
new output:
event4 	POINTER_BUTTON    +0.84s	BTN_RIGHT (273) released, seat count: 0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-11 10:11:54 +10:00
Peter Hutterer
0b124a1a5d tablet: insert "STATE" into proximity/tip states
Makes it even longer, but at least it's consistent with button and key state.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-01-06 11:02:40 +10:00
Peter Hutterer
f96ee412df tablet: reduce event deltas to only apply to the wheel
Part of the big revamp to get rid of libinput_tablet_tool_axis and
replace it with a set of axis-specific APIs.

Only the rel wheel has true delta events, everything else is a delta
calculated by libinput based on the previous position. Since we supply that
position to the callers anyway, they can determine that delta themselves
where needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Lyude <cpaul@redhat.com>
2015-12-21 07:59:00 +10:00
Peter Hutterer
828ca69c77 tablet: rename libinput_tablet_tool_has_axis into an axis-specific API set
Part of the big revamp to get rid of libinput_tablet_tool_axis and
replace it with a set of axis-specific APIs.

Note that this commit drops the ability to check whether a tablet has an x or
y axis. If it doesn't, libinput won't initialize the tablet anyway so this was
superfluous already.

Likewise with the tilt axes - either we have x and y tilt or we have neither,
so separate checks for tilt_x and tilt_y is unnecessary.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Lyude <cpaul@redhat.com>
2015-12-21 07:59:00 +10:00
Peter Hutterer
e5a33086bc tablet: rename axis_get_value into an axis-specific API set
Second part of the big revamp to get rid of libinput_tablet_tool_axis and
replace it with a set of axis-specific APIs.

Note that this commit drops the ability to get the absolute value from a
relative wheel. The previous API always returned 0 for this case, it is not
needed anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Lyude <cpaul@redhat.com>
2015-12-21 07:59:00 +10:00
Peter Hutterer
5c9c481047 tablet: rename axis_has_changed into an axis-specific API set
First part of the big revamp to get rid of libinput_tablet_tool_axis and
replace it with a set of axis-specific APIs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Lyude <cpaul@redhat.com>
2015-12-21 07:59:00 +10:00
Peter Hutterer
0c6f505ae6 tools: print the wheel axis delta, not the axis value
The axis value for a rel wheel is always 0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-12-14 10:29:37 +10:00
Peter Hutterer
eb9b05f407 Merge branch 'master' into tablet-support 2015-12-09 10:19:47 +10:00
Peter Hutterer
3d39dbc3f2 tools: print which scroll axis we have in event-debug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-12-07 11:57:20 +10:00
Peter Hutterer
8be0813e17 tablet: drop the tool type 'finger' from the tablet interface
If it's a finger, it's a touchscreen or a touchpad, not a tablet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-12-02 11:06:27 +10:00
Peter Hutterer
5074b59241 Merge branch 'master' into tablet-support 2015-11-24 15:18:47 +10:00
Peter Hutterer
abb98d5738 tablet: rename the libinput_tool calls to libinput_tablet_tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:54 +10:00
Peter Hutterer
a10e92849c tablet: rename libinput_event_tablet to libinput_event_tablet_tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:54 +10:00
Peter Hutterer
2cfd52244a tablet: rename LIBINPUT_EVENT_TABLET to LIBINPUT_EVENT_TABLET_TOOL
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:54 +10:00
Peter Hutterer
b1b676e24a tablet: rename the tablet capability to a tablet_tool capability
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:54 +10:00
Peter Hutterer
759ef04465 tablet: rename TOOL_TIP to TABLET_TOOL_TIP
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:54 +10:00
Peter Hutterer
7123c37f1c tablet: rename tool_tip_state to tablet_tool_tip_state
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:53 +10:00
Peter Hutterer
cc2b45dd50 tablet: rename TOOL_PROXIMITY_ to TABLET_TOOL_PROXIMITY
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:53 +10:00
Peter Hutterer
a22b94a22c tablet: rename tool_proximity_state to tablet_tool_proximity state
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:53 +10:00
Peter Hutterer
c7cb77b36f tablet: rename TOOL_TYPE to TABLET_TOOL_TYPE
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:53 +10:00
Peter Hutterer
827abfbb56 tablet: rename the tablet axes to "LIBINPUT_TABLET_TOOL_AXIS_..."
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:53 +10:00
Peter Hutterer
cd2cd2f112 tablet: rename libinput_tablet_axis to libinput_tablet_tool_axis
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:53 +10:00
Peter Hutterer
98df9eb63f tablet: rename libinput_tool to libinput_tablet_tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-18 12:13:53 +10:00
Peter Hutterer
1318ffadb5 tablet: split out tip handling into a separate event
The tablet tip works like a button in the kernel but is otherwise not really
a button. Split it into an explicit tip up/down event instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-12 06:52:51 +10:00
Peter Hutterer
acfff361a7 tools: take the start time before initializing the context
Otherwise events that are already queued before the first libinput_dispatch()
have a negative timestamp.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-09 16:06:30 +10:00
Peter Hutterer
4ca8f3b699 tools: print the tool ID in event-debug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-11-09 15:39:20 +10:00
Peter Hutterer
87926e4ab6 tablet: rename all tool types to LIBINPUT_TOOL_TYPE_*
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2015-11-09 15:37:22 +10:00
Peter Hutterer
4edcd79372 tablet: widen the serial type to uint64_t
Internally we still use uint32_t because that's all we get from evdev. But
eventually we'll have 64 bit serials.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2015-11-05 13:18:33 +10:00
Peter Hutterer
a7bd84a7ee Merge branch 'master' into tablet-support 2015-07-24 10:56:05 +10:00
Peter Hutterer
55974dcac5 Add a configuration interface for enabling/disabling disable-while-typing
DWT can interfere with some applications where keyboard and touchpad use at
the same time is common, e.g. games but also anything that requires a
combination of frequent pointer motion and use of keyboard shortcuts.

Expose a toggle to disable DWT where needed.

https://bugs.freedesktop.org/show_bug.cgi?id=90624

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-24 08:49:23 +10:00
Peter Hutterer
57b203c9b9 tools: only print angle/scale for pinch events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-20 11:18:21 +10:00
Peter Hutterer
95089b77d4 Merge branch 'master' into tablet-support
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-08 13:50:24 +10:00
Peter Hutterer
c19e72f4af tools: don't call is_cancelled on a gesture begin event
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-06 17:15:46 +10:00
Hans de Goede
9fae0f8c3e touchpad: Allow querying whether a gesture ended normally or was cancelled
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-07-06 14:09:33 +10:00
Hans de Goede
98b1e212ac touchpad: Extend the touchpad gesture API with pinch gestures
Extend the touchpad gesture API with pinch gestures. Note that this
new API offers a single event stream for both pinch and rotate data, this
is deliberate as some applications may be interested in getting both at
the same time. Applications which are only interested in one or the other
can simply ignore the other.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
2015-07-06 14:09:27 +10:00
Hans de Goede
b8a2e5bc5f touchpad: Add an API for touchpad gesture events
For touchscreens we always send raw touch events to the compositor, and the
compositor or application toolkits do gesture recognition. This makes sense
because on a touchscreen which window / widget the touches are over is
important context to know to interpret gestures.

On touchpads however we never send raw events since a touchpad is an absolute
device which primary function is to send pointer motion delta-s, so we always
need to do processing (and a lot of it) on the raw events.

Moreover there is nothing underneath the finger which influences how to
interpret gestures, and there is a lot of touchpad and libinput configuration
specific context necessary for gesture recognition. E.g. is this a clickpad,
and if so are softbuttons or clickfinger used? What is the size of the
softbuttons? Is this a true multi-touch touchpad or a semi multi-touch touchpad
which only gives us a bounding box enclosing the fingers? Etc.

So for touchpads it is better to do gesture processing in libinput, this commit
adds an initial implementation of a Gesture event API which only supports swipe
gestures, other gestures will be added later following the same model wrt,
having clear start and stop events and the number of fingers involved being
fixed once a gesture sequence starts.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
2015-07-06 14:08:54 +10:00
Peter Hutterer
9610ff849e Merge branch 'master' into tablet-support 2015-06-29 13:56:05 +10:00
Peter Hutterer
b7c414558d tools: pass a context around as userdata
We need the options during open_restricted(), so instead of the caller just
passing in a custom userdata, let them wrap it into a tools_context.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-24 15:15:15 +10:00
Peter Hutterer
41ad79f8d8 tools: move the interface into the shared code
No need to duplicate this atm

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-24 15:15:07 +10:00
Peter Hutterer
16107e1862 tools: hook up drag lock config
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-06-23 14:24:29 +10:00
Peter Hutterer
0d322c69d0 Merge branch 'master' into tablet-support 2015-06-22 15:20:01 +10:00
Peter Hutterer
2e826390a4 tools: drop some superfluous parenthesis
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-22 10:32:33 +10:00
Peter Hutterer
bc9f16b40e COPYING: Update boilerplate from MIT X11 to MIT Expat license
To quote Bryce Harrington from [1]:
"MIT has released software under several slightly different licenses,
including the old 'X11 License' or 'MIT License'.  Some code under this
license was in fact included in X.org's Xserver in the past.  However,
X.org now prefers the MIT Expat License as the standard (which,
confusingly, is also referred to as the 'MIT License').  See
http://cgit.freedesktop.org/xorg/xserver/tree/COPYING

When Wayland started, it was Kristian Høgsberg's intent to license it
compatibly with X.org.  "I wanted Wayland to be usable (license-wise)
whereever X was usable."  But, the text of the older X11 License was
taken for Wayland, rather than X11's current standard.  This patch
corrects this by swapping in the intended text."

libinput is a fork of weston and thus inherited the original license intent
and the license boilerplate itself.

See this thread on wayland-devel here for a discussion:
http://lists.freedesktop.org/archives/wayland-devel/2015-May/022301.html

[1] http://lists.freedesktop.org/archives/wayland-devel/2015-June/022552.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
2015-06-16 14:36:04 +10:00
Peter Hutterer
99aa1f5dc3 Merge branch 'master' into tablet-support 2015-06-04 12:49:18 +10:00
Peter Hutterer
d8208940e0 tools: print symbolic key names too from event-debug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-05-29 12:23:05 +10:00
Jason Gerecke
22b42fe1bf tools: List relative wheel among axis capabilities
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-04-07 07:39:59 +10:00
Peter Hutterer
2876575d06 Merge branch 'master' into tablet-support 2015-03-18 14:37:46 +10:00
Peter Hutterer
7506d69811 tools: print available click methods on device notify
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-18 12:51:28 +10:00