Commit graph

74 commits

Author SHA1 Message Date
Matthias Clasen
bd9096688a cursor-shape: Add the 'all-resize' cursor shape
The move cursor is ambiguous, since it is used in two context:
for DND, and for resizing. This commit adds a separate enum
value for a cursor that indicates something can be resized
in all directions. A suitable image for this value is a four-headed
arrow.

Signed-off-by: Matthias Clasen <mclasen@redhat.com>
2025-02-28 08:35:39 -05:00
Matthias Clasen
43620ec29a cursor-shape: Add the 'ask' cursor shape
This is the cursor shape that corresponds to the ASK drag action
in the core protocol. The expected semantics of ASK are that the
drop target presents the user with a choice of actions when the
drop happens. A typical image for this cursor is a default cursor
with a '?' emblem.

Signed-off-by: Matthias Clasen <mclasen@redhat.com>
2025-02-28 08:08:20 -05:00
Matthias Clasen
b697b9e45b cursor shape: Add some docs
Add some hints about related groups of cursor shapes and recommend
that they should use visually compatible images.

Signed-off-by: Matthias Clasen <mclasen@redhat.com>
2025-02-28 08:01:03 -05:00
Matthias Clasen
22619f08fd cursor-shape: Bump protocol version
We are going to add new values to the cursor shape enum,
so a new protocol version is needed.

Signed-off-by: Matthias Clasen <mclasen@redhat.com>
2025-02-28 08:01:02 -05:00
Pekka Paalanen
b3e507b102 staging/color-management: credit Niels
Niels' efforts predate Sebastian's by another 5 years and they deserve
to be mentioned.

Sorry for missing them from the commit.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-02-13 15:27:33 +02:00
Sebastian Wick
452e943b49 staging: add color-management protocol
# Wayland Color Management and HDR Design Goals

The goals of Wayland color management and *high dynamic range* (HDR) support
protocol extension are:

- Reliably maintain the display server color setup.
- Support professional color managed applications (presentation).
- Support displaying TV broadcasts and other high quality video content.
- Support a wide variety of monitors and application content,
  including wide gamut and/or HDR.
- Bring basic color management to applications that are not color-aware at all.
- Bring adequate color management to Wayland applications that are color-aware
  but not color managed.

Once a display system has been calibrated, measured and configured, it should
keep its settings until the user intentionally changes them. Achieving this
reliability requires protecting the system from accidental changes and avoiding
dependency on hardware default state as much as possible. The former is done by
not allowing arbitrary programs to change the settings. The latter is realized
by very careful Wayland compositor implementation that takes into account the
details of the underlying system API. For example, with DRM also unrecognized
KMS properties need to be saved and restored.

It should be reasonably possible to run existing color managed applications,
particularly X11 applications through Xwayland, without need for modification
and get at least the level of color managed presentation features they received
on Xorg. It is possible that this requires e.g. re-creating monitor color profiles,
recalibration, or other reconfiguring.

The use of `xrandr` and similar X11 tools and interfaces are intentionally
not supported as the Wayland desktop paradigm does not allow clients to force
effects on other clients. Those global properties, including video mode
and display color depth, are left to each Wayland compositor's own settings
management as they are end user preferences.

The protocol extension should be usable for professional broadcast display
usage, meaning that it is suitable for use inside a television for all of
aerial, cable, and internet delivered content. However, the extension might not
be completely sufficient, particularly where it would violate the Wayland
desktop paradigm (e.g. requests to change display video mode or calibration
shall not be included).

The support for a wide variety of monitors is achieved by communicating sufficient
information about the monitors to applications, so that applications can adapt
to the monitors if they choose to do so. The proper composition and handling of
a wide variety of application content is achieved by applications describing
the content in sufficient detail for a Wayland compositor to process it
correctly.

Applications that pay no mind whatsoever to color management are called
*color-unaware*. They have been written for an average system that more or less
resembles (or not) sRGB in its color output. This is the large majority of all
applications on X11 and Wayland. On a usual consumer monitor they look pretty
much ok, but on a color managed monitor with special features (wide gamut, HDR)
they might be an eye sore when displayed side by side with properly color
managed applications. A goal for Wayland color management is to make these
application look "pretty much ok" on such special monitors without
modifications to the applications or toolkits, while letting color managed
applications look their best simultaneously.

One step forward from color-unaware applications are *color-aware* applications
that also are not fully color managed applications. These applications are
fixed to one or few well-known color spaces, the traditional sRGB for instance.
They don't try to adapt to the monitor and they might not use any *color
management module* (CMM). These applications can still describe their content's
color space to a Wayland compositor, which will then take care of color managed
presentation of the content.

Finally, *color-managed* applications are fully prepared to do all of their own
color management, and may be using a CMM. They can also adapt their rendering
to different kinds of monitors, and prefer to know everything they can about a
monitor in order to do a perfect job. They expect the window system to not
tamper with the color values they produce.

The above goals imply that a Wayland compositor is an active participant in
color management, converting all application content into some common color
space for display on a monitor. As a compositor can do that separately for each
monitor, it is possible to present the same window adequately color managed on
multiple monitors simultaneously. It is also possible to keep a monitor in HDR
mode while showing both *standard dynamic range* (SDR) (traditional or
unmodified applications) and HDR content simultaneously. A practical use case
for that is a video player showing a HDR video on one Wayland surface and SDR
subtitles and user interface on another surface.

 History

Wayland color management has been planned and developed for many years.
This patch is the result of 141 development patches which are stored for
future reference in the wayland-protocols branch history/color-management:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/commits/history/color-management
The development started some years even before this.

There have been many contributors over the years. The list below has
been collected from those 141 patches, and is surely incomplete.

Co-authored-by: Benjamin Otte <otte@redhat.com>
Co-authored-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Co-authored-by: Colin Marc <hi@colinmarc.com>
Co-authored-by: Dudemanguy <random342@airmail.cc>
Co-authored-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Co-authored-by: Matthias Clasen <mclasen@redhat.com>
Co-authored-by: Naveen Kumar <naveen1.kumar@intel.com>
Co-authored-by: Sebastian Wick <sebastian.wick@redhat.com>
Co-authored-by: Timo Witte <timo.witte@gmail.com>
Co-authored-by: Victoria Brekenfeld <victoria@system76.com>
Co-authored-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>

Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-02-13 14:06:15 +02:00
James Ramsey
20bcf732a9 ext-idle-notify: Allow for the ignoring of idle inhibitors
Signed-off-by: James Ramsey <james.jehiel.ramsey@gmail.com>
2025-01-13 06:49:42 -05:00
YaoBing Xiao
258d8f88f2 content-type: update description summary for get_surface_content_type request
Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
2024-12-22 20:11:32 +00:00
YaoBing Xiao
04b966f0ed alpha-modifier: update description summary for get_surface request
Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
2024-12-22 09:51:02 +00:00
Victoria Brekenfeld
605436b591 Add ext-workspace
Signed-off-by: Victoria Brekenfeld <github@drakulix.de>
2024-12-03 17:46:07 +01:00
Nick Diego Yamane
122a47a1ff
xdg-toplevel-drag: Add myself as co-maintainer
Signed-off-by: Nick Diego Yamane <nickdiego@igalia.com>
2024-11-20 13:29:08 -04:00
Simon Ser
442fb88627 drm-lease: nominate Simon Zeni as maintainer
Drew is no longer active in the Wayland community. Simon Zeni is
the wlroots point-of-contact and is very familiar with DRM leasing.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-30 23:06:18 +00:00
Neal Gompa
1f5f2b50ea Add ext-data-control protocol
This protocol allows a privileged client to control data devices. In
particular, the client will be able to manage the current selection and take
the role of a clipboard manager.

This is a straight port from wlr-data-control-unstable-v1 to ext-, as it
has not changed in five years and has near-universal compositor adoption.

Signed-off-by: Neal Gompa <neal@gompa.dev>
2024-10-25 13:10:22 +00:00
YaoBing Xiao
fc1faa707e ext-image-copy-capture: fix the error in the protocol description
Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
2024-10-13 21:01:42 +08:00
Derek Foreman
37a1560cf6 commit-timing-v1: Add new protocol
Add a new protocol for adding timestamps to wayland surface state to
allow deferring processing until later.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2024-10-11 18:47:41 +00:00
Derek Foreman
1ccc5748ac fifo-v1: Add new protocol
Add a new protocol to allow a content update to require a
display refresh pass before it is ready to present.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2024-10-11 13:29:33 -05:00
Jonas Ådahl
df207cbd46 Add staging system bell protocol
This is meant to let applications ring the system bell. It needs to be a
Wayland protocol because a system bell is not necessarily audiable; for
for example accessibility reasons, it might need be a visual feedback,
which may be tied to a specific window. Accessibility features are
usually configured globally, and one likely wants identical visual
feedback for all system bell ringings, so it doesn't fit as a client
side only feature.

This aims to replaced and deprecate the `gtk_shell1.system_bell`
request.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-10-10 22:48:29 +00:00
Simon Ser
a00f35149e ext-image-copy-capture: fix typo
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-09 12:49:44 +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
itycodes
ea7e5ef693 ext-image-copy-capture-v1: Fix typo in ext_image_copy_capture_frame_v1::destroy
Signed-off-by: Tranquil Ity tranquillitycodes@proton.me
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/217
2024-10-07 14:20:51 +00:00
Sebastian Wick
02c589c2d8 cursor-shape-v1: Make object inert when underlying cap is destroyed
It was undefined before how long the wp_cursor_shape_device_v1 has any
effect. Let's specify that the object becomes inert when the pointer cap
goes away or the tablet tool is removed. In those cases the client has
to create a new pointer/tablet tool, and also a new cursor shape device
when the cursor caps or a new tablet tool reappears.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/186
2024-10-06 09:35:17 +00:00
Nick Diego Yamane
e7fea17be8 xdg-toplevel-drag: clarify offset is relative to geometry
The current description is not clear about it, though the only available
implementation works like that, so make it explicit in the protocol
description.

Signed-off-by: Nick Diego Yamane <nickdiego@igalia.com>
2024-10-05 14:58:43 +00:00
Simon Zeni
bdb88cec2b drm-lease-v1: advertise connector again upon lease finished event
Signed-off-by: Simon Zeni <simon.zeni@collabora.com>
Reviewed-by: jexposit@redhat.com
2024-10-05 13:14:38 +00:00
Simon Zeni
950b7384b9 drm-lease-v1: advertise connector again upon lease destruction
Signed-off-by: Simon Zeni <simon.zeni@collabora.com>
Reviewed-by: Xaver Hugl <xaver.hugl@kde.org>
2024-10-05 13:14:38 +00:00
Simon Zeni
05e777f476 drm-lease-v1: specify existing lease status on withdrawn event
Signed-off-by: Simon Zeni <simon.zeni@collabora.com>
Reviewed-by: Xaver Hugl <xaver.hugl@kde.org>
2024-10-05 13:14:38 +00:00
Julian Orth
f30b27a0ee security-context-v1: clarify close_fd behavior
Signed-off-by: Julian Orth <ju.orth@gmail.com>
2024-09-25 16:22:51 +00:00
Simon Ser
6f5772fd69 xdg-toplevel-icon: clarify that wl_buffer.release is unused
The protocol as-is doesn't allow clients to mutate wl_buffers.
Let's make it clear that wl_buffer.release is not used for that
purpose. Buffer re-use can be added in a future protocol version
if desirable.

Add a small note to explain that no wl_buffer mutation implies no
wl_shm_pool's backing storage mutation as well.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/201
2024-09-08 10:44:03 +02:00
Simon Ser
c4df317ea6 xdg-toplevel-icon: add error for destroyed wl_buffer
This requirement was missing an error code.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/201
2024-08-30 17:21:00 +00:00
Andri Yngvason
f4925c9313 ext-image-copy-capture-v1: new protocol
Signed-off-by: Andri Yngvason <andri@yngvason.is>
Signed-off-by: Simon Ser <contact@emersion.fr>
Co-authored-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Simon Zeni <simon@bl4ckb0ne.ca>
2024-08-10 17:24:46 +02:00
Andri Yngvason
c543ade77b ext-image-capture-source-v1: new protocol
Signed-off-by: Andri Yngvason <andri@yngvason.is>
Signed-off-by: Simon Ser <contact@emersion.fr>
Co-authored-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Simon Zeni <simon@bl4ckb0ne.ca>
2024-08-08 09:22:36 +00:00
Matthias Klumpp
e3c6a17a6f staging: Add xdg-toplevel-icon protocol for dedicated toplevel icons
This protocol allows clients to set icons for their toplevel windows.
Icons can be loaded from the XDG icon stock using their name, or can
alternatively be provided by the client as wl_shm-backed wl_buffer.

A toplevel icon represents the individual toplevel (unlike the
application or launcher icon, which represents the application as a
whole), and may be shown in window switchers, window overviews and
taskbars that list individual windows.

Resolves: #52

Signed-off-by: Matthias Klumpp <matthias@tenstral.net>
2024-06-01 17:55:52 +02:00
Xaver Hugl
e71ed40ad7 staging/tearing-control: clarify what happens after wl_surface destruction
There's no protocol error for making requests on the object after the wl_surface
has been destroyed, so the object has to become inert in that case.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2024-05-21 17:47:41 +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
6eae6815e8 xdg-dialog: fix missing namespace in protocol name
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-04-22 17:33:24 +02:00
Xaver Hugl
8b8b518df0 staging: add alpha-modifier protocol
This protocol allows clients to set an alpha multiplier for the whole surface,
which allows it to offload alpha changes for the whole surface to the compositor,
which in turn can offload them to KMS.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2024-04-03 13:48:31 +02:00
Sebastian Wick
aac8841f82 cursor-shape-v1: Does not advertises the list of supported cursors
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-26 10:16:22 +00:00
Simon Ser
ae9ed7ac14 linux-drm-syncobj-v1: new protocol
This is a new Linux explicit synchronization protocol based on DRM
synchronization objects [1].

[1]: https://dri.freedesktop.org/docs/drm/gpu/drm-mm.html#drm-sync-objects

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-03-20 12:00:33 +01:00
Carlos Garnacho
9408483fb1 staging/dialog: Add "dialog" protocol
This simple protocol definition allows clients to express a "dialog"
relationship of a toplevel with its parent and extend the possible
hints. This allows compositors to attach certain behavior according
to these hints.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-14 12:47:54 +00:00
Poly
4c8840ce04
Fix typo in ext-foreign-toplevel-list-v1
Fix double "should" in ext-foreign-toplevel-list-v1

Signed-off-by: Bartłomiej Maryńczak <marynczakbartlomiej@gmail.com>
2024-02-10 03:17:24 +01:00
David Redondo
c4f897d660 Add xdg-toplevel-drag protocol
This protocol allows applications to request that a window is moved
at the same time as a drag operation - effectively dragging windows.
With this features such as detaching a tab from a window and reattaching
it, dragging tabs between windows or (un)dockable tool windows can
be implemented.
Based on the previously proposed extended drag protocol but trimmed
down.

Signed-off-by: David Redondo <kde@david-redondo.de>
2024-01-30 12:22:26 +00:00
Lleyton Gray
bde1c8712d
staging/drm-lease: fix typo in description
Signed-off-by: Lleyton Gray <lleyton@fyralabs.com>
2023-11-09 13:57:58 -08:00
Sebastian Wick
999e443773 security-context-v1: Make sandbox engine names use reverse-DNS
Specifically this also changes the well-known name for flatpak from
"flatpak" to "org.flatpak". This would be a breaking change but there is
no released version of flatpak yet with security-context support.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-10-24 10:11:33 +00:00
Andri Yngvason
e1abed62d5 Add the transient seat protocol
Signed-off-by: Andri Yngvason <andri@yngvason.is>
2023-10-07 16:54:24 +00:00
Sebastian Wick
5293896cce security-context-v1: Document what can be done with the open sockets
Specifically that after calling create_listener the only valid operation
on the sockets is to close them. They also must stay open and valid
until a round-trip after the call.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-07-11 15:27:14 +02:00
Sebastian Wick
b19ee1a7e3 security-context-v1: Document out of band metadata for flatpak
and specify when the invalid_metadata error will be sent.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-07-11 15:27:02 +02:00
David Redondo
3c1fb30817 xdg-activation: Clarify that the token stays valid if the object is destroyed
Signed-off-by: David Redondo <kde@david-redondo.de>
2023-07-03 09:15:34 +00:00
Simon Ser
12c063088e security-context-v1: new protocol
This is a variation of the unveil protocol I suggested in the Weston
issue about security contexts. This lets sandbox engines such as Flatpak
attach a security context to sandboxed clients. The compositor can then
restrict which features are made available to that client.

The protocol is designed around the assumption that the sandbox engine
uses this protocol when setting up the sandboxed application. After this
inital setup, the sandbox engine isn't necessarily running anymore.
For this reason, a special "close FD" is used to indicate when to stop
the security context listener: the sandbox engine can leak the FD into
the sandboxed app's process, and the OS will automatically close the FD
when the sandboxed app exits.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/wayland/weston/-/issues/206
2023-07-03 09:13:08 +00:00
Simon Ser
f89eb17d55 cursor-shape-v1: new protocol
This is based on the Chromium protocol [1].

[1]: https://chromium.googlesource.com/chromium/src/+/main/third_party/wayland-protocols/unstable/cursor-shapes/cursor-shapes-unstable-v1.xml

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/58
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/21
2023-05-18 10:22:22 +02:00
i509VCB
77b4681f16 Add ext-foreign-toplevel-list protocol 2023-04-25 09:30:56 +00:00