Commit graph

91 commits

Author SHA1 Message Date
Peter Hutterer
8d0a52298b tablet: add support for relative dials
Some tablets provide one or more rotary controls (see e.g. the Huion
Inspiroy Dial 2) that provide delta information effectively equivalent
to a mouse wheel. Expose those in the same way as the strip or ring
controls, with the event matching the wl_pointer.axis_v120 approach.

Like a typical mouse wheel we do not expect there to be a source
information, so this is left out of the interface.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2025-03-19 20:52:18 +10:00
Peter Hutterer
96c8caa329 tablet: add a bustype event to the initial burst of tablet events
Just VID/PID is not enough, we need the bustype too. And since we now
have that event remove the mention of USB from zwp_tablet_v2.id.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2025-03-19 20:52:17 +10:00
Peter Hutterer
23bfdb50df tablet: bump the tablet protocol version
Unfortunately all the objects depend on each other so any change in any
requires bumping all versions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2025-03-19 20:48:45 +10:00
Xaver Hugl
18a0117b94 stable/linux-dmabuf: clarify when the plane_set protocol error is sent
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2025-01-29 15:12:48 +00:00
Simon Ser
bd6289c141 linux-dmabuf: link to kernel docs
Replace the EGL links and AddFb2 reference with a link to the
kernel docs. The kernel docs explain all the subtleties of dmabuf
exchange, and already link to EGL (and more).

Signed-off-by: Simon Ser <contact@emersion.fr>
2025-01-21 08:13:12 +00:00
Daniel Stone
8cdb391032 presentation-time: Specify refresh bounds for VRR
When this extension was developed, we did not yet know how VRR hardware
would behave in practice as it was not standardised, and the KMS
interface was equally unstandardised.

Now things have shaken out to an acceptable level, we have a good idea
of what we need, which is simply to include a base refresh rate - the
rate the compositor would drive the display for non-VRR clients.

Bump the protocol to version 2 and require the compositor to provide
a rate.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2024-10-11 22:19:08 +00:00
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
6c214e6dc0 linux-dmabuf: mark format/modifier with deprecated-since attribute
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-05 14:35:30 +00:00
Simon Ser
b4a42c88f4 xdg-shell: clarify clients set their initial state before initial commit
It wasn't clear that it's important clients set up their initial
xdg_surface state before they send the initial commit. This is
required for the compositor to be able to send a proper configure
event depending on size constraints and any policies it might want
to apply (e.g. specific app ID always shows up in a designated
workspace).

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-09-05 19:15:01 +00:00
Nicolas Fella
5d2edef111 tablet-v2: Fix feedback description in mode_switch
Visual cues are for the user, not the client software

Signed-off-by: Nicolas Fella <nicolas.fella@kde.org>
2024-08-21 18:55:34 +00:00
Derek Foreman
c5b47dc928 various: Fix definition of double-buffered state
The strict "mailbox" model of wayland past is not how modern compositors
process commits, and many explanations of how double buffered state is
applied throughout wayland-protocols are no longer strictly accurate.

Instead of trying to define double-buffered state at every point of use,
just reference the evolving definition of wl_surface.commit.

This still leaves a few old definitions that weren't trivially updated.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2024-05-06 09:45:35 +00:00
PolyMeilex
9bfb27f0a4
Fix some trivial typos
Fix typos in protocol files and in python code

Signed-off-by: Bartłomiej Maryńczak <marynczakbartlomiej@gmail.com>
2024-05-03 14:16:40 +02: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
Sebastian Wick
1c57b24ff8 xdg-shell: add missing enum attribute to set_constraint_adjustment
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/177
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-27 18:15:30 +00:00
Simon Ser
a5536f9a8c xdg-shell: recommend against drawing decorations when tiled
Port the changes made in 31236887df ("xdg-shell: move maximized
state definition together") to the various tiled states.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-03-26 10:46:26 +00:00
Jonas Ådahl
46f201bd7b xdg-shell: Clarify what a toplevel by default includes
xdg-shell assumes that the client provides all parts of a toplevel
window, i.e. things like titlebar, drop shadow. There are already things
here and there implies it, but it could be helpful to spell it out.

This doesn't change any semantics - it's still valid, from the
perspective of the protocol, to create a toplevel without any
decorations, and it always has been, it just means that the semantical
intention is for them to be exactly so.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2023-12-27 18:43:47 +00:00
MaxVerevkin
9d83649b49 linux-dmabuf: sync changes from unstable to stable
Signed-off-by: Max Verevkin <maxxverrr@gmail.com>
2023-12-08 12:59:37 +02:00
Simon Ser
87e0ce44f3 presentation-time: stop referring to Linux/glibc
clock_gettime() has nothing Linux/glibc-specific.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-10-30 20:56:24 +01:00
Simon Ser
51bee6e074 linux-dmabuf: mark as stable
This protocol extension is ubiquitous. It's time to mark it as
stable.

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>
2023-10-10 14:43:25 +02:00
Kirill Chibisov
174b3487a2 stable/xdg-shell: clarify initial wl_surface acknowledgement
Clarify how and when initial wl_surface state provided by the core
protocol or by extensions to the wl_surface, like as
wp_fractional_scale_v1, is being delivered.

The motivation for such change is to make it clear that the first frame
for xdg-shell will be perfect, which implies that scaling and similar
properties affecting presentation would be delivered in time.

Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
2023-07-03 09:17:26 +00:00
Daniel Stone
c124b641b3 xdg-shell: Add suspended toplevel state
Add a toplevel state to indicate that surface repaints have been
suspended. This may arise due to occlusion, output power state, etc.

In this state, clients can choose to take meaningful action such as
suspending any processing which would drive a repaint loop, or
communicating to the active browser tab that the tab is not
system-visible, or any other action that would be taken by a client not
expecting to repaint until further notice.

cf. discussion in wayland/wayland-protocols!99

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-06-15 17:43:00 +01:00
Xaver Hugl
bbe9298e85 stable/xdg-shell: clarify when which protocol errors are used
Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
2023-05-22 15:47:47 +02:00
Jonas Ådahl
f9ef5fdba5 xdg-shell: Clarify window geometry bounds
The xdg_surface window geometry can extend outside the base wl_surface
to e.g. accompany subsurfaces that extend outside it but is part of the
window itself. Spell out this bit explicitly.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2023-04-04 11:14:27 +00:00
Jonas Ådahl
fce1d30318 xdg-shell: Clarify that geometry doesn't automatically change
The spec says that

	When applied, the effective window geometry will be the set
	window geometry clamped to the bounding rectangle of the combined
	geometry of the surface of the xdg_surface and the associated
	subsurfaces.

Thus, a client cannot assume the geometry will adapt to any subsequent
changes to any conditions that constrained the geometry.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2023-04-04 11:14:27 +00:00
Kirill Primak
72605813bf xdg-shell: add defunct_role_object error
Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
2022-11-29 10:20:42 +00:00
Demi Marie Obenour
9238fd2224 Add xdg-shell.unresponsive error
This allows compositors to disconnect clients that have been deemed
unresponsive.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2022-11-04 15:22:22 +00:00
Demi Marie Obenour
cec292a653 xdg-shell: Add specific errors
This adds specific errors for all xdg_shell errors.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2022-11-04 15:22:22 +00:00
Demi Marie Obenour
c79dbb7c11 xdg-shell: window menus are optional
A compositor is free to completely ignore requests to draw a window
menu.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2022-11-04 15:22:22 +00:00
Demi Marie Obenour
c4ca25a1f1 xdg-shell: Replace an HTTP link with HTTPS
No normative change.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2022-11-04 15:22:22 +00:00
Daniel Stone
115ba71872 xdg-shell: ack_configure must be strictly monotonic
Clients must send ack_configure in a strictly monotonic order wrt
received configure events. It is an error to send an ack_configure
request for a configure event which was sent prior to the last
ack_configure for that surface, or to send multiple ack_configures for
the same configure event.

Weston and wlroots already use this interpretation, however Mutter and
KWayland are more lax and allow duplicates. This clarification tightens
the spec working to explicitly encode the Weston/wlroots behaviour.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/21
2022-10-10 07:58:54 +00:00
Simon Ser
53cd10ae77 xdg-shell: forbid loops in set_parent
These don't make sense. Add a protocol error for this case.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/105
2022-09-17 08:49:35 +02:00
Simon Ser
08067aed0f xdg-shell: introduce toplevel wm_capabilities
Some compositors don't implement all of the features of xdg-shell.
This results in UI elements (e.g. buttons) in clients which do
nothing when activated.

Add a wm_capabilities event to allow clients to hide these UI elements
when they don't make sense.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/64
2022-07-07 08:21:08 +00:00
Daniel Stone
b06650146e xdg-shell: Delete duplicate paragraph in xdg_popup
This is already covered about three paragraphs above.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2022-06-01 13:36:08 +01:00
Kenny Levinsen
2398378cf7 viewport: Remove mention of wl_surface.attach x/y
This paragraph contains an incomplete definition of how
wl_surface.attach x/y arguments functions, and makes no reference to the
similar wl_surface.offset.

The paragraph states that there is no effect on the behavior of
wl_surface.attach. Rather than elaborating on its definition and adding
wl_surface.offset, remove the paragraph and let their definition be up
to wl_surface itself.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
2022-04-11 07:35:45 +00:00
Kirill Primak
9b25b514c4 xdg-shell: clarify setting the parent to an unmapped toplevel
Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
2022-04-06 06:33:51 +00:00
Tadeo Kondrak
cae8a2b6fc presentation-time: Annotate destructor events
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2020-06-11 14:22:16 -06:00
Isaac Freund
220efff93a xdg-shell: add invalid_resize_edge error value
The protocol states that the edges parameter of the resize request must
be one of the values of the resize_edge enum but does not provide a
protocol error value to handle the case where it is not. This commit
adds that error value.

Signed-off-by: Isaac Freund <mail@isaacfreund.com>
2022-01-19 20:20:06 +00:00
Jonas Ådahl
344048614a xdg-shell: Add toplevel "bounds" configure event
This aims to communicate the maximum size a surface should be created
with, and loosely corresponds to the concept of "work area" in the X11
world.

Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/17

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-19 09:54:22 +01:00
Max Ihlenfeldt
0aaf12157e xdg-shell: clarify conditions for remapping unmapped surfaces
Signed-off-by: Max Ihlenfeldt <mihlenfeldt@igalia.com>
2021-11-24 13:10:49 +01:00
Demi Marie Obenour
e5d63e9a3c Improve tiled_* enum summary
No change in behavior, just a doc fix.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2021-11-17 11:21:45 -05:00
Demi Marie Obenour
ce82f16624 Use “software” instead of “user space”
On Genode, graphics drivers run in user space.  It is also theoretically
possible for a Wayland compositor to run in kernel space.  Therefore,
the phrase “user space” should be avoided in a Wayland protocol
specification.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2021-10-13 10:37:26 -04:00
Simon Ser
10155af452 presentation-time: use enum entry description tags
Instead of describing each enum entry in the enum description,
use enum entry descriptions. This avoids the awkward list of
flags in the top-level description.

This has been possible for a long time, but wasn't correctly
handled by wayland-scanner until recently [1].

[1]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/151

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-07-27 22:36:39 +02:00
Daniel Stone
11fecf0808 xdg-shell: Make xdg_surface fail when surface has role
It is illegal for a surface to have more than one role. The only thing
which can be done with an xdg_surface (apart from destroying it) is to
assign the surface a role with the get_toplevel, get_popup, etc
requests.

On Mutter, calling get_xdg_surface on a surface which already has an
assigned role generates the 'role' protocol error. Weston will not send
an error, however it may later abort on a failed assert during cleanup.
wlroots allows this case, and only sends the role error when assigning
an explicit role through creating a toplevel or popup.

On the grounds that it makes no sense to create an xdg_surface for a
wl_surface which already has a role, make it explicitly illegal.

cf. wayland/weston!559, wayland/weston!627

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-07-21 13:07:59 +00:00
onox
1c19d4bc31
presentation-time: Add enum attribute to 'flags'
Signed-off-by: onox <denkpadje@gmail.com>
2021-01-03 18:57:27 +01:00
Vlad Zahorodnii
6be6e00c02 Use correct indefinite article before "xdg"
Since the abbreviation "XDG" starts with a vowel sound, the correct
article is "an."

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2020-06-19 12:45:12 +03:00
Simon Ser
684cd23ae3
xdg-shell: explain how clients need to perform an initial commit
This wasn't explicit reading the mapping requirements.

Signed-off-by: Simon Ser <contact@emersion.fr>
2020-04-07 17:50:45 +02:00
Simon Ser
e8f7d4ebbd
xdg-shell: describe how to re-map an unmapped toplevel
Signed-off-by: Simon Ser <contact@emersion.fr>
2020-04-07 17:50:45 +02:00
Jonas Ådahl
26f494edb0 xdg-shell: Add support for explicit popup repositioning
This commit adds protocol additions making it possible to request that a
popup should be repositioned according to a new xdg_positioner object.

Explicit popup moving is done using a new request on xdg_popup:
xdg_popup.reposition. What it does is change the parameters used for
positioning a popup by providing a new xdg_positioner object. This
request is coupled with a new event; xdg_popup.repositioned, sent
together with the configure events (xdg_popup.configure and
xdg_surface.configure) to notify about the completion of the reposition
request. The reposition request also takes a token that is later passed
via the repositioned event; this is done so that a client may determine
for which reposition request the compositor has sent configure events.

Synchronization between surfaces to avoid state application race
condition are deliberately left out, and should be handled by an
external protocol.

To brief the compositor of the future dimension of the parent that the
compositor should position the popup against, a
xdg_positioner.set_parent_size request is added.

Lastly, a request to couple a xdg_positioner object with a parent
configure event is added (xdg_positioner.set_parent_configure) in
order for a compositor to pair a popup reposition request with a pending
configure event, and it's resulting window geometry. This is necessary
to, for example, properly constrain a popup given a future parent state.
An example of when this may be necessary is an interactive resize where
both the toplevel position and the relative popup position changes.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2020-02-29 15:34:42 +01:00
Jonas Ådahl
ebbad29e3f xdg-shell: Add support for implicit popup repositioning
This commit adds protocol additions making it possible to implicitly
reposition an already mapped popup if the conditions for the constraint
changed (e.g. toplevel moved).

Implicit popup moving is done by setting a adjustment flag on the
positioner used to create it that will cause the compositor to adjust
the position as the conditions used to constrain it change.

These changes may include, for example, changes in the position of the
parent window or the geometry of the work area. To allow the client to
update its content in response to the updated position, the client must
ack the configure event, optionally with new content. Until the client
acks this configure event, the existing positioner will continue to be
used.

Implicit repositioning by itself is racy regarding inter-surface
synchronization of applied state. Inter-surface synchronization is
deliberately left out of xdg-shell, and left to be handled externally.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2020-02-29 15:34:42 +01:00
Jonas Ådahl
2b0c87ea5e xdg-shell: Remove left-over paragraph from pre positioner versions
It mentioned the now removed x, y parameters of xdg_surface.get_popup.
The xdg_positioner now has the relevant documentation that was
previously documented by the now removed paragraph.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2020-02-29 15:14:25 +01:00