Commit graph

14 commits

Author SHA1 Message Date
Daniel Stone
3544c6dcc4 protocols: Add GitLab contact information
This is useful to know who to ping when you want to change something.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-10-09 09:07:11 +00:00
Simon Ser
72b5d90a02 tablet-v2: mark as stable
This protocol extension has not changed in a long time, is
widely supported, and no upcoming breaking changes are planned.

The interface names are left unchanged, so that compositors and
clients don't need to be updated. In particular, the legacy "z"
prefix is still part of the interface name.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-04-11 11:42:43 +02:00
Simon Ser
0819d97313 tablet-v2: clarify that name/id events are optional
libinput may not always have a descriptive name for a tablet
device, in which case it's better to let the Wayland client
pick a fallback (potentially localized) than send a fake string.

Not all tablet devices are USB, so make it clear that the id
event may be skipped.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/180
2024-02-29 13:11:57 +01:00
Simon Ser
18aa7b27f7 tablet-v2: fix typo in set_cursor serial description
This interface has no "enter" event. This was likely copy-pasted
from wl_pointer.set_cursor.

The event which indicates focus is proximity_in.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-05-09 11:59:35 +02:00
Peter Hutterer
c96e22a8f4 tablet: fix a copy/paste error
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-06-28 07:24:14 +10:00
Yong Bakos
59b6e208e0 (multiple): Remove inconsistent line breaks
Enum entries and message arguments are sometimes preceded by a blank line, but
often aren't.

Standardize the format of the protocol specification by removing blank lines
preceding a list of message arguments and enum entries.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-21 11:20:27 +00:00
Carlos Garnacho
24eb6700e4 tablet: Add pad support to the tablet protocol
The pad's interface is similar to the tool interface, a client is notified of
the pad after the tablet_added event.

The pad has three functionalities: buttons, rings and strips.
Buttons are fairly straightforward, rings and strips are separate interfaces
with pointer-axis-like source/value/frame events.
The two interfaces are effectively identical but for the actual value they
send (degrees vs normalized position).

Buttons are sequentially indexed starting with zero, unlike other protocols
where a linux/input.h-style semantic event code is used. Since we expect all
buttons to have client-specific functionality, an additional event tells the
client when a given button index is not available, usually because the
compositor assignes some function to it (e.g. mode switching, see below).

Specific to the pad device is the set_feedback request which enables a client
to set a user-defined string to display for an OSD on the current mappings.
This request is available for buttons, rings and strips.

Finally, the pad supports groups, effectively sets of button/ring/strip
configurations. Those groups may have multiple modes each, so that
users/clients may map several actions to a single element.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-07-20 15:22:04 +08:00
Peter Hutterer
8123c92b6f tablet: restrict the cursor surface to one per tool
The initial approach was to allow one surface to be re-used between tools,
seats and even used together as wl_pointer cursor surface. This has a few
drawbacks, most of which are related to managing the surface correctly in the
compositor. For example, the same cursor surface could have two different
hotspots. Animated cursors should animate independently rather than update at
the same time.

Furthermore: a client cannot know when a surface will cease being used as a
cursor surface. The basic assumption of "after focus out" is an implementation
detail in the compositor and unless the client unsets the cursor it is not
guaranteed that the surface is released. This again makes sharing a surface
less obvious - you cannot know if the wl_pointer surface is still in use when
you set it for a new wp_tablet_tool.

Avoid these headaches (and push some of them to the client) by simply
restricting a wl_surface to be assigned to a single tool. For the 99% use case
where we have one tablet with two tools (pen + eraser) this means we merely
get two extra surfaces, and the two don't usually share the same cursor shape
anyway. If sharing is absolutely necessary, a client may still opt to share
the underlying wl_buffer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-07-20 15:20:04 +08:00
Peter Hutterer
bbd5c7f94e tablet: change all degree values from int to wl_fixed
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-07-20 15:20:04 +08:00
Peter Hutterer
fa1da433c5 tablet: add v2 of the tablet protocol
This is a straightforward copy/paste with a _v1 -> _v2 rename. No functional
changes otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-07-20 15:20:04 +08:00
Yong Bakos
aaafffe039 tablet: Hyphenate compound adjective surface-local
In addition, simplify relevant x/y coordinate parameter summaries.

See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
2016-04-29 16:35:24 -07:00
Yong Bakos
4e7b2fb4da tablet: Correct grammar and punctuation
Correcting minor grammar and punctuation affords clarity.
Standardize the use of 'surface local coordinates' in lieu of 'surface relative'.
Capitalize Wayland where appropriate, similar to other occurences.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-13 12:35:04 -07:00
Yong Bakos
7d21c6387f tablet: Adjust vertical whitespace for consistency
Add/remove vertial whitespace between xml elements
according to conventions elsewhere within this, and other,
protocol xml docs.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-13 12:35:02 -07:00
Peter Hutterer
ca86a592c2 Add the tablet protocol
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-03-08 23:40:43 -08:00