Compare commits

...

462 commits
1.0 ... main

Author SHA1 Message Date
dcz
a6ac326be3 Add xx-keyboard-filter to build
Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2025-12-16 11:34:29 +02:00
dcz
d05776918e Add xx-keyboard-filter protocol
Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2025-12-16 11:34:29 +02:00
dcz
9b0e303048 xx-input-method-v2: Add actions including selection finishing
This update solves the mobile problem of the "enter" key.
It also makes precise cursor placement possible from the IME.

Signed-off-by: Dorota Czaplejewicz
2025-12-16 09:15:32 +00:00
Tadeo Kondrak
a0387bdc70 experimental/text-input: Add actions
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2025-12-16 09:15:32 +00:00
Jonas Ådahl
88223018d1 build: Bump version to 1.47
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-12-15 16:16:01 +01:00
Julian Orth
a5caef14e7 color-management: add wp_image_description_reference_v1
Note that wp_image_description_v1 is not a frozen interface. Therefore
it must always be a descendant of wp_color_manager_v1.

In order to allow other protocols, such as ext-image-capture-source-v1,
to define the equivalent of
wp_color_management_output_v1.get_image_description, we must therefore
create an indirection between the new protocol and
wp_image_description_v1 that is resolved through wp_color_manager_v1
itself.

This is a prerequisite for adding color management support to the
ext-image-copy-capture-v1 protocol.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
2025-12-12 10:53:36 +02:00
Pekka Paalanen
70442afc16 staging/color-management: replace two-piece TF
ICC-based calibrated print workflows have generally used the sRGB
two-piece transfer characteristic. The CRT era monitors were exclusively
power curve, but print workflows used software calibration to meet the
two-piece curve. Everyone else used the monitor native transfer
characteristic.

Acknowledge that both ways exist, and allow describing both as what they
are.

Mesa is already using "srgb" if it is available, for programs that
actually expect gamma22. Exposing "srgb" with its literal definition
would make a compositor (KWin has been named) appear regressing in
picture quality. The same with "ext_srgb" as Mesa used to map
VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT to it, probably incorrectly.

sRGB is specified to use a power-law 2.2 display, and reality is not
consistent. Some compositors take srgb to mean gamma22 already, so there
is practical ambiguity.  There are also endless discussions about which
one sRGB actually is and when: power-law 2.2 or the piece-wise function.
Monitors are manufactured both ways and they are often even switchable
between the two. Therefore deprecate the "srgb" value, it is too easy to
pick and assume one behavior while someone else assumes the other
behavior.

Additionally, extending the range beyond 1.0 would significantly diverge
between srgb and gamma22 because of the different exponent. Assuming
that ext_srgb is identical to srgb for [0.0, 1.0] would conflict with a
compositor that takes srgb as gamma22 but implements ext_srgb by the
piece-wise function.

Given that monitors with the piece-wise function exist or are calibrated
to it, and materials are prepared on them, add a new value explicitly
for the sRGB piece-wise function. Its name deliberately does not include
"srgb".

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-12-12 10:51:10 +02:00
Pekka Paalanen
e2bacdd2ab staging/color-management: forbid advertising deprecated
This puts more pressure in making sure that deprecated items will be
retired.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-12-12 10:51:10 +02:00
Xaver Hugl
949014753c color-management: add absolute_no_adaptation rendering intent
This rendering intent is a modified absolute rendering intent that
assumes the viewer is not adapted to the display white point, so no
white point adaptation between surface and display is done.
This can be useful for color proofing applications.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2025-12-12 10:46:36 +02:00
Pekka Paalanen
1a6f2cec71 staging/color-management: add ready2 event
A 32-bit image description identity number could theoretically wrap
around in 1.4 years if a new one is allocated 100 times per second.

Compositors that avoid 32-bit wrap-around are allowed to aggressively
recycle numbers, which poses a requirement on clients to hold on to the
image description object in order to keep its number live. Clients might
not do so regardless of documentation, and on compositors that recycle
only after wrap-around clients would not see any problems. This could
cause strange issues in clients on former kind of compositors.

In order to avoid all that, introduce a new 64-bit image description
identity number which has no fear of wrap-around, and require such
numbers to be never recycled. This makes the compositor number allocator
trivial, and clients are more likely to handle it correctly by accident.

Fixes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/246

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-12-12 10:43:48 +02:00
Dudemanguy
b0b1010301 staging/color-management: loosen restriction on maxCLL and maxFALL
ANSI/CTA-861-H does not require that maxCLL or maxFALL be within the
Mastering Display Luminance range, and it is common for movies to have a
maxCLL greater than the Mastering Display Luminance. Additionally,
Microsoft's own documentation* contains an example that does not pass
the restriction in the protocol. These values are valid, used in the
real world, and clients should not need to discard them. We keep the
requirement that maxFALL <= maxCLL since that is required, but these
values have no relation to the Mastering Display Luminance.

See #263 for further details on why the restriction on maxCLL and
maxFALL is not desirable. Fixes #263.

*: https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_5/ns-dxgi1_5-dxgi_hdr_metadata_hdr10

Signed-off-by: Dudemanguy <random342@airmail.cc>
2025-12-12 10:41:04 +02:00
Simon Ser
6141e11543 build: bump version to 1.46
Signed-off-by: Simon Ser <contact@emersion.fr>
2025-11-23 22:22:52 +01:00
Pekka Paalanen
ce96b5f177 staging/color-management: target color volume defines the bounds
In an attempt to specify clipping behavior[1] it was found that it would
lead to predictable behavior turning into undefined behavior when a
compositor gains support for extended_color_volume. That would be
awkward.

Instead of specifying clipping to the primary color volume bounds (which
may then disappear), let's leave it undefined, and emphasize the
undefined-ness of exceeding the target color volume instead.

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

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-11-18 16:57:40 +02:00
Simon Ser
0b8283f7f3 ci: upgrade Debian to Trixie
Signed-off-by: Simon Ser <contact@emersion.fr>
2025-11-15 22:55:23 +01:00
Pekka Paalanen
e2af3e97ce staging/color-management: parametric is ICC Display
Make the connection between parametric image descriptions and Display
class ICC profiles, for clarity.

Suggested-by: Dmitry Kazakov (@dimula73)
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-11-04 14:25:08 +02:00
dcz
51e5021a12 experimental: Add text-input to build
Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2025-10-31 10:59:51 +00:00
Xaver Hugl
a652a696db color-management: clarify white point adaptation with parametric descriptions
The adaptation state of the viewer is required for interpreting colors, and
specifically for adapting them to a different white point. This commit defines
it to match existing implementations and display class ICC profiles:
The viewer is assumed to be fully adapted to the primary color volume's white
point.

The mastering display white point is not used for this, as it is both somewhat
unlikely to be relevant for the adaptation state of the content creator, and
also relatively likely to be incorrect in existing images, videos and games.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2025-10-30 15:31:11 +01:00
dcz
f53eb14774 experimental/input_method: Fix typos
Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2025-10-28 14:15:51 +00:00
dcz
c4f1dfbbd0 Start new experimental text-input development
This commit introduces an experimental text-input protocol as a functionally exact copy of text-input-v3.

The goal of this is to arrive at an improved text-input-next protocol, without committing to backwards-compatible changes beforehand.

Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2025-10-28 13:33:25 +00:00
Pekka Paalanen
98f27dcf24 staging/color-management: add normative appendix
It is not possible to write equations nicely in the XML, so we need an
appendix.

First, the appendix explicitly defines the transfer functions that the
protocol enumeration refers to. Leaving them to be inferred from the
ITU-R and other specifications was too confusing.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-10-21 13:18:41 +03:00
Pekka Paalanen
f3e14e4007 staging/color-management: clarify the displayness
There have been complaints that it was not clear everything is
display-referred:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/442#note_3079533

The section in Wayland documentation makes it very clear, so link to it.

Mention the attention to the display explicitly.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-10-21 11:21:49 +03:00
Pekka Paalanen
a5a33944a1 staging/color-management: remove references to H.273
References to H.273 are confusing people:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/442#note_3079717

The confusion arises from H.273 usually referring to encoding standards
which only indirectly define a reference display. Wayland
color-management is only interested in the displays.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-10-21 11:21:49 +03:00
Pekka Paalanen
8271c366e4 staging/color-management: redefine set_luminance
The BT.1886 recommendation is impossible to implement precisely if
min_lum includes other sources than the display emission. BT.1886
transfer function requires L_W and L_B to determine the function
parameters black level lift and gain. The black level lift changes the
non-linearity, and cannot be implemented as an optical addition.

I believe the inclusion of optical additives, particularly the ambient
flare, came from sRGB specification. I do not recall seeing it anywhere
else.

Drop the optical additives from the definitions of the luminances. It
was probably incorrect for everything but sRGB, if they even had it
specified at all. This allows implementing BT.1886 as specified.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-10-21 11:06:31 +03:00
Pekka Paalanen
fff667c829 staging/color-management: remove notes about TF encoding
These wordings have raised confusion around encoding vs. decoding:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36444#note_3036854

Remove them, they didn't contain anything significant for the protocol.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-09-01 14:38:52 +03:00
Simon Ser
57c78b9b8a build: add headers to declare_dependency() sources
Before the dependency is usable, enum headers need to be built.
Fixes missing header files when wayland-protocols is used as a
subproject.

Signed-off-by: Simon Ser <contact@emersion.fr>
2025-08-27 16:15:07 +00:00
Simon Ser
ec65e4366b build: set includedir in pkg-config file
When wayland-protocols is installed to a custom prefix, we need to
point dependencies to that prefix' include dir.

Signed-off-by: Simon Ser <contact@emersion.fr>
2025-08-16 19:37:09 +02:00
dcz
9730142a7f xx-input-method: Clarify when state is reset
Signed-off-by: Dorota Czaplejewicz
2025-08-15 10:16:04 +00:00
dcz
47f7c72171 xx-input-method: fix typos
Signed-off-by: Dorota Czaplejewicz
2025-08-15 10:16:04 +00:00
dcz
6ac53b159f build: Add xx-input-method-v2
Signed-off-by: Dorota Czaplejewicz
2025-08-05 11:25:54 +00:00
Peter Hutterer
6a73aacd7c tablet: fix all comment-references to the zwp_tablet elements
Some of these used wl_tablet or the outdated wp_tablet.
No functional changes, only descriptions are affected.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2025-08-03 11:59:17 +00:00
Xaver Hugl
c61399a0cc xdg-shell: warn about putting UI outside of window geometry
There should only be decoration outside of it, no functional UI elements. This
is especially important on some compositors that clip windows to their window
geometry in some situations (like when it's in a tile).

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2025-08-03 11:38:49 +00:00
Simon Ser
46f46863b7 color-representation-v1: add protocol error for invalid chroma location
Clients are allowed to send any value from the enum (unlike other
requests where only supported values are allowed), however clients
are not allowed to send out-of-enum values.

Signed-off-by: Simon Ser <contact@emersion.fr>
2025-07-24 15:28:22 +00:00
dcz
abd33a52d8 xx-input-method-v2: Define a popup
The original MR did not copy the popup interface because it's been limited and inadequate for actual use.
This introduces a version heavily based on xdg-popup.

Signed-off-by: Dorota Czaplejewicz
2025-07-21 16:12:37 +00:00
Xaver Hugl
efbc060534 staging/ext-background-effect: fix capability value for blur
The value was zero because the enum was not a bitfield at some point when the protocol was
developed and I forgot to change the value to one when making it a bitfield.

This is technically a breaking change, but as the client could never receive the blur
capability before this commit, it won't actually break anything - it was already broken.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2025-06-25 15:51:54 +02:00
0c79b5c96f
xdg-shell: Fix edge constraint typo
Signed-off-by: Mihai Fufezan <mihai@fufexan.net>
2025-06-14 00:06:42 +03:00
Jonas Ådahl
0091197f5c build: Bump version to 1.45
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-06-13 09:38:08 +02:00
Neal Gompa
b3f29d8a41 Add pointer warp protocol
This global interface allows applications to request the pointer
to be moved to a position relative to a wl_surface.

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
Co-authored-by: Matthias Klumpp <matthias@tenstral.net>
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

Signed-off-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2025-06-12 13:53:10 +00:00
Pekka Paalanen
dceda690c0 staging/color-management: recommend gamma22 instead of srgb
https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/wayland_qa.md#q-should-srgb-content-be-decoded-with-the-piecewise-srgb-transfer-function

I found it unfortunate that we left in a TF code that will intuitively
be used incorrectly. It is as if we designed the protocol so that
compositors will need to fix up client image descriptions.

I am not aware of any use case that would want to target a display with
the sRGB piece-wise transfer function, that would be a non-standard
display.

This patch does not help compositors avoid needing to second-guess
client image descriptions using srgb TF, but it at least documents the
situation. We could choose to out-law srgb TF in a minor version bump,
or drop it completely in the next major version. Compositors can also
not advertise support for srgb TF.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-06-10 14:58:26 +03:00
Caitlyn Stewart
c855c8725b single-pixel-buffer-v1: clarify create_u32_rgba_buffer
Signed-off-by: Caitlyn Stewart <caitlynrosestewart@gmail.com>
2025-06-09 08:32:41 +00:00
dcz
3718d0077b text-input-v3: Replace "active"
"Active" is not defined anywhere. The meaning of "focused" can be extrapolated from surfaces to text fields.

Signed-off-by: Dorota Czaplejewicz
2025-06-05 16:23:23 +00:00
dcz
104eda7e1f text-input-v3: Clarify enabling and seats
This fixes the ambiguous language which caused https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/214 .

This also replaces "active" with "enabled" in the next sentence. No "active" state is defined anywhere in the document.

Signed-off-by: Dorota Czaplejewicz
2025-06-05 16:23:23 +00:00
Kirill Primak
f08dbbc7bd ext-workspace: fix a typo in the ext_workspace_handle_v1 description
Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
2025-05-30 19:45:44 +03:00
Xaver Hugl
dac6393216 staging: add ext-background-effect-v1
This protocol allows the client to specify a region behind the surface that should
be blurred, with the intention to improve the visuals of for example panels or
terminals.

This protocol is roughly based on the org_kde_kwin_blur protocol, which has been
in use since 2015. The protocol is made more generically though, so that other
related effects can be added in the future, like for example contrast improvements.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2025-05-26 15:00:56 +02:00
dcz
73b6115799 experimental/input-method: Implement only text-input counterparts
This change strips down the protocol to functionality that corresponds
to text-input-v3, is already useful, typically implemented in the wild
(squeekboard), and well-understood.

Dificult to implement well functionality like keyboard grabs is removed
to find a better solution without stopping the development of the basic
functionality.

Signed-off-by: Dorota Czaplejewicz
2025-05-22 11:00:54 +02:00
dcz
8d1ccbdebe experimental/input-method: Rename to xx_input_method_v2
This is a separate commit so that it's clear the base for this protocol
was just a copy with no changes.

It also includes the protocol in the build system.

Signed-off-by: Dorota Czaplejewicz
2025-05-22 11:00:54 +02:00
dcz
4da04536e8 Start an input-method protocol
This commit introduces an experimental input-method protocol as an exact
copy of the fle describing the unofficial zwp_input_method_v2 from
squeekboard.

It's also supported by wlroots and smithay.

This protocol is the counterpart to text-input-v3. It gives the
compositor a standard way to outsource the handling of the input method.

Signed-off-by: Dorota Czaplejewicz
2025-05-22 11:00:54 +02:00
Jonas Ådahl
eda9bb4651 experimental: Add xx-session-management-v1
This is identical to the experimental version implemented by kwin and
mutter.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-05-05 12:42:16 +02:00
Jonas Ådahl
c446847b7f build: Add 'experimental' protocols
These protocols are not installed; users need to access these files via
methods other than released tarballs, for example via a meson subproject.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-05-05 12:42:16 +02:00
Jonas Ådahl
810f1adaf3 build: Bump version to 1.44
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-04-23 15:57:30 +02:00
zorowk
f564b2312b color-representation-v1: correct 'RSMPTE' to 'SMPTE' in coefficients enum
Signed-off-by: zorowk pengwenhao@uniontech.com
2025-04-23 15:25:47 +08:00
Sebastian Wick
27107e1ba1 staging: add color-representation protocol
This new protocol aims to let clients define the remaining bits of the color
encoding they are using in their buffers.

In particular, this lets clients define the how the alpha has been encoded and
how conversions from YCbCr to RGB take place.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Co-authored-by: Robert Mader <robert.mader@collabora.com>
Co-authored-by: Sebastian Wick <sebastian.wick@redhat.com>
Co-authored-by: Simon Ser <contact@emersion.fr>
Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
2025-04-22 12:49:05 +02:00
Jonas Ådahl
4313a51a17 build: Bump version to 1.43
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-04-08 10:09:10 +02:00
Xaver Hugl
723270ad4a staging: add toplevel tag protocol
The window id protocol allows clients to set a tag for toplevels, which
the compositor can use to identify them even after the application
has been restarted. This persistent identification can be used by the
compositor to restore properties like position, size, "always on top",
and it can also be used for allowing users to create rules that change
compositor behavior for specific windows.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2025-04-02 16:16:43 +02:00
Xaver Hugl
7636151e4a meson: sort protocols alphabetically
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2025-04-02 16:16:24 +02:00
Jonas Ådahl
86750c99ed xdg-shell: Add edge constraints
An edge constraint is an complementery state to the tiled state, meaning
that it's not only tiled, but constrained in a way that it can't resize
in that direction.

This typically means that the constrained edge is tiled against a
monitor edge. An example configuration is two windows tiled next to each
other on a single monitor. Together they cover the whole work area.

The left window would have the following tiled and edge constraint
state:

  [ tiled_top, tiled_right, tiled_bottom, tiled_left,
    constrained_top, constrained_bottom, constrained_left ]

while the right window would have the following:

  [ tiled_top, tiled_right, tiled_bottom, tiled_left,
    constrained_top, constrained_bottom, constrained_right ]

This aims to replace and deprecate the `gtk_surface1.configure_edges`
event and the `gtk_surface1.edge_constraint` enum.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-03-25 09:41:38 +00:00
Simon Ser
00a5b23bfe color-management-v1: fix typo in feature.windows_scrgb
The request is named create_windows_scrgb.

Signed-off-by: Simon Ser <contact@emersion.fr>
2025-03-24 08:57:51 +00:00
Jonas Ådahl
a8d2201f0b build: Bump version to 1.42
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-03-24 09:37:50 +01:00
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
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
Nick Diego Yamane
d5aed4e490 governance: Add chromium as a member project
Signed-off-by: Nick Diego Yamane <nickdiego@igalia.com>
2025-02-21 12:58:12 +00:00
Vlad Zahorodnii
af2716ecfe members: Add Xaver Hugl as a KWin point-of-contact
Xaver is a KWin maintainer.

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2025-02-18 14:32:16 +00:00
Jonas Ådahl
71da8bd7f9 build: Bump version to 1.41
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-02-17 16:34:30 +08: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
Jonas Ådahl
c7b582cb71 build: Bump version to 1.40
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2025-01-30 19:42:36 +08: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
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
Jonas Ådahl
6bcf87d9c1 build: Bump version to 1.39
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-12-20 12:25:32 +01: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
Heiko Becker
fe3d5448be build: Raise required wayland-scanner version to 1.23.0 for tests
It's needed for the deprecated-since attribute [1] introduced with [2],
at least when building the tests, which pass the '--strict' parameter to
wayland-scanner.

[1] ee12e69b8f
[2] 6c214e6dc0

Signed-off-by: Heiko Becker <mail@heiko-becker.de>
2024-11-07 22:47:15 +01:00
Mike Blumenkrantz
9dd051b4a0 governance: update NACK usage/restrictions
with great NACKs come great responsibility:
* if you abuse this power, you should be held accountable
* if you should not be using this power, you should be held accountable

Signed-off-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
2024-11-06 14:21:49 +00:00
Mike Blumenkrantz
169cd3c803 governance: introduce workflow improvements
lots of small issues to resolve

Signed-off-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
2024-11-06 14:20:07 +00:00
Mike Blumenkrantz
11f36fbcf4 add experimental protocols and their requirements
these have a lower bar to clear for inclusion and are intended to
promote rapid development with greater community involvement

Signed-off-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
2024-10-31 11:58:24 +01:00
Daniel Stone
5108f5451a governance: Deprecate wayland-devel@
No-one really uses the list anymore; issues are better.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-10-30 23:08:29 +00:00
Daniel Stone
19a9d06e6c governance: Specify how to change points of contact
It was implicitly understood to be the same mechanism as projects, so
codify that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-10-30 23:08:29 +00:00
Daniel Stone
76edd71fd8 governance: Clarify 'member'
We were using 'member' to generally mean 'member project', but this
wasn't super clear, and sometimes it also meant an individual person.

Clarify it such that project vs. individual is clear where it's
relevant, leaving 'member' only for when it's not relevant.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-10-30 23:08:29 +00: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
Jonas Ådahl
9ac1a0977e build: Bump version to 1.38
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-10-12 08:17:40 -04: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
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
Simon Ser
9e5b8a4e9a governance: drop adoption website section
Originally we wanted to have an official website to document
adoption. However this never materialized.

I don't think the governance document is the right place for this
anyways.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-11 18:13:15 +00: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
Jonas Ådahl
7e8df47b41 members: Add mesa as a member
Mesa is represented by Daniel Stone and Mike Blumenkrantz.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-10-10 03:22:15 +00:00
Jonas Ådahl
42938b7e74 members: Update weston point-of-contact
Daniel Stone will move to represent mesa, and Derek Foreman is taking
his place.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-10-10 03:22:15 +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
657561dcc3 README: Suggest pinging protocol authors on changes
These are usually the best people to review the changes.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-10-09 09:07:11 +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
Simon Ser
c997223583 build: install headers with enums
Generate and install headers containing enums. See [1].

Meson requires us to generate headers in a "include/wayland-protocols"
directory, so that include paths can be properly set up when used
as a sub-project.

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

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-05 15:30:01 +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 Ser
9b95f83a2f xdg-output: mark done event with deprecated-since attribute
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-05 14:35:30 +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
98d8bb6716 ci: upgrade wayland to v1.23.1
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-05 14:35:30 +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
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
Simon Ser
df2b5e5e7b xdg-decoration: add invalid_mode error
There is no error defined for invalid mode values.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-09-03 10:27:40 +00:00
Jonas Ådahl
4878e025a5 build: Bump version to 1.37
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-08-31 09:25:04 +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
YaoBing Xiao
d1d185c61f pointer-gestures: Add punctuation to clarify gesture cycles
Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
2024-08-22 15:32:28 +08: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
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
Simon Ser
7d5a3a8b49 governance: document review requirements
This has been the standard practice but wasn't really documented
anywhere.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-06-19 18:58:05 +00:00
Simon Ser
903f85708e members: trim trailing comma
Smithay/Comsmic only has a single point-of-contact.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-06-17 23:17:16 +02:00
Simon Ser
f51bf51cef readme: recommend using "Draft:" prefix for RFC protocols
GitLab understands the "Draft:" prefix and will mark the MR
accordingly. GitLab used to understand the "WIP:" prefix, but
that's no longer the case.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-06-12 08:36:58 +00:00
Simon Ser
6334324035 readme: use references for links
This avoids breaking the flow of the text when inserting links.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-06-12 08:35:04 +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
Simon Ser
1c36a3f3ca readme: s/Makefile.am/meson.build/
We haven't been using autotools for quite a while.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-05-30 22:53:48 +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
Simon Ser
f573fa11cf ci: don't run pipelines in forks
Currently our CI setup has a downside: for each push on a merge
request, two pipelines are triggered. The first is triggered in
the context of the forked repository, and the second is triggered
in the context of the MR in the parent repository.

Replace the workflow rules with the ones in the official docs [1],
so that a branch pipeline isn't triggered when a MR exists for that
branch.

[1]: https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: fbf7fc3517 ("ci: use detached CI pipelines")
2024-05-09 09:02:52 +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
Jonas Ådahl
24e612f7d7 build: Bump version to 1.36
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-04-26 09:33:20 +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
Jonas Ådahl
08d1c7276d build: Bump version to 1.35
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-04-17 15:08:48 +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
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
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
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
Jonas Ådahl
c7e9c4f5d3 build: Bump version to 1.34
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2024-03-20 18:59:10 +01:00
Simon Ser
8be7ad67fa linux-explicit-synchronization-v1: add linux-drm-syncobj note
The new protocol supersedes this one.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-03-20 12:00:33 +01: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
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
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
Daniel Stone
54346071a5 build: Bump version to 1.33
Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-01-19 13:46:16 +00:00
Simon Ser
7f200185c2 ci: upgrade ci-templates and Debian
Upgrade Debian to bookworm and ci-templates to the latest commit.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-12-27 19:56:50 +01: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
c4f559866f readme: make it clear that we are a standards body
wayland-protocols is more than just a repository of XML files.
Make this clear and link to the governance document and member
list.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-11-24 18:50:43 +00:00
Simon Ser
0c4e041f64 linux-dmabuf: require all planes to use the same modifier
The kernel enforces this. Accepting a separate modifier per-plane is
an historical artifact.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/29
2023-11-24 18:49:18 +00:00
Simon Ser
3ec5924254 readme: version should be included in stable protocol filenames
With the new rules, we always keep the major version, even for
stable protocols.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-11-24 18:47:38 +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
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
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
Simon Ser
479580dbe3 xdg-decoration: remove ambiguous wording in configure event
"ask the client" isn't very clear. Let's use the word "configure"
which is more explicit: the client doesn't have a say in this.
(Note, wording in the following paragraphs is clearer and uses the
word "must".)

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-10-17 12:14:03 +00:00
Simon Ser
079b6011a0 xdg-decoration: fix configure event summary
This was probably carried over from an early draft of the protocol.
This event is not a suggestion as the full description explains:
the client must ack it.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-10-17 12:14:03 +00:00
d70af2ea1e governance: fix typos
Signed-off-by: Vaxry <vaxry@vaxry.net>
2023-10-12 22:12:56 +01:00
9ffeb975c3 README: fix typos
Signed-off-by: Vaxry <vaxry@vaxry.net>
2023-10-12 22:12:56 +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
Simon Ser
a113a93d83 build: add version for stable protocols
Stable protocols used to not have a version. But with the new
rules, they have one. Accomodate the build script for the new
rules.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-10-10 14:42:05 +02:00
Simon Ser
78e38c57bf build: simplify dict loops
Instead of iterating on the keys and then using get(), iterate on
both keys and values.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-10-10 14:42:05 +02: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
Simon Ser
90d13c1112 members: remove EFL/Enlightenment
EFL/Enlightenment hasn't been active in a while, doesn't seem to
have interest in the near future, and Mike is fine with ceasing
their membership. They can always be added back when interest
sparks again.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/146
2023-09-30 01:30:59 +00:00
Simon Ser
e1d61ce940 linux-dmabuf: add note about implicit sync
Make it clear that implicit sync is the expectation without another
protocol extension.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-08-14 14:32:02 +02: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
Jonas Ådahl
681c33c854 build: Bump version to 1.32
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2023-07-03 11:26: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
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
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
Simon Ser
60c6b51097 build: add Wayland subproject
This allows developers to work on a new wayland-scanner feature and
test it with wayland-protocols without too much hassle.

Depends on https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/313

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-05-19 23:34:18 +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
Pekka Paalanen
14ae0a9b15 CI: bump ci-templates
This should fix the following problem when I targeted a MR to
branch 'color' in Sebastian's fork of wayland-protocols:

$ ci-fairy check-commits --signed-off-by --junit-xml=results.xml
Traceback (most recent call last):
  File "/usr/bin/ci-fairy", line 33, in <module>
    sys.exit(load_entry_point('ci-fairy==0.1', 'console_scripts', 'ci-fairy')())
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/ci_fairy.py", line 1335, in check_commits
    for commit in repo.iter_commits(commit_range):
  File "/usr/lib/python3.9/site-packages/git/objects/commit.py", line 318, in _iter_from_process_or_stream
    finalize_process(proc_or_stream)
  File "/usr/lib/python3.9/site-packages/git/util.py", line 370, in finalize_process
    proc.wait(**kwargs)
  File "/usr/lib/python3.9/site-packages/git/cmd.py", line 447, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git rev-list cifairy/color..HEAD --
  stderr: 'fatal: bad revision 'cifairy/color..HEAD'
'

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2023-05-11 15:10:45 +03: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
Simon Ser
cc0cd4addf ci: skip ci-fairy checks on main branch
We merged a commit by mistake which doesn't have S-o-b. ci-fairy is
unhappy about it and will fail the check. Skip it if we aren't
running in a merge request context.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-04-25 13:41:06 +02:00
Simon Ser
fbf7fc3517 ci: use detached CI pipelines
See [1], required to allow contributors to trigger CI pipelines
for MRs. Example failure can be found at [2].

[1]: https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/540#what-it-means-for-me-a-maintainer-of-a-project-part-of-gitlabfreedesktoporg
[2]: https://gitlab.freedesktop.org/i509VCB/wayland-protocols/-/jobs/40117393

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-04-25 09:39:46 +00:00
i509VCB
77b4681f16 Add ext-foreign-toplevel-list protocol 2023-04-25 09:30:56 +00:00
Vlad Zahorodnii
fefd185994 linux-dmabuf: Fix a couple of typos
There are no interfaces such as zlinux_dmabuf_params and zlinux_buffer_params.

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2023-04-18 15:06:04 +03: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
Mikhail Gusarov
275fce4af9 xdg-shell: Clarify relationship between [un]set_maximized and configure
Make it explicit in the protocol that [un]set_maximized and
the following configure event can't be reliably matched, and the
clients shouldn't try to do it.

Closes #106

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2023-03-30 20:47:28 +00:00
Xaver Hugl
5c274ffc90 unstable/xdg-shell v6: clarify when which errors are used
Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
2023-03-30 15:44:07 +00:00
Faith Ekstrand
c622ae7f91 Add a .mailmap file
This will let command-line Git tools re-map my name and e-mail address properly.
I'm using my personal e-mail address and not my Collabora address because I'm
not actively contributing to Wayland anymore and this is mostly for letting
people find me should they dig me up in the project history.

Signed-off-by: Faith Ekstrand <faith@gfxstrand.net>
2023-03-25 11:17:49 -05:00
Jonas Ådahl
94482ceaf9 xdg-output: Remove and tweak contradicting examples
The "logical size" as stated by the first paragraph corresponds to the
monitor size in the global compositor space.

To most clients, this is unnecessary information, and should be ignored,
but some used the listed examples to derive information that contradicts
the very definition of what this event communicates.

One example tried to add surface size assumptions, which was not
correct. Remove this part completely, clients should not try to
configure their surface sizes from the logical size of a monitor.

The other is the list of size examples; it tried to communicate that a
compositor sometimes may not scale the viewport of the monitor in its
global compositor coordinate space, in which case, the logical size
itself matches the actual resolution. Tweak this wording to make that
clear that it does not related to any surface size.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2023-02-27 11:26:25 +00:00
Simon Ser
cf838fd316 xdg-output: clarify goal
In the past, xdg-output had only the logical_position and
logical_size events, then the name and description events were
added. Later on, they were moved inside wl_output since they aren't
desktop-specific. However the goals section of the protocol overview
hasn't been updated accordingly.

Make it clear that this protocol's name and description events should
not be preferred over wl_output.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-02-21 12:31:18 +00:00
Simon Ser
380bdd6ba7 xdg-output-unstable-v1: deprecate name and description
These have been merged into wl_output. Clients should prefer
using wl_output events instead of relying on xdg-output.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-02-12 10:16:21 +00:00
Isaac Freund
a9fbc224cc
ext-session-lock-v1: relicense to MIT
All other protocols in wayland-protocols are released under the MIT
license and this one was only merged with the ISC license by accident.

I am the only person who has touched this protocol in commits and the
only copyright holder, so relicensing to bring this protocol in line
with the rest is easy in this case.

References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/119
Signed-off-by: Isaac Freund <mail@isaacfreund.com>
2023-02-10 12:24:04 +01:00
Isaac Freund
2e1e07e34c ext-session-lock-v1: clarify to fix race
Clients such as swaylock [1] or waylock [2] provide options to fork and
detach from the controlling terminal when the session is locked. The
point of these options is avoid a race on suspending the system. A
command to suspend the system (e.g. zzz) may safely be chained with
e.g. waylock as so:

waylock -fork-on-lock && zzz

However, there is no guarantee that the compositor has actually
blanked all outputs before sending the locked event. Therefore there
is still a race as new "locked" frames may not have been presented on
all outputs before the system is suspended.

On my Linux system at least, the current framebuffer seems to be
preserved on suspend and restored on resume, leading to an "unlocked"
frame potentially being displayed when the system is resumed. Blanking
all outputs before suspend eliminates this vulnerability.

Currently clients could theoretically implement such -fork-on-lock
options a bit better if the compositor supports the presentation-time
protocol, however no clients I've seen currently do this and it seems
wise to make clients to do the right thing by default in this security
sensitive context. The presentation-time protocol is also not sufficient
in all cases, for example if the compositor has turned off power of an
output but still exposes it to clients. In this case the client would
wait forever to get a presentation feedback that will never come.

Unfortunately, the protocol currently states that the locked event will
be sent immediately on creation of the ext_session_lock_v1 object rather
than after all normal content is hidden.

Several different approaches have been considered for how to fix this in
the protocol specification.

One possibility would be to add a new event sent when all normal content
is hidden. This is however opt-in for clients and therefore less likely
to be properly implemented by all clients in practice.

Another alternative is to bump the version of the ext_session_lock_v1
interface and state that the semantics of when the compositor will send
the locked event. However, this still requires clients to opt-in by
binding version 2 of the interface. The compositor could technically
deny the attempts of any version 1 clients to lock the session, but this
would likely be a bad breaking change for users of version 1 clients.
While session lock clients should inform the user in some way that their
attempt to lock the session was denied (e.g. by exiting non-zero) it
does not seem to be the case that such exit codes are widely checked.

The option to fix the protocol that is all around the most secure is
changing the semantics of the locked event without bumping the version
of the interface. This is technically a breaking change, but the failure
mode is that a client relying on the locked event being sent immediately
hangs or crashes and the session stays locked.

I also have been unable to find any session lock client in the wild that
relies on the locked event being sent immediately.

The river wayland compositor [3] in fact already implements the fix for
this race condition since the 0.2.0 release and has not received any bug
reports about broken session lock clients yet.

Therefore, I think that making this technically breaking change to the
protocol is our all around best option in this situation. Prioritizing
security over compatibility seems like the right trade-off to make for a
security critical protocol.

[1]: https://github.com/swaywm/swaylock
[2]: https://github.com/ifreund/waylock
[3]: https://github.com/riverwm/river

Signed-off-by: Isaac Freund <mail@isaacfreund.com>
2023-02-10 11:16:16 +00:00
Isaac Freund
5dc6efded0 ext-session-lock-v1: use RFC 2119 key words
Signed-off-by: Isaac Freund <mail@isaacfreund.com>
2023-02-10 11:16:16 +00:00
Xaver Hugl
930bc8014b staging/drm-lease: clarify connector naming
If the compositor advertises an output as a wp_drm_lease_connector_v1
and as wl_output, it should make the names match to allow clients to
identify the connection between the two outputs.

Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
2023-01-23 17:06:32 +00:00
Simon Ser
1dbb673373 Add merge request template for new protocols
Adds the checklist and the appropriate labels automatically.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-01-23 17:02:37 +00:00
Philip Withnall
37a7b9d387 Fix typo in xdg-activation-v1
Noticed during review in
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/98#note_1003427,
but not changed at the time.

Noticed again in https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3090#note_1606895.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-12-19 12:41:52 +00:00
Jonas Ådahl
4624cfaaf5 build: Bump version to 1.31
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2022-11-29 14:37:41 +01:00
Jonas Ådahl
86f894b637 Add Victoria as Smithay/cosmic-comp member
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2022-11-29 13:30:23 +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
Kenny Levinsen
9bd70a3a87 wp-fractional-scale-v1: new protocol
This protocols allows for communicating preferred fractional scales to
surfaces, which in combination with wp_viewport can be used to render
surfaces at fractional scales when applicable.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
2022-11-28 12:06:10 +01:00
Simon Ser
813e5c23ed governance: improve consistency of ACK requirements
For "ext" and "wp", the document uses the wording "ACKed by at
least 3 members". For "ext", the document uses the wording "ACKed
by at least one other member".

This is confusing, let's just use the same wording everywhere.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-11-23 14:03:42 +00:00
Jonas Ådahl
29e7c27876 build: Bump version to 1.30
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2022-11-21 17:08:24 +01:00
Xaver Hugl
6394f0b4f3 staging: add tearing control protocol
For some use cases like games or drawing tablets it can make sense to reduce
latency by accepting tearing with the use of asynchronous page flips. This
protocol provides a way for clients to indicate whether or not their content
is suitable for this kind of presentation.

Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
2022-11-14 23:44:08 +01:00
Jonas Ådahl
6a85dc1b95 build: Bump version to 1.29
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2022-11-14 12:27:21 +01:00
Manuel Stoeckl
4f18a5baee linux-dmabuf: fix references to tranche_formats
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
2022-11-14 11:08:21 +00:00
i509VCB
6d068c1708
content-type: fix enum name in wp_content_type_v1.set_content_type
This was originally set to `content_type`, but the protocol defines an enum named `type`. This fixes an issue with the protocol that was noticed when binding the protocol in wayland-rs.

Signed-off-by: i509VCB <git@i509.me>
2022-11-05 23:09:59 -05:00
Jonas Ådahl
c3e3d21a9f build: Bump version to 1.28
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2022-11-04 16:42:48 +01: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
Joshua Ashton
8d79352851 xwayland_shell_v1: New protocol
This protocol adds a xwayland_surface role which allows an Xwayland
server to associate an X11 window to a wl_surface.

Before this protocol, this would be done via the Xwayland server
providing the wl_surface's resource id via the WL_SURFACE_ID atom on the
X window. This was problematic as a race could occur if the wl_surface
associated with a WL_SURFACE_ID for a window was destroyed before the
update of the atom was processed by the compositor and another surface
(or other object) had taken its id due to recycling.

This protocol solves the problem by moving the X11 window to wl_surface
association step to the Wayland side, which means that the association
cannot happen out-of-sync with the resource lifetime of the wl_surface.

This protocol avoids duplicating the race on the other side by adding a
non-zero monotonic serial number which is entirely unique that is set on
both the wl_surface (via. xwayland_surface_v1's associate method) and
the X11 window (via. the `WL_SURFACE_SERIAL` atom) that can be used to
associate them, and synchronize the two timelines.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2022-10-28 03:02:49 +01:00
Jonas Ådahl
e631010ab7 build: Bump version to 1.27
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2022-10-10 10:20:28 +02: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
03ae934d65 build: alphabetically sort list of staging protocols
This helps with merge conflicts when a protocol is merged. This is
also more consistent with the other protocol lists above.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-03 22:58:13 +02:00
Emmanuel Gil Peyrot
c60529087d staging/content-type: Content type hint support
This protocol lets clients advertise which kind of content they expect
to be displayed on a given surface, so that the compositor can make more
informed decisions about its behavior and output configuration.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
2022-10-03 22:51:02 +02:00
Simon Ser
dc625d5acf ext-idle-notify: new protocol
This patch adds a new ext-idle-notify protocol. It allows clients to be
notified when the user is idle. Use-cases include e.g. power management
daemons.

This protocol is based on the org_kde_kwin_idle interface already being
used by KDE and wlroots compositors. The protocol has been sent to
wayland-protocols in 2015 [1]. This version renames and clarifies the
interfaces, and addresses the review comments.

[1]: https://lists.freedesktop.org/archives/wayland-devel/2015-December/026045.html

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/8
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2022-10-03 20:46:21 +00:00
Isaac Freund
b784987ae8 ext-session-lock: add note on client termination
See https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/262

Signed-off-by: Isaac Freund <mail@isaacfreund.com>
2022-09-26 17:14:43 +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
Jonas Ådahl
83866f19d3 build: Bump version to 1.26
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2022-07-07 16:28:55 +02:00
Simon Ser
3f90354eb5 single-pixel-buffer: new protocol
This protocol allows creating single-pixel buffers. It can be useful
to avoid having to allocate a real buffer just to fill it with the
same pixel value. Some use-cases include drawing background surfaces
or toplevel decorations.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-07-07 08:35:48 +00: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
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
Simon Ser
7350cbefd8 build: stop using deprecated Meson functions
Fixes the following warning:

    NOTICE: Future-deprecated features used:
     * 0.55.0: {'ExternalProgram.path'}
     * 0.56.0: {'dependency.get_pkgconfig_variable'}

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-06-04 09:57:21 +02:00
Alexandros Frantzis
eb115b3137 readme: Mandate proper use of RFC 2119 keywords
This mandate makes explicit a practice that's already established in
the writing of the protocol descriptions, and officially clarifies the
meaning of the keywords for readers.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2022-06-01 16:49:06 +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
Simon Ser
db85bc1467 members: add Simon Zeni for wlroots/Sway
Simon Zeni has stepped up as a member for wlroots/Sway.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-03-29 10:56:46 +02:00
Carlos Garnacho
37fa0f4a4e text-input: Reword the interpretation of serials to be more specific
Here's a long story. The serial is formerly described as:

  When the client receives a done event with a serial different than the
  number of past commit requests, it must proceed as normal, except it
  should not change the current state of the zwp_text_input_v3 object.

Upon first reading it might be obvious to interpret "proceed as normal"
as "apply the changes made by the done event" and "not change the current
state" as "do not make requests on it until serial matches with
expectations again". This would turn the serial into a flow control
mechanism to avoid pushing state changes that we know might be stale.

GTK however makes another outlandish interpretation, where "proceed as
normal" means "ignore the changes made by the done event" and "not change
state of the zwp_text_input_v3 object" is "not change client state". This
makes the serial a full synchronization mechanism where IM commands that
are deemed out of sync are symply ignored.

This would seem a misinterpretation of the protocol, and I proceeded to
change the behavior in GTK. Then some deja vu feeling struck me and I found
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/384#note_344864, this
change was already done and discussed in the past. Not just that, it is
the right interpretation.

However, there's some notable disadvantages, there's 2 easy ways to
completely break the synchronization between compositor and client:
Having the IM push new state too often (i.e. multiple consecutive
.done events), or having the client .commit too often. If any of both
peers gets ahead of the other slightly, the end result is ignored input.
More specifically, IBus has no provision for this kind of transactional
behavior (probably other IMs too), so implementing "emit .done once after
a set of changes" is not quite possible.

Arguably, ignoring IM input is also a bad thing. IMs expect all commands
to be respected and applied in order and might even rely on that in
their own internal state. Since only state changes are flushed on .done
events, partially ignoring IM commands will end up with the client IM state
out of sync.

The usecase described at that GNOME gitlab comment (edited text changes
happening in parallel to IM interaction) trades the handling of an
inherently racy corner case with the worst kind of mishandling (ignoring
user input) if IM/client don't perfectly sync up.

On the other hand, the flow control approach is more lenient with IMs and
clients "getting a step ahead", and more importantly does not punish the
user whenever either IM/client happens to do that. Double down on this
(already intuitively correct) description, and specify further what it
implies.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
2022-03-29 07:33:38 +00:00
Simon Ser
39c014cc9d members: say goodbye to Drew DeVault
Drew is no longer involved in Wayland development and has expressed
interest in being removed from the wayland-protocols project.

Thanks for all your contributions throughout the years, Drew!

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-03-25 10:28:24 +01:00
Tadeo Kondrak
1293ff146e staging/drm-lease: Annotate destructor event
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2022-02-25 14:22:20 -07:00
Tadeo Kondrak
8498e4c10d linux-explicit-synchronization: Annotate destructor events
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2020-06-11 14:22:55 -06:00
Tadeo Kondrak
bbb683eb79 fullscreen-shell: Annotate destructor events
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2020-06-11 14:22:39 -06: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
Tadeo Kondrak
6a7c97988e build: Bump wayland-scanner version to 1.20.0
Wayland 1.20.0 adds support for the type attribute to mark events as
destructors.

Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2022-02-25 14:30:39 -07:00
Simon Ser
7e2d9e381e ci: upgrade wayland to 1.20.0
This will be useful to use features introduced in wayland 1.20,
e.g. event destructors.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-02-23 07:40:03 +00:00
Simon Ser
4cc189f2a0 ci: add meson-logs artifacts
Makes it easier to investigate CI failures.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-02-23 07:40:03 +00:00
Jonas Ådahl
d324986823 build: Bump version to 1.25
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2022-01-26 15:54:02 +01: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
Simon Ser
c2ceb5f14d linux-dmabuf: fix typo in dev_t example code
dev_t is not a struct, it's a typedef.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-01-17 14:54:49 +00:00
Isaac Freund
a52b8f025a
ext-session-lock-v1: new protocol
This protocol allows for a privileged Wayland client to lock the
session and display arbitrary graphics while the session is locked.

The client is responsible for performing authentication and informing
the compositor when the session should be unlocked. If the client
dies while the session is locked the session remains locked, possibly
permanently depending on compositor policy.

Signed-off-by: Isaac Freund <mail@isaacfreund.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-12-28 17:23:03 +00: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
Jonas Ådahl
bb7b3985ed build: Bump version to 1.24
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-11-23 10:10:40 +01:00
Simon Ser
c62be976d7 linux-dmabuf: send protocol error on invalid format/modifier
Now that compositors must send INVALID to advertise support for
implicit modifiers, we can make it a protocol error to add a
DMA-BUF plane with an unsupported format + modifier pair.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2021-11-23 09:52:53 +01:00
Simon Ser
8a5cd28a0e unstable/linux-dmabuf: add wp_linux_dmabuf_feedback
On multi-GPU setups, multiple devices can be used for rendering. Clients
need feedback about the device in use by the compositor. For instance,
if they render on another GPU, then they need to make sure the memory is
accessible between devices and that their buffers are not placed in
hidden memory.

This commit introduces a new wp_linux_dmabuf_feedback object. This
object advertises a preferred main device, a set of preferred
formats/modifiers and target devices.

Each object is bound to a wl_surface and can dynamically update its
feedback parameters. This enables fine-grained per-surface
optimizations. For instance, when a surface is scanned out on a GPU the
compositor isn't compositing with, the target device can be set to this
GPU to avoid unnecessary roundtrips.

A feedback object can also be standalone for clients that don't support
per-surface feedback.

Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Closes: https://gitlab.freedesktop.org/wayland/wayland/issues/59
2021-11-23 09:47:24 +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
Simon Ser
40cb7d47e6 linux-dmabuf: add note about pre-multiplied alpha
Add a note about pre-multiplied alpha for all DRM formats.
Include an escape hatch in the spec to allow other protocol
extensions to override this.

Essentially the same as [1].

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

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-11-10 15:01:34 +00:00
Simon Ser
61038f8a19 Drop autotools
It's been a few releases that we ship Meson support, we should be
able to drop the old autotools build system now.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-11-09 13:45:33 +01: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
Alex Richardson
82c89e8fe7 tests: check whether -Wl,--unresolved-symbols=ignore-all is supported
When linking for macOS, this linker flag is rejected. Instead of
always passing it, we can check whether it is supported first.

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-10-11 11:13:31 +01:00
Alex Richardson
78f654ed95 tests: allow cross-compiling the tests
I am trying to cross-compile from macOS for FreeBSD and this is currently
failing since the tests attempt to build a native binary that links
against the wayland-client and wayland-server libraries for the FreeBSD
system. I believe we should be building them for the target system and
not the current host (especially since there is no way to build
wayland-client and wayland-server for macOS, but I do want to check that
the files build correctly for FreeBSD).

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-10-04 10:24:23 +01:00
Fabrice Fontaine
80e97bd00b meson.build: wayland-scanner is only needed for tests
wayland-scanner is only needed for tests so don't require it if tests
are disabled

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-09-19 11:31:59 +02:00
Jonas Ådahl
cd15394361 build: Bump version to 1.23
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-09-15 14:50:30 +02:00
Peter Hutterer
824cea61e6 pointer-gestures: add hold gestures
Hold gestures merely denote "there are fingers on the touchpad but they are
not moving". As touchpad touches are generally fully abstracted, a client
cannot currently know when a user is interacting with the touchpad without
moving - no motion events will be sent in this case.

The two use-cases here are:
- hold-to-interact: where a hold gesture is active for some time
  a menu could pop up, or some object is selected, etc.
- hold-to-cancel: where e.g. kinetic scrolling is currently active, the start
  of a hold gesture can be used to stop the scroll

Since hold gestures by definition do not have movement, there is no need for
an "update" stage in the gesture.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-09-13 09:07:46 +00:00
David Edmundson
37c6035167 Set Vlad Zahorodnii as kwin maintainer
Signed-off-by: David Edmundson <davidedmundson@kde.org>
Signed-off by: Eike Hein <hein@kde.org>
2021-09-09 13:07:55 +01:00
Jonas Ådahl
b631f502b7 build: Bump version to 1.22
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-09-01 09:45:32 +02:00
Simon Ser
e9a88a2e6c build: only require C/C++ compilers for host
We use the no-op executables in test() directives, so these will be
run on the host. This fixes the following warning:

    tests/meson.build:23: WARNING: add_languages is missing native:, assuming
    languages are wanted for both host and build.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-09-01 09:26:17 +02:00
Simon Ser
9bc93d3ad2 build: fix indentation in tests/meson.build
The rest of the file uses tabs, not spaces.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-09-01 07:15:50 +00:00
Simon Ser
26843d6155 build: declare dependency for use as a subproject
This allows clients and compositors to easily use wayland-protocols
as a Meson subproject.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-09-01 07:14:00 +00:00
Daniel Stone
62e862fac4 tests: Include libwayland cflags/ldflags
When we're building C++ test executables, make sure we pull in the
correct libwayland headers, to avoid trying to compile against a version
different from the scanner we built it against.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-28 20:54:26 +01:00
Simon Ser
7dffa6f346 readme: fix unformatted label references
The newlines prevent the labels from being properly formatted.
Additionally, the second label reference has a typo (extra "s").

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-08-06 09:08:56 +02:00
Xaver Hugl
aa3df4084a staging/drm-lease: DRM lease protocol support
DRM leasing is a feature which allows the DRM master to "lease" a subset
of its DRM resources to another DRM master via drmModeCreateLease, which
returns a file descriptor for the new DRM master. We use this protocol
to negotiate the terms of the lease and transfer this file descriptor to
clients.

In less DRM-specific terms: this protocol allows Wayland compositors to
give over their GPU resources (like displays) to a Wayland client to
exclusively control.

The primary use-case for this is Virtual Reality headsets, which via the
non-desktop DRM property are generally not used as desktop displays by
Wayland compositors, and for latency reasons (among others) are most
useful to games et al if they have direct control over the DRM resources
associated with it. Basically, these are peripherals which are of no use
to the compositor and may be of use to a client, but since they are tied
up in DRM we need to use DRM leasing to get them into client's hands.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2021-08-06 07:03:19 +00:00
Roman Gilg
7460f79e4b xdg-activation: rewrite and move description of token forwarding
After a requesting client receives a new token, the client usually forwards the
token string to another client by a different process, which then uses the
token in an activate request. For that the token string must be transferred to
the other process.

Two default ways of doing that were described in the done event, but the
description had some issues and it makes more sense to describe them in the
protocol description itself, which talks about the protocol in a more general
way. Therefore rewrite the paragraphs about token forwarding between clients
and place them in the protocol description.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
2021-08-04 15:20:35 +00:00
Roman Gilg
855786de91 xdg-activation: correct sequence when X11 client spawns Wayland client
The Wayland client requests surface activation directly using the token
that it received from the X11 client.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
2021-08-04 15:20:35 +00:00
Roman Gilg
e7183fb762 xdg-activation: use rst inline code
rst requires two backticks to format text as inline code.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
2021-08-04 15:20:35 +00:00
Roman Gilg
7391c8e42f xdg-activation: use rst link
Instead of writing the link in brackets use the rst link functionality.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
2021-08-04 15:20:35 +00: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
Simon Ser
36cee4bdbc xdg-activation-v1: clarify set_{serial,surface}
Make it clearer what the requests are used for.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-07-01 20:38:30 +00:00
Simon Ser
353ffc65ff readme: mention the DCO
We haven't mentionned the DCO anywhere, yet we were requiring all
contributions to have a Signed-off-by line to accept it.

Add a reference to the DCO in our README's "development procedure"
section.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-06-25 10:14:13 +02:00
Xavier Claessens
cb38399d36 tests: Fix build with -Wextra
Unused arguments warnings are treated as errors in those tests
otherwise.

Fixes: #53.

Signed-off-by: Xavier Claessens <xavier.claessens@collabora.com>
2021-06-23 14:30:50 -04:00
Manuel Stoeckl
f01202f4b7 xdg-output: fix minor calculation error
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-06-07 17:10:59 +00:00
Vlad Zahorodnii
577bdce99d xdg-activation: Fix an inconsistency
The spec uses the terms "presentation token" and "activation token"
interchangeably, which can cause confusion.

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2021-06-07 16:50:13 +00:00
Issam E. Maghni
9eb8819bb1 tests: use dynamic python path
Stop hardcoding the Python path to /usr/bin/python3. Not all systems
have Python installed to /usr/bin, and some users might have installed
Python to a custom location.

Instead, use /usr/bin/env, which performs a $PATH lookup to find the
Python executable.

Signed-off-by: Issam E. Maghni <issam.e.maghni@mailbox.org>
2021-06-03 13:25:00 -04:00
Simon Ser
b4ecb55e07 members: add GitLab usernames
Add GitLab usernames for all members, so that they can easily be
mentionned in merge requests or issues.

The only missing username is for Alan Griffiths, I don't think they
have a GitLab account at the moment.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-05-18 17:53:22 +00:00
Jonas Ådahl
177ff9119d build: Bump version to 1.21
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-04-30 18:27:52 +02:00
Jonas Ådahl
2e92d3460d Makefile.am: Include meson-only files
This makes it possible to use both autotools and meson to build and
install the tarball.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-04-30 16:14:29 +02:00
Carlos Garnacho
2939d4a05e staging/xdg-activation: Describe interoperation with X11
X11 had its own startup notification protocol, describe how could Wayland
compositors implement interoperation between Wayland and X11 clients,
should this be desired.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
2021-04-30 14:26:54 +02:00
Aleix Pol
032a0bdc9b Include a new xdg_activation protocol
Signed-off-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2021-04-30 14:26:50 +02:00
Jonas Ådahl
5381e39bab Replace unstable with staging
Time has told us that the effort going from `unstable` to `stable` is
enough of a burdon meaning very few protocols are ever declared stable.

To mitigate this, and thus avoid having protocols being "stuck" being
"unstable" indefinitely, replace the "unstable" -> "stable" procedure
with a "staging" -> "stable" procedure, where declaring a protocol
stable does not involve any changes to any implementations.

The only side effect of this is that version numbers are to forever be
part of all interface names and protocol XML files.

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

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-04-14 07:49:16 +00:00
Simon Ser
b1670b4dda xdg-foreign: add error enums
The protocol states that the client must provide xdg_toplevel surfaces,
but doesn't specify protocol error values that can be sent by the
compositor.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-04-14 07:09:55 +00:00
Peter Hutterer
17bef0eddd pointer-gestures: correct description of pinch
This is being picky, but "pinch/spread" is the physical gesture, zoom and
rotate is the effect that clients provide in response to that gesture.
Let's use pinch only here since spread is more ambiguous in english, as anyone
who's ever had butter on their bread would know.

Also, everything else is referring to it as pinch anyway, so zoom/rotate here
is the odd one out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-13 11:22:09 +10:00
Vlad Zahorodnii
af29ece33c fullscreen-shell: Clarify that present requests assign a surface role
Currently, the spec doesn't say explicitly that present requests assign
a surface role. Given that, it can be viewed as the protocol modifies
an already assigned surface role, e.g. xdg-toplevel, and present requests
only act as hints.

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2021-04-05 07:55:14 +00:00
Simon Ser
3683a5eb66 linux-dmabuf: clarify what mixed valid/INVALID modifiers mean
This commit makes it clear that compositors can send valid modifiers and
DRM_FORMAT_MOD_INVALID for a given format. This means that the compositor
supports both implicit and explicit modifiers. See the warning further
down:

> Warning: It should be an error if the format/modifier pair was not
> advertised with the modifier event. This is not enforced yet because
> some implementations always accept DRM_FORMAT_MOD_INVALID. Also
> version 2 of this protocol does not have the modifier event.

Xwayland already requires compositors to send DRM_FORMAT_MOD_INVALID
for importing buffers with an implicit modifier [1].

In a future protocol version, it would be nice to make it a protocol
error (or at least a soft failure) to use any format/modifier pair that
wasn't advertised. A use-case for this is Vulkan compositors: the Vulkan
DMA-BUF extensions require an explicit modifier and cannot import
buffers which have an implicit modifier.

[1]: 6c51818a0f/hw/xwayland/xwayland-glamor-gbm.c (L328)

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-03-31 07:24:53 +00:00
Jonas Ådahl
42da22947b ci: Make the FDO_UPSTREAM_REPO variable global
ci-fairy doesn't know how to to look at $CI_MERGE_REQUEST_PROJECT_PATH
right now, so if we don't manually set $FDO_UPSTREAM_REPO, ci-fairy will
(without verbose logging turned on) silently fall back on the source
repository project path for finding the branch point. This might fail if
the owner of the source repository hasn't updated the `master` branch of
their fork.

Related: https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/32

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-03-31 08:44:50 +02:00
Jonas Ådahl
0cf92d7ad1 ci: Use ci-fairy to check for Signed-off-by
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-03-26 17:29:51 +00:00
Jonas Ådahl
1ad48a50a4 build: Fix wayland-protocols.pc when using autotools
"datadir" is not the same thing in meson and autotools.

In autoconf "datadir" is "${datarootdir}", which expands to
"${prefix}/share". @datarootdir@ expands to "${prefix}/share". There
seems to be no variable that expands to "share".

In meson "datadir" is "share".

So, avoid the "datadir" variable, just expand "datarootdir" it manually
instead. This unbreaks the recently broken autotools setup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-03-26 18:12:27 +01:00
Jonas Ådahl
5a2611b7ad ci: Add test-meson step
Apart from the autotools build system, also test the meson build system.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-03-26 15:50:36 +01:00
Jonas Ådahl
1e52414765 ci: Switch to upstream ci-templates and use Debian bullseye
This switches to the ci-templates that is found on
https://gitlab.freedesktop.org/freedesktop/ci-templates/

While at it, switch to Debian bullseye, as this contains more reasonably
versioned build tools, i.e. a new enough version of meson.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-03-26 15:50:36 +01:00
Jonas Ådahl
5cb6b92f01 tests: Add compile tests
Only tested by the meson build system.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-03-26 15:50:36 +01:00
Jonas Ådahl
79b9a42514 Add meson build system support
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-03-26 15:50:36 +01:00
Pekka Paalanen
f899eff0a7 linux-dmabuf: no buffer errors on device disappearance
This was prompted by the discussion from
https://lists.freedesktop.org/archives/dri-devel/2020-May/266611.html
which is not the final wording.

When a DRM device is hot-unplugged, particularly if it is the Wayland
compositor's compositing GPU, EGL may start returning errors from trying to use
the client's dmabuf. Or, if the client is rendering on another GPU which gets
hot-unplugged, the dmabuf the compositor already has may start failing.

Hot-unplug is an abrupt global action, and there is no way a client or a
compositor could ensure they clean up before things start failing. It is not
the client's fault, so the client should not get disconnected if already
existing wl_buffer objects start failing. This patch add the wording to the
protocol to this effect.

The intention is that the compositor replaces the failed buffers with some
placeholder content. There is no way this could be glitch-free. In its own pace
the client should discover the DRM device is gone, clean up, and perhaps use
something else. How exactly that should happen depends on the rendering API the
client is using.

This is a tiny step towards making DRM device hot-unplug not crash
applications that wish to handle the unplug gracefully.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-16 11:32:58 +02:00
onox
d10d18f3d4
text-input: Add enum attributes to various arguments
Signed-off-by: onox <denkpadje@gmail.com>
2021-01-05 19:37:16 +01:00
onox
ab3c1d5682
fullscreen-shell: Add enum attributes to various arguments
Signed-off-by: onox <denkpadje@gmail.com>
2021-01-05 19:37:02 +01:00
onox
0bb5f5fe68
linux-dmabuf: Add enum attribute to 'flags'
Signed-off-by: onox <denkpadje@gmail.com>
2021-01-05 19:36:32 +01:00
onox
d56d737dbb
pointer-constraints: Add enum attribute to 'lifetime'
Signed-off-by: onox <denkpadje@gmail.com>
2021-01-03 19:26:44 +01: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
Bhushan Shah
4ed0cafeef text-input: document behavior regarding multiple text-inputs
Currently protocol does not specify what should happen if multiple
text-inputs are created by same client, which is why this is more or
less undefined behavior currently in compositor implementations.

If client has created more than one text-input objects and surface owned
by the client is focused, then compositor must send enter event to all
text-input objects, in case of enable request however only one
text-input must be enabled per client per seat.

Signed-off-by: Bhushan Shah <bshah@kde.org>
2020-11-03 20:16:27 +05:30
Roman Gilg
3a74660e94 Update point-of-contact for KDE 2020-10-15 23:44:07 +02:00
Jonas Ådahl
91bfada605 README.md: Add some merge request triaging conventions
Add documented Gitlab procedures to help protocol reviewers and
maintainers to get a better picture of the state of merge requests. To
make this more reliable, document procedures how to triage and manage
merge requests using labels.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2020-10-14 09:45:06 +00: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
b0a25f26d3 configure.ac: Bump version to 1.20
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2020-02-29 20:56:39 +01:00
Jonas Ådahl
035ffeddd6 Makefile.am: Also distribute README.md, GOVERNANCE.md and MEMBERS.md
README was distributed by default due to implicit autotools rules, so
when we renamed to README.md, it stopped being included. While at it,
also add the two other new files.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2020-02-29 20:55:11 +01:00
Jonas Ådahl
8f6095f242 configure.ac: Bump version to 1.19
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2020-02-29 19:01:12 +01: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
Johan Klokkhammer Helsing
5664ca1ef5 Update point-of-contact for Qt
Eskil is the team lead for the Qt Oslo Graphics team.
2020-02-25 15:24:11 +01:00
Ivan Molodetskikh
82d4c152a5
xdg-shell: add missing enum attribute to resize
This helps binding generators such as the one in wayland-rs.

Signed-off-by: Ivan Molodetskikh <yalterz@gmail.com>
2020-01-22 11:53:03 +03:00
Simon Ser
733de76221 Convert plaintext documents to Markdown
This converts GOVERNANCE, MEMBERS and README to Markdown documents.
These are only cosmetic changes, the actual contents and wording have
been retained.

GitLab pretty-prints Markdown and adds anchors. We can now add links
from one document to another.

Unfortunately GOVERNANCE lettered lists have been converted to numbered
lists, because Markdown doesn't support the former.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/issues/3
2019-12-18 17:42:23 +00:00
Simon Ser
f4c76c4cc5
Add .gitlab-ci.yml
The script runs automated protocol validation checks. The image is
generated using fd.o CI templates [1].

[1]: https://gitlab.freedesktop.org/wayland/ci-templates

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/issues/5
2019-11-21 15:46:50 +01:00
Simon Ser
6d0fc70656
readme: changes should be submitted via GitLab
510188250e ("Add governance document") adds a GOVERNANCE document
describing development based on GitLab merge requests. Update the README
file accordingly.

Some information is duplicated across README and GOVERNANCE, this is
intentional to make README provide a more human-friendly, less
bureaucratic version. GOVERNANCE is still the authoritative version.

Signed-off-by: Simon Ser <contact@emersion.fr>
2019-11-21 13:47:56 +01:00
Simon Ser
3c30276063
Add .editorconfig
This allows editors to pick up the correct indent style for *.xml files.

Signed-off-by: Simon Ser <contact@emersion.fr>
2019-11-20 22:55:15 +01:00
Simon Ser
510188250e
Add governance document
The idea of a better-defined governance model for wayland-protocols has
been discussed for quite a while [1].

A new GOVERNANCE document describes how changes to the wayland-protocols
repository are accepted. A set of members representing projects can vote
on merge requests sent via GitLab. The initial list of members is
available in the MEMBERS file.

[1]: https://lists.freedesktop.org/archives/wayland-devel/2019-February/040076.html

Signed-off-by: Drew DeVault <sir@cmpwn.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Acked-by: Johan Helsing <johan.helsing@qt.io>
Acked-by: Roman Gilg <subdiff@gmail.com>
Acked-by: Christopher James Halse Rogers <raof@ubuntu.com>
Acked-by: Alan Griffiths <alan.griffiths@canonical.com>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
Cc: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: Carlos Garnacho <carlosg@gnome.org>
Cc: David Edmundson <david@davidedmundson.co.uk>
2019-11-20 22:21:20 +01:00
Ivan Molodetskikh
fad3a831d4 presentation-time: add missing bitfield marker
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Victor Berger <victor.berger@m4x.org>
2019-09-06 14:59:59 +03:00
Jonas Ådahl
630fb08910 configure.ac: Bump version to 1.18
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2019-07-25 11:19:17 +02:00
Simon Ser
048102f21a xdg-output: make xdg_output.description mutable
The output description is a human-readable text describing the output. Unlike
the name which uniquely identifies the output, it's intended to be displayed to
the user.

It might be desirable for a compositor to update an output's description. For
instance, when only one output is plugged in, it's not necessary to dump make,
model, serial and connector to the description, something like "Dell U2717D" is
enough. However when two identical outputs are plugged in it's necessary to add
e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
a discussion about this.

This commit bumps xdg_output's version to allow compositors to update the
property.

[1]: https://github.com/swaywm/wlroots/issues/1623

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
2019-07-25 11:19:02 +02:00
Jan-Marek Glogowski
e0d6ad1d5e xdg-shell: use case to change the app ID at runtime
LibreOffice is one big binary with explicit brandings for different
application modules. This is represented in X11 by a different
WM_CLASS setting for a window. The WM_CLASS is changed based on the
loaded document at runtime. As a result LibreOffice already offers
multiple desktop files with different icons, StartupWMClass
entries and application names.

This amendment of the set_app_id request just explicitly specifies
the use case to change a surfaces' app ID at runtime, so a compositor
implementor is made aware of it. Just as the WM_CLASS, a change of
the app ID should result in an update of the propertes of a surface
depending on the app ID, like the window icon specified in the
desktop file or a re-grouping of the surfaces in a task manager.

Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2019-07-17 13:43:00 +02:00
Simon Ser
b9d427dbc6 pointer-gestures: add a release request
This allows clients to destroy a gesture object before they disconnect.

The request isn't named "destroy", as this would conflict with
wayland-scanner's auto-generated destructor (which just destroys the
client-side object without sending any request).

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2019-07-17 10:28:43 +02:00
Simon Ser
962dd53537 xdg-output: deprecate the xdg_output.done event
This commit makes it so a wl_output.done event is guaranteed to be sent with a
xdg_output.done event.

This protocol change has been discussed in a recent xorg-devel discussions [1].

First let's recap why a change is needed: Xwayland listens to both wl_output and
xdg_output changes. When an output's properties change, Xwayland expects to
receive both a wl_output.done event and an xdg_output.done event. If that's not
the case, Xwayland doesn't update its state (so old state is still exposed to
X11 clients).

Most of the time, both objects will be updated at the same time (e.g. the
current mode is changed, so both wl_output.mode and xdg_output.logical_size are
sent) so this won't be an issue. However in some situations only one of
wl_output or xdg_output changes. For instance:

- The mode is changed at the same time as the scale, resulting in the same
  logical_size.
- The compositor doesn't expose the outputs' position via wl_output, so whenever
  the position changes only xdg_output is updated.

Both KDE [2] and wlroots [3] have experienced this issue.

For this reason, I'd like to update the xdg-output protocol to make it mandatory
to always send a wl_output.done event after xdg_output changes. This effectively
makes wl_output.done atomically apply all output state (including the state of
add-on objects like xdg_output). This approach is pretty similar to
wl_surface.commit: this request will atomically apply surface state including
the state of e.g. the xdg_surface object tied to the wl_surface.

To update the protocol to reflect this new requirement we can either:

- **Bump xdg_output version**. The current protocol doesn't specify that
  wl_output.done must be sent, adding this new requirement would be a breaking
  change. We need to fix Xwayland for the current xdg_output version (maybe make
  it non-atomic for the current version, atomic for the new one?). Should we
  deprecate xdg_output.done in the new version?
- **Don't bump xdg_output version**. This clarifies what is expected in practice
  by Xwayland, a major xdg_output consumer, and what is currently implemented by
  all compositors.

There's one issue with the "don't bump" approach: indeed in practice compositors
always send wl_output.done and xdg_output.done in pairs, however the ordering
between those two events is not guaranteed. This means some compositors might
send this sequence:

    wl_output.geometry(…)
    wl_output.done()
    xdg_output.logical_position(…)
    xdg_output.done()

In this case the wl_output.done event fails to atomically apply the xdg_output
state.

For this reason, I think bumping the version is a better approach.

This commit also deprecates xdg_output.done, which doesn't have any purpose
anymore.

[1]: https://lists.x.org/archives/xorg-devel/2019-April/058148.html
[2]: https://phabricator.kde.org/D19253
[3]: https://github.com/swaywm/sway/issues/4064

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2019-07-17 10:04:25 +02:00
Jonas Ådahl
536243111b xdg-shell/README: Update E-mail address
As requested by Mike, update the E-mail address listed in the README.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2019-05-22 17:55:41 +02:00
Chia-I Wu
fb9b2a8731 linux-dmabuf: clarify DRM_FORMAT_MOD_INVALID
DRM_FORMAT_MOD_INVALID means to derive the modifier from the dmabuf.
It provides legacy support and makes it easier to replace wl_drm.

v3: DRM_FORMAT_MOD_INVALID must be advertised to be supported (which
    requires a version bump)
v4: no version bump, but a note for now

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2019-05-02 12:30:32 +01:00
Sebastian Krzyszkowiak
70ed9d7ee8 xdg-shell: fix a typo
Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-01-17 16:57:49 +02:00
Alexandros Frantzis
57423eac60 linux-explicit-synchronization: Clarify implicit synchronization guarantees of release events
Clarify that after zwp_buffer_release_v1 events, otherwise unused
buffers can be reused without any additional implicit synchronization.
This is in contrast to wl_buffer.release, which doesn't guarantee that
implicit synchronization is not required to safely use a buffer after
the event is received.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2018-12-14 14:01:54 +02:00
Alexandros Frantzis
08903bdf90 linux-explicit-synchronization: Warn about using the protocol while using graphics APIs
Graphics APIs are expected to use this protocol under the hood, and
since there can only be one user of explicit synchronization per
surface, warn about using the protocol directly in such cases.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2018-12-14 14:01:54 +02:00
Alexandros Frantzis
47914962d8 linux-explicit-synchronization: Allow fences with opaque EGL buffers
Add opaque EGL buffers to the supported buffer types for use with the
explicit synchronization protocol. Opaque EGL buffers rely on the same
EGL implementation in both the compositor and clients, which makes it
straightforward to manage client expectations about fence support for
such buffers.

Also make it clearer that implementations are free to support other
buffer types beyond the required ones.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2018-12-14 14:01:54 +02:00
Jonas Ådahl
9132fc867d configure.ac: Bump version to 1.17
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2018-11-12 16:59:01 +01:00
emersion
2c3b11d76f unstable: add primary-selection protocol
This primary selection is similar in spirit to the eponimous
in X11, allowing a quick "select text + middle click" shortcut
to copying and pasting.

It's otherwise very similar to its Wayland counterpart, and
explicitly made consistent with it.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2018-11-12 16:56:50 +01:00
Alexandros Frantzis
19ec5dcc4b Add zwp_linux_explicit_synchronization_v1
This protocol enables explicit synchronization of asynchronous graphics
operations on buffers on a per-commit basis. Support is currently
limited to dmabuf buffers and dma_fence fence FDs.

Explicit synchronization provides a more versatile notification
mechanism for buffer readiness and availability, and can be used to
improve efficiency by integrating with related functionality in display
and graphics APIs.

This protocol is also useful in ChromeOS ARC++ (running Android apps
inside ChromeOS, using Wayland as the communication protocol), where it
can enable integration of the ChromeOS compositor with the explicit
synchronization mechanisms of the Android display subsystem.

Finally, the per-commit nature of the release events provided by this
protocol potentially offers a solution to a deficiency of the
wl_buffer.release event (see
https://gitlab.freedesktop.org/wayland/wayland/issues/46).

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
[Pekka: dropped Reveman from maintainers]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2018-11-12 16:32:54 +02:00
Johan Klokkhammer Helsing
18032f6672 fullscreen-shell: Add missing license tag
Although it would probably default to the license at the root of the
repository anyway, it's best to be explicit about it, and also be
consistent with the other extensions.

The copyright holders have been assembled from git history and the
README.

Signed-off-by: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2018-07-31 11:53:03 +01:00
Jonas Ådahl
298d888ac7 configure.ac: Bump version to 1.16
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2018-07-30 18:14:56 +02:00
Markus Ongyerth
3ad11c68ab xdg-shell: Make sure wording reflects expectations
The wording in xdg-shell's `set_*` requests implies the compositor
*will* honour the client's request.
This would give clients the control over their actual state, while the
general expectation is that clients kindly ask for state changes which
the compositor may follow.
This patch ensures the actual protocol text reflects these expectations.

Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2018-07-30 18:15:18 +02:00
Markus Ongyerth
31236887df xdg-shell: move maximized state definition together
The xdg-shell documentation had part of the maximized state render
implications in the `set_maximized` request documentation, not the
actual state.
This moves the relevant lines into the state description.

Signed-off-by: Markus Ongyerth <wl@ongy.net>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2018-07-30 18:14:56 +02:00
Carlos Garnacho
db152d7c6f text-input: Add v3 of the text-input protocol
This new protocol description is an evolution of v2.

- All pre-edit text styling is gone.
- Pre-edit cursor can span characters.
- No events regarding input panel (OSK) state nor covered rectangle.
  Compositors are still free to handle situations where the keyboard
  focus rectangle is covered by the input panel.
- No set_preferred_language request for clients.
- There is no event to send keysyms. Compositors can use wl_keyboard
  interface instead.
- All state is double-buffered, with specified defaults.
- The compositor can be notified about external changes to the state.
- The client can detect outdated requests.

Signed-off-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2018-07-30 17:42:39 +02:00
Jonas Ådahl
6d58be0035 tests: Make wayland-scanner strict
Pass --strict to wayland-scanner in order to make it exit with failure
if something wasn't correct.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2018-07-30 17:27:53 +02:00
Jonas Ådahl
3bd79c2ddc tests: Use public-code and private-code instead of code
The wayland-scanner sub-commands private-code and public-code replaced
the old code command, so lets use those in the tests instead.

This requires at least wayland-scanner 1.15.0.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2018-07-30 17:27:53 +02:00
Simon Ser
3f282987d6 xdg-output: add a transform example for the logical size
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2018-07-16 20:58:02 +02:00
Jonas Ådahl
65cc1094f7 configure.ac: Bump version to 1.15
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2018-07-04 23:23:14 +02:00
Simon Ser
76d1ae8c65 unstable: add xdg-decoration protocol
This adds a new protocol to negotiate server-side rendering of window
decorations for xdg-toplevels. This allows compositors that want to draw
decorations themselves to send their preference to clients, and clients that
prefer server-side decorations to request them.

This is inspired by a protocol from KDE [1] which has been implemented in
KDE and Sway and was submitted for consideration in 2017 [2]. This patch
provides an updated protocol with those concerns taken into account.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Drew DeVault <sir@cmpwn.com>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Eike Hein <hein@kde.org>
Reviewed-by: Alan Griffiths <alan.griffiths@canonical.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>

[1] https://github.com/KDE/kwayland/blob/master/src/client/protocols/server-decoration.xml
[2] https://lists.freedesktop.org/archives/wayland-devel/2017-October/035564.html
2018-07-04 23:23:14 +02:00
Drew DeVault
7287469e0f xdg-shell: remove constraint on popup parents
It seems that this was partially done in
a3cf97ff982638bf7ed23b4303eba280c521b54d; this patch just corrects an
oversight.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2018-07-04 23:23:14 +02:00
Maciej Wolny
dae2a3dd09 Makefile.am: add include dir for AC_CONFIG_MACRO_DIR to work
da33164726 added a compatiblity macro for
old versions of pkg-config. However, the file in which that macro
resides was not included. From the autoconf docs: "Note that if you use
aclocal from Automake to generate aclocal.m4, you must also set
ACLOCAL_AMFLAGS = -I dir in your top-level Makefile.am.".

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-06-18 12:05:05 +03:00
Jonas Ådahl
c5f0f1a739 configure.ac: Bump version to 1.14
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2018-05-03 17:45:15 +02:00
Drew DeVault
d296d0760c xdg-output: Add name and description events
This adds two events to the protocol. The goal is to allow clients to
give the user the ability to select outputs with the same names the
compositor uses and to identify outputs consistently across sessions.
The output name is a short and stiff identifier with strict limits on
permitted characters, which is suitable for storing in config files,
command line arguments, etc. A warmer "description" event is also
provided to (optionally) provide a more human readable name, and has
much broader restrictions on its form.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[Jonas: Fixed formatting and commit subject]
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2018-05-03 17:44:35 +02:00
Mike Blumenkrantz
bd7b0c628a xdg-shell: add enums for tiled window state to toplevel configure
this adds implementation from a related discussion long ago in which
it was decided that it would be useful for clients to know if/where their
windows were tiled so that various behaviors and visuals could be modified
to improve UX

a window which is e.g., tiled on the right side of the screen would set the
right|top|bottom tiled states in configure

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
[Jonas: Minor formatting fixes]
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

Changes since v2: simplified docs
Changes since v1: added since=2 to enum members
2018-05-03 16:24:51 +02:00
Jonas Ådahl
d5ded4ddaf configure.ac: Bump version to 1.13
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2018-02-14 20:29:40 +08:00
Mike Blumenkrantz
d852a6fd59 xdg-shell: remove harmless typo
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2018-01-19 13:02:31 -06:00
Alexandros Frantzis
4f789286e4 unstable: Add input-timestamps protocol
wl_pointer, wl_keyboard and wl_touch events currently use a 32-bit
timestamp with millisecond resolution. In some cases, notably latency
measurements, this resolution is too coarse to be useful.

This protocol provides additional high-resolution timestamps events,
which are emitted before the corresponding input event. Each timestamp
event contains a high-resolution, and ideally higher-accuracy, version
of the 'time' argument of the first subsequent supported input event.

Clients that care about high-resolution timestamps just need to keep
track of the last timestamp event they receive and associate it with the
next supported input event that arrives.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-01-19 11:21:02 +02:00
Jonas Ådahl
0130366ee0 configure.ac: Bump version to 1.12
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-12-02 09:56:36 +08:00
Jonas Ådahl
040a8698cd Makefile.am: Install stable xdg-shell
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-12-02 09:51:59 +08:00
Jonas Ådahl
f68bafc9c3 xdg-shell: Soften fullscreen geometry requirements
Having a strict requirement on clients obeying the configured window
geometry for fullscreen toplevel surfaces might have the side effect of
making it harder or impossible to implement various hardware
optimizations on certain system configurations. By softening
requirements on the geometry while loosely defining the border fill, we
remove that restriction.

Clients that still want total control of the surrounding area can
still for example prepare the attached buffers to match the configured
surface size, or use subsurfaces in combination with wp_viewporter to
make up a surface matching the fullscreen window geometry dimensions.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Arnaud Vrac <rawoul@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@samsung.com>
2017-11-22 13:58:40 +08:00
Jonas Ådahl
cd1e13ed6d xdg-shell: Add unset_fullscreen description
The description for xdg_toplevel.unset_fullscreen was completely
missing, so add it.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
a82ca1f35b xdg-shell: Clarify set_fullscreen semantics
It was not explicitly specified (as it is in set/unset_maximize) that
the compositor will respond with a configure event when a client asks to
be fullscreened, and the meaning of the output parameter was somewhat
awkwardly described.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
3c7dbb9646 xdg-shell: Specify what happens when (un)maximizing while fullscreen
Specify that the maximize/unmaximize state requests only affects the
state a surface will return to if it is currently fullscreen.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
a8a7b0b213 xdg-shell: Fix typo
There is no configure 'request' only configure 'events'.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
8f96c079d2 xdg-shell/positioner: Clarify flip semantics with anchor offset
While there is no currently known usages of setting an anchor offset on
the same axis as the 'flip' constraint action is set, it must still be
specified so compositors behave the same.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-11-21 16:25:51 +08:00
David Edmundson
6bff136f30 xdg-shell/positioner: Replace edge bitfield with extended enum
Bitfields allowed for impossible combinations of anchor edges, such as
being on the left and right edge. Use of explicit enumerations means we
don't need to handle that case.

Signed-off-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-11-21 16:25:51 +08:00
Mike Blumenkrantz
0c761706bb xdg-shell: clarify map/unmap wording
ensure that this is as precise and explicit as possible for all useful
cases and also define previously-unspecified behavior

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
a3cf97ff98 xdg-shell/popup: Allow custom parent by passing null as parent
Allow using some other protocol (custom, or future xdg_* based) to set
up the parent-child relationship of a popup. This allows future
protocols to use xdg_popup when mapping popups over surfaces not based
on xdg_surface.

An example use case for this is the window menu, where a shells UI
client can use xdg_popup to create popup menus over windows it does not
have a xdg_surface of by having a custom protocol setting up the proper
parent-child relationship.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
bb632281d0 xdg-shell/toplevel: Chain multiple parent-child relationships
Change the semantics of xdg_toplevel.set_parent to allow chaining
multiple parent-child relationships together, while allowing
arbitrarily unmapping parents, while keeping what is left over of the
chain intact.

This makes things easier to manage when parent-child relationships
cross client borders, for example when using xdg_foreign.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
4fd4d23481 xdg-shell/toplevel: Clarify xdg_toplevel.set_parent(null)
Setting a null-surface as a toplevel parent should unset the
parent-child relationship. This was not specified, so lets do that.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
43a09b1577 xdg-shell/surface: Add note about window position and geometry
A client might want to change the window geometry without wanting the
window to be moved, for example when changing the width of the border.
Point out that the compositor should treat the (x,y) coordinate of the
geometry as the top-left corner of the window, and not change the
position of the window as it appears on the screen if the (x,y)
coordinate changes.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
af6cf5ecac xdg-shell: Replace 'monitor' with 'output'
There is no such thing as 'monitor' in Wayland, only outputs.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
e49a2c0b56 xdg-shell/positioner: Allow empty anchor_rect
Allow setting an empty anchor rectangle, so that one can map a popup
against a coordinate, not a pixel.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
092c976606 xdg-shell: Reword the xdg_wm_base introduction
Don't refer to things as "traditional desktop" as it is not defined
nor clear what that refers to; instead reword things in a more explicit
way. A reason for this is that xdg-shell is not strictly meant only for
traditional window stacking based desktop environments, but should be
equally suitable for stacking, tiling and potentially other styles as
well.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
505a4f5daf xdg-shell: Update copyright notices
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
709a1a0c9a xdg-shell: Rename interfaces
Rename the interfaces according to the wayland-protocols policy. Since
the name 'xdg_shell' as an interface was already taken (by
xdg-shell-unstable-v5) zxdg_shell_v6 was renamed xdg_wm_base. The
surface role related interfaces were not renamed, as naming collision
is only unmanagable when exposed as globals via the registry.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
fcb2a63c84 Add xdg-shell to stable/
Add a copy of xdg-shell unstable v6 to stable/xdg-shell/xdg-shell.xml.
Folliwing this commit, it will go through a set of changes, before
being declared stable.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
fc3305c362 configure.ac: Bump version to 1.11
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-10-11 16:20:05 +08:00
Marco Martin
70d85926c6 xdg-foreign-v2: Rename export and import calls
As export is a reserved keyword in C++, in order for the output
generated by wayland_scanner to compile correctly rename export to
export_toplevel and import to import_toplevel this needs a new protocol
version as is an incompatible change

[jadahl: Fix various documentation issues]

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-10-11 09:01:22 +08:00
Marco Martin
72699573cc Add a new version of the xdg-foreign protocol
Some methods will be renamed, so we need a new, not retrocompatible
protocol.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-09-26 09:49:23 -04:00
Tomek Bury
875130ee3c Use sysroot prefix for pkgdatadir variable
The pc_sysroot is automatically added to cflags and libs but not
to 'pkg-config --variable'

Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-08-30 14:04:02 +01:00
Jonas Ådahl
9ee1d597a6 configure.ac: Bump version to 1.10
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-31 18:57:58 +08:00
Olivier Fourdan
6b62c3211d configure.ac: force autotool to use star
To circumvent the 99 character filename limit.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-31 18:57:58 +08:00
Olivier Fourdan
794a96a80f Add xdg-output protocol
This protocol aims at describing outputs in way which is more in line
with the concept of an output on desktop oriented systems.

Some information are more specific to the concept of an output for a
desktop oriented system and may not make sense in other applications,
such as IVI systems for example.

The goal is to gradually move the desktop specific concepts out of the
core wl_output protocol.

For now it just features the position and logical size which describe
the output position and size in the global compositor space.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-07-31 18:15:45 +08:00
Jonas Ådahl
7af21d83d3 configure.ac: Bump version to 1.9
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-11 14:41:21 +08:00
Olivier Fourdan
e16986b3d2 Add keyboard shortcuts inhibitor
This adds a new protocol to let Wayland clients specify that they want
all keyboard events to be sent to the client, regardless of the
compositor own shortcuts.

This protocol can be used for virtual machine and remote connection
viewers which require to pass all keyboard shortcuts to the hosted or
remote system instead of being caught up by the compositor locally.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-11 14:18:39 +08:00
Olivier Fourdan
0a61d3516b Introduce keyboard grabbing protocol for Xwayland
This patch introduces a new protocol for grabbing the keyboard from
Xwayland.

This is needed for X11 applications that map an override redirect window
(thus not focused by the window manager) and issue an active grab on the
keyboard to capture all keyboard events.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-11 14:18:39 +08:00
Daniel Stone
26c99346ab Bump version to 1.8
Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-06-12 10:27:44 +01:00
Daniel Stone
c438cbe7dc linux-dmabuf: Bump main protocol version
Unfortunately this hunk fell out during a rebase. Sorry!

Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-05-20 16:12:23 +01:00
Varad Gautam
4ecdb097db linux-dmabuf: advertise format modifiers with modifier event
advertise the supported fourcc format modifiers along with supported
formats to the client. the 'modifier' event introduced here is
intended to replace the 'format' event from zwp_linux_dmabuf_v1
version 1.

bump zwp_linux_dmabuf_v1, zwp_linux_buffer_params_v1 interface
versions to 3.

v2: specify request name in event description for clarity (Yong Bakos)
v3: grammar fixup (Yong Bakos)
v4: add deprecation warning against 'format' event usage (pq)

Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-05-19 10:53:30 +01:00
Varad Gautam
a840b3634a linux-dmabuf: add immediate dmabuf import path
provide a mechanism that allows clients to import the added dmabufs
and immediately use the newly created wl_buffers without waiting on
an event. this is useful to clients that are sure of their import
request succeeding, and wish to avoid the wl_buffer communication
roundtrip.

bump zwp_linux_dmabuf_v1, zwp_linux_buffer_params_v1 interface
versions.

v2: specify using incorrectly imported dmabufs as undefined behavior
instead of sending success/failure events. (pq, daniels)
v3: preserve the optional protocol error added in v2 and explicitly
state the outcome of import success or failure (pq)
v4: clarify create_immed failure cases and error codes (pq)

Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-05-19 10:53:22 +01:00
Yong Bakos
ab228a6721 linux-dmabuf-unstable: Use standard copyright notice
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-01-27 11:58:50 +00:00
Mike Blumenkrantz
375385e3d2 xdg-shell: require popups to intersect with or be adjacent to parent surfaces
some restrictions must be placed on this or else it becomes legal for
the compositor to place popups in unexpected locations

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-01-17 21:29:13 +08:00
Varad Gautam
642dd7af50 linux-dmabuf: clarify format event description
clearly state the request name in format event to avoid abmiguous
interpretation between 'zwp_linux_buffer_params_v1::create' and
'zwp_linux_dmabuf_v1::create_params' requests.

v2: grammar fixup (Yong Bakos)

Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Suggested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-21 11:24:24 +00: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
Bryce Harrington
f7349c3ff1 idle-inhibit: Lead with a verb in request description
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-21 11:14:17 +00:00
Bryce Harrington
a1d574fabe input-method: Lead with a verb in request descriptions
Make all the descriptions consistent by starting the description with a
simple verb (set instead of sets, etc.)  Add or rework a few of the
existing descriptions to fit this form.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-16 09:17:30 -07:00
Bryce Harrington
427d52e86f input-method: Correct grammar
These should all be pretty straightforward; there are no behavioral
changes.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-14 14:48:42 -07:00
Yong Bakos
1392110d38 xdg-shell: Correct grammar
Adjust minor grammar issues, for clarity.

This patch cherry-picks some relevant changes from an earlier series,
patches 3 to 5. See:
https://lists.freedesktop.org/archives/wayland-devel/2016-April/028078.html

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30 17:13:08 +08:00
Yong Bakos
d2ba6ad422 text-input: Correct grammar
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30 17:13:08 +08:00
Yong Bakos
594bb8e093 text-input: Rename text-input to text_input
Interface names are lower_snake_case, and corresponding descriptions
should match, for accuracy and clarity. This renaming only affects
description text, to follow the convention that exists elswhere in
this protocol document and in other protocol docs, when referring to
interface names.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30 17:13:08 +08:00
Yong Bakos
c5802797bd text-input: Fix indentation and paragraph whitespace
Replace the tab indentation of the MIT license with appropriate spaces.
Add one missing line break between two description paragraphs.
Adjust two line breaks to keep descriptions under 80 chars / line.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30 17:13:08 +08:00
Reynaldo H. Verdejo Pinochet
4253ad0b99 buildsystem: add -uninstalled.pc pkg-config file
For building against an uninstalled wayland-protocols tree

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30 17:13:08 +08:00
Jonas Ådahl
2e541a36de configure.ac: Bump version to 1.7
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-15 10:33:32 +08:00
Jonas Ådahl
c09e89929b xdg-shell: Add resize_x/y constraint adjustment to positioner
In order to get feedback of available space where a client can create
its popup, let it create requset that its popup rectangle being resized
would it not fit the within the work area. This adds two new constraint
adjustment values to the adjustment enum, and dimension parameters to
the xdg_popup.configure event.

The existing constraint adjustment actions take precedence, and resizing
will only be triggered if all other adjustments requested didn't manage
to make the popup rectangle fully visible.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
7ba6a6ab15 xdg-shell: Drop desktop environment specific state allocations
Instead of allocating state ranges that desktop environments can use as
they want, let them introduce their own protocol and their own enums.

If such desktop environment protocols need the configure/ack_configure
semantics, they can design their protocols to extend xdg_surface, and
make their private configure events a latched state tied to
xdg_surface.configure.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
3dab2f13f7 xdg-shell: Clarify focus semantics for popup grabs
Make it clearer what the focus semantics are during a popup grab. In
short, when a grabbing popup is mapped, the top most popup will always
have keyboard focus, while pointer and touch focus works just as normal
except that only surfaces from the grabbing client will receive pointer
and touch focus.

This patch doesn't really change any semantics but rather clarifies
what was ambiguous before.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
dee23fd0cf xdg-shell: Introduce xdg_positioner
xdg_positioner is a method for declarative positioning of child surfaces
(currently only xdg_popup surfaces). A client creates a description of a
positioning logic using the xdg_positioner interface. The xdg_positioner
object is then used when creating a xdg_popup for describing how the
child surface should be positioned in relation to the parent surface.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Mike Blumenkrantz <zmike@samsung.com>
Acked-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
eef4b95f59 xdg-shell: Make xdg_popup non-grabbing by default
Turn xdg_popup into plain temporary child surfaces without any grabbing
or mapping order requirements by default.

In order to create grabbing popup chains, a new request 'grab' is
introduced which enables more or less the same semantics and
requirements as xdg_popup previously had related to grabbing, stacking
and mapping order.

This enables using xdg_popup for creating tooltips and other user
interface elements that does not want to take an explicit grab.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Mike Blumenkrantz <zmike@samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
88390eddf5 xdg-shell: Make get_popup take a xdg_surface instead of wl_surface
The reason for using wl_surface before was that xdg_popup and
xdg_surface (now xdg_toplevel) had no common interface other than
wl_surface, but since xdg_surface is now the base interface, lets use
that.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
4c6cdfa2b6 xdg-shell: Improve error enum formatting some
The long lines stood out, break them by putting the summary on its own
line.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
2258fa64c9 xdg-shell: Add error codes for invalid surface state
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
5f694ca7e4 xdg-shell: Put xdg_shell events after requests
It makes the structure consistent with most other protocols and
provides a clear separation between what is done by the server and what
is done by the client.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
8315aaf1ac xdg-shell: Turn xdg_surface into a generic base interface
Split out toplevel window like requests and events into a new interface
called xdg_toplevel, and turn xdg_surface into a generic base interface
which others extends.

xdg_popup is changed to extend the xdg_surface.

The configure event in xdg_surface was split up making
xdg_surface.configure an event only carrying the serial number, while a
new xdg_toplevel.configure event carries the other data previously sent
via xdg_surface.configure. xdg_toplevel.configure is made to extend,
via the latch-state mechanism, xdg_surface.configure and depends on
that event to synchronize state.

Other future xdg_surface based extensions are meant to also extend
xdg_surface.configure for relevant window type dependend state
synchronization.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Mike Blumenkrantz <zmike@samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 10:25:31 +08:00
Olivier Fourdan
46f5d23844 xdg-shell: Add min/max size requests
Some application may wish to restrict their window in size, but
xdg-shell has no mechanism for the client to specify a maximum or
minimum size.

As a result, the compositor may try to maximize or fullscreen a window
while the client would not allow for the requested size.

Add new requests "set_max_size" and "set_min_size" to xdg-shell so that
the client can tell the compositor what would be its smallest/largest
acceptable size, and that the compositor can decide if maximize or
fullscreen is achievable, draw an accurate animation, etc.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=764413
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-15 10:25:31 +08:00
Mike Blumenkrantz
3acad73c32 xdg-shell: clarify xdg_surface creation semantics regarding buffers
this change ensures that the client will set its initial state
before performing any drawing, ensuring that there is no mismatch
when creating a surface with a non-default state
(eg. maximize, fullscreen, ...)

looking at the following event flows:
1) wl_surface.attach, wl_surface.commit, xdg_shell.get_xdg_surface

2) wl_surface.attach, xdg_shell.get_xdg_surface, wl_surface.commit

3) xdg_shell.get_xdg_surface, wl_surface.commit, xdg_surface.configure,
   wl_surface.attach, wl_surface.commit

only 3) is now valid, while 1) and 2) will trigger errors as a result
of handling buffers prior to creating the xdg surface

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
57592798bf xdg-shell: Remove the old unstable version enum and request
As of version 6, the new unstable protocol discovery semantics are
used, so lets remove the enum and request that made up the old one.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
89cadb4354 xdg-shell: Bump unstable version to 6
This copies the version 5 of the XML to a new version 6 version, while
at the same time the interface names are changed to use the unstable
naming convention.

A whitespace cleanup was done as no git-blame:ability would be lost
anyway.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-15 10:25:31 +08:00
Jonas Ådahl
49272ee0ce configure.ac: Bump version to 1.6
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-12 11:22:11 +08:00
Bryce Harrington
a7f9e039f7 Add screensaver idle inhibitor protocol
This interface allows disabling of screensaver/screenblanking on a
per-surface basis.  As long as the surface remains visible and
non-occluded it blocks the screensaver, etc. from activating on the
output(s) that the surface is visible on.

To uninhibit, simply destroy the inhibitor object.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-12 11:21:36 +08:00
Jonas Ådahl
cf82828d49 Introduce xdg-foreign protocol
xdg-foreign is a protocol meant to enable setting up inter surface
relationships across clients. Potential use cases are out-of-process
dialogs, such as file dialogs, meant to be used by sandboxed processes
that may not have the access it needs to implement such dialogs.

It works by enabling a client to export a surface, creating a handle
for the exported surface. The handle, in form of a unique string, may
be shared in some way with other clients (for example the provider of
the file dialog) which can then import the exported surface.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-08-12 10:50:42 +08:00
Jonas Ådahl
f93680e496 configure.ac: Bump version to 1.5
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-07-22 11:43:54 +08: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
Bryce Harrington
2009a70f56 Fix grammar for 'an X*'
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-07-08 11:05:20 -07:00
Jonas Ådahl
65d09ef404 configure.ac: Bump version to 1.4
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-05-23 11:33:48 +08:00
Pekka Paalanen
83bdaa5cff stable/viewporter: add more error cases
Rather than silenty doing things, make them explicit and error if
anything is not quite right. Suggested by Daniel Stone.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
[Pekka: updated copyright years]
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-06 15:00:59 +03:00
Pekka Paalanen
39bc7207b4 stable/viewporter: rephrase a wp_viewport paragraph
Cc: Yong Bakos <ybakos@humanoriented.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
[Pekka: s/culled/ignored/]
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-06 15:00:59 +03:00
Pekka Paalanen
af6402c41e stable/viewporter: rename and build
Rename interfaces and the protocol to follow the policy.

Reset interface versions.

Replace "surface coordinates" with "surface local coordinates".

Hook up to build and install.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-06 15:00:59 +03:00
Pekka Paalanen
368cbf3985 stable/viewporter: remove wp_viewport.set request
Remove the old, redundant request. The new way is to call both
wp_viewport.set_source and wp_viewport.set_destination when you want to
set everything.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-06 15:00:59 +03:00
Pekka Paalanen
5c88eef8cc stable: add viewporter draft
This XML file has been copied verbatim from Weston 1.10.0 release,
protocol/scaler.xml.

The interfaces still need renaming according to wayland-protocols
policy. Also a redundant request needs to be removed. These will be done
in a follow-up patch to clearly show the changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-06 15:00:59 +03:00
Jussi Kukkonen
cc276dfa41 configure.ac: Don't use AC_CANONICAL_* macro calls
Check autoconfs $cross_compiling instead as AC_CANONICAL_HOST call
will fail if the host cpu is not recognised (which can happen when
e.g. Yocto builds for "allarch").

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-05-03 16:04:53 +03: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
44d5da751f pointer-constraints: Use 'surface-local' in simplified parameter summary
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:18 -07:00
Yong Bakos
5eb2a8d45a fullscreen-shell: Correct spelling of parameter name
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-21 14:35:13 -07:00
Pekka Paalanen
a8d7dce4e6 stable/presentation-time: rephrase request intro
Attempting to clarify the paragraph. The key points are that feedback is
double-buffered, part of a commit as all double-buffered state is, and
it defines the term "content update" used later.

The new phrasing defines not only a content update, but also content
submission which is used further on in the spec. It implies the
double-buffered state semantics without actually using the term (it's
not really state to be applied), and makes a link with the very next
paragraph describing the prensentation time.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-14 11:32:04 +03:00
Pekka Paalanen
79a4172976 stable/presentation-time: reorganize clock_id documentation
Move compositor implementors' guidelines to the end. Recombine the
affected paragraphs.

No changes to the wording are made.

Suggested-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-14 11:32:04 +03:00
Pekka Paalanen
8e685a89ff stable/presentation-time: grammatical improvements by Bryce
Suggested-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-14 11:32:04 +03:00
Pekka Paalanen
4f87fcf3a0 stable/presentation-time: swap two paragraphs in 'presented'
Associates better with the surrounding paragraphs by not jumping topics
back and forth.

Suggested-by: Bill Spitzak <spitzak@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-14 11:30:16 +03:00
Yong Bakos
cec64ada95 fullscreen-shell: Add missing xml declaration
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-13 12:35:22 -07:00
Yong Bakos
1dd63b1d3b pointer-gestures: Add missing xml declaration
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-13 12:35:19 -07:00
Yong Bakos
6c6e646a48 fullscreen-shell: Correct grammar, punctuation, minor naming and space
Add missing periods that terminate sentences.
Correct ARBITRARY_MODE to match the actual enum value name.
Adjust one post-period space to match the rest of the content.
Downcase summary description to match the rest of the document.
Add line breaks between sequential enum elements to match conventions
in 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:15 -07:00
Yong Bakos
ae55234c53 input-method: Correct grammar, add missing line break
Adds one line between two sequential request elements, to match conventions
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:14 -07:00
Yong Bakos
c9a8cec816 linux-dmabuf: Add missing articles and punctuation, adjust minor whitespace
Remove line breaks preceding closing interface tags, to match conventions
in 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:13 -07:00
Yong Bakos
0197adb355 pointer-constraints: Correct spelling, grammar and consistency
Downcase the protocol summary description to match other protocols.
Replace 'surface-relative' with 'surface local' for consistency and clarity.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-13 12:35:10 -07:00
Yong Bakos
09a654e93c pointer-gestures: Correct pluralization, one space, minor vertical whitespace
Adjust double-space after period to be consistent with all content.
Adjust vertical whitespace surrounding first and last protocol tag to
match conventions in 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:09 -07:00
Yong Bakos
fc2889ba01 relative-pointer: Correct spelling error, one capitalization, and minor space
Downcase the protocol description summary.
Adjust two double-spaces to one, like the rest of the content.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-13 12:35:08 -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
Yong Bakos
8dab46ab53 presentation-time: Correct minor grammar errors
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-13 12:35:02 -07:00
Yong Bakos
a50668559c readme: Correct spelling and grammar
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-13 12:35:00 -07:00
Jonas Ådahl
82bb922f5b configure.ac: Bump version to 1.3
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-03-10 15:02:29 +08:00
Jonas Ådahl
418915eeba Revert "xdg-shell: clarify xdg_surface creation semantics regarding buffers"
This patch was intended to be part of the coming v6 version of the
xdg_shell protocol. It is an semantically backward incompatible change,
so it cannot be implemented in xdg_shell v5 without breaking
compatibility with available clients.

This reverts commit 275fd34023.
2016-03-09 15:49:51 +08: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
Mike Blumenkrantz
275fd34023 xdg-shell: clarify xdg_surface creation semantics regarding buffers
this change ensures that the client will set its initial state
before performing any drawing, ensuring that there is no mismatch
when creating a surface with a non-default state
(eg. maximize, fullscreen, ...)

looking at the following event flows:
1) wl_surface.attach, wl_surface.commit, xdg_shell.get_xdg_surface

2) wl_surface.attach, xdg_shell.get_xdg_surface, wl_surface.commit

3) xdg_shell.get_xdg_surface, wl_surface.commit, xdg_surface.configure,
   wl_surface.attach, wl_surface.commit

only 3) is now valid, while 1) and 2) will trigger errors as a result
of handling buffers prior to creating the xdg surface

Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-03-08 23:32:51 -08:00
Jonas Ådahl
22a9cd8a25 configure.ac: Bump version to 1.2
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-03-07 17:09:30 +08:00
Pekka Paalanen
62468ffc9a Makefile: install and dist stable protocols
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-03-01 11:19:24 +02:00
Pekka Paalanen
f4e9da8363 Makefile: add presentation-time to stable protocols
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-03-01 11:19:16 +02:00
Pekka Paalanen
10ae82c41a presentation-time: finish stabilization
Rename interfaces and the protocol to follow the policy.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-03-01 11:19:10 +02:00
Pekka Paalanen
95e7f445ed stable: add presentation-time draft
This XML file has been copied verbatim from Weston 1.10.0 release,
protocol/presentation_timing.xml. The last behavioral change to that
file was in December 2014, so the behaviour is considered stable.

Interfaces still need to be renamed according wayland-protocols policy.
That will be done in a follow-up patch to clearly show the changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-03-01 11:18:35 +02:00
Carlos Olmedo Escobar
2deda62a9e Remove 'is'.
Signed-off-by: Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-02-29 15:26:53 -08:00
Jonas Ådahl
596dfda882 configure.ac: Bump version to 1.1
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-02-16 17:17:49 +08:00
Jonas Ådahl
162619d605 Introduce pointer locking and confinement protocol
This patch introduces a new protocol for locking and confining a
pointer. It consists of a new global object with two requests; one for
locking the surface to a position, one for confining the pointer to a
given region.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-02-16 17:17:49 +08:00
Jonas Ådahl
a956c73e4e Introduce wp_relative_pointer interface
The wp_relative_pointer interface is an extension to the wl_pointer
interface created from wl_seat. It has the same focus, but adds the
functionality of sending relative pointer motions unhindered by
constraints such as monitor edges or other barriers. It also contains
unaccelerated pointer motion information.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-02-16 17:00:15 +08:00
Derek Foreman
0b05b70f9d ignore: ignore config.sub and config.guess
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2016-01-14 13:46:19 -08:00
Derek Foreman
d8cb9c2a8b test: add make check
We can now test all the protocol files by running make check (or distcheck)
which will pass them through the scanner.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
2016-01-14 15:49:00 +08:00
Mike Blumenkrantz
a5585f3de3 xdg-shell: add state range reservation for EFL
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-12-07 10:18:05 +08:00
Bryce Harrington
da33164726 configure.ac: Fix compatibility for older pkg-config versions
noarch_pkgconfigdir is not available on oldish pkg-config's.  Among
other things this affects Wayland's nightly auto-build Ubuntu 14.04
PPAs.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Quentin Glidic <sardemff7+wayland@sardemff7.net>
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2015-12-04 17:46:19 +08:00
147 changed files with 20982 additions and 380 deletions

6
.editorconfig Normal file
View file

@ -0,0 +1,6 @@
root = true
[*.xml]
indent_style = space
indent_size = 2
tab_width = 8

11
.gitignore vendored
View file

@ -1,11 +0,0 @@
Makefile
Makefile.in
configure
config.log
config.status
compile
install-sh
missing
*.pc
autom4te.cache
aclocal.m4

71
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,71 @@
.templates_sha: &template_sha d11c0dd4c1c9a69c14b4af9b50cdd12b89d24672
include:
- project: 'freedesktop/ci-templates'
ref: *template_sha
file: '/templates/debian.yml'
- project: 'freedesktop/ci-templates'
ref: *template_sha
file: '/templates/ci-fairy.yml'
stages:
- review
- containers-build
- test
variables:
FDO_UPSTREAM_REPO: wayland/wayland-protocols
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
.debian:
variables:
FDO_DISTRIBUTION_VERSION: trixie
FDO_DISTRIBUTION_PACKAGES: 'build-essential pkg-config meson git ca-certificates libffi-dev libexpat1-dev libxml2-dev'
FDO_DISTRIBUTION_TAG: '2025-11-15.0'
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} ./.gitlab-ci/debian-install.sh'
check-commit:
extends:
- .fdo.ci-fairy
stage: review
script:
- ci-fairy check-commits --signed-off-by --junit-xml=results.xml
variables:
GIT_DEPTH: 100
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
- when: never
artifacts:
reports:
junit: results.xml
container_build:
extends:
- .debian
- .fdo.container-build@debian
stage: containers-build
variables:
GIT_STRATEGY: none
test-meson:
stage: test
extends:
- .debian
- .fdo.distribution-image@debian
script:
- meson build
- ninja -C build
- meson test -C build
- ninja -C build install
artifacts:
name: wayland-protocols-$CI_COMMIT_SHA
when: always
paths:
- $CI_PROJECT_DIR/build/meson-logs

14
.gitlab-ci/debian-install.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh -eux
# Note: don't forget to bump FDO_DISTRIBUTION_TAG when editing this file!
git clone --branch 1.23.1 --depth=1 https://gitlab.freedesktop.org/wayland/wayland
cd wayland/
git show -s HEAD
meson build/ -Dtests=false -Ddocumentation=false
ninja -j${FDO_CI_CONCURRENT:-4} -C build/ install
cd ..
rm -rf wayland/
echo "/usr/local/lib" >/etc/ld.so.conf.d/local.conf
ldconfig

View file

@ -0,0 +1,9 @@
#### Requirements for merging
- [ ] Review
- [ ] Implementations
- [ ] ACKs from members
/label ~"New Protocol" ~"In 30 day discussion period" ~"Needs acks" ~"Needs implementations" ~"Needs review"

3
.mailmap Normal file
View file

@ -0,0 +1,3 @@
Faith Ekstrand <faith@gfxstrand.net> <jason@jlekstrand.net>
Faith Ekstrand <faith@gfxstrand.net> <jason.ekstrand@intel.com>
Faith Ekstrand <faith@gfxstrand.net> <jason.ekstrand@collabora.com>

217
GOVERNANCE.md Normal file
View file

@ -0,0 +1,217 @@
# wayland-protocols governance
This document governs the maintenance of wayland-protocols and serves to outline
the broader process for standardization of protocol extensions in the Wayland
ecosystem.
## 1. Membership
Membership in wayland-protocols is offered to stakeholders in the Wayland
ecosystem who have an interest in participating in protocol extension
standardization.
### 1.1. Membership requirements
1. Membership is extended to projects, rather than individuals.
2. Member projects represent general-purpose projects with a stake in multiple
Wayland protocols (e.g. compositors, GUI toolkits, etc), rather than
special-purpose applications with a stake in only one or two.
3. Each member project must provide named individuals as point of contact
for that project who can be reached to discuss protocol-related matters.
4. During a vote, if any points-of-contact for the same member project
disagree, the member project's vote is considered blank.
### 1.2. Becoming a member
1. New member projects who meet the criteria outlined in 1.1 are established by
invitation from an existing member. Projects hoping to join should reach out
to an existing member project or point of contact, asking for this
invitation.
2. Prospective new member projects shall file a merge request tagged
`governance` adding themselves to the list in `MEMBERS.md`, noting their
sponsor member.
3. A point of contact for the sponsor member shall respond acknowledging their
sponsorship of the membership.
4. A 14 day discussion period for comments from wayland-protocols members will
be held.
5. At the conclusion of the discussion period, the new membership is
established unless their application was NACKed by a 1/2 majority of all
existing member projects.
6. Member projects may vary their point(s) of contact by proposing the addition
and/or removal of points of contact in a merge request tagged `governance`,
subject to approval as in points 4 and 5 above.
### 1.3. Ceasing membership
1. A member project, or point of contact, may step down by submitting a merge
request tagged `governance` removing themselves from `MEMBERS.md`.
2. A removal vote may be called for by an existing member project or point of
contact, by filing a merge request tagged `governance`, removing the
specific member project or point of contact from `MEMBERS.md`. This begins a
14 day voting & discussion period.
3. At the conclusion of the voting period, the member is removed if the votes
total 2/3rds of all current member projects.
4. Removed members are not eligible to apply for membership again for a period
of 1 year.
5. Following a failed vote, the member project who called for the vote cannot
call for a re-vote or propose any other removal for 90 days.
## 2. Protocols
### 2.1. Protocol namespaces
1. Namespaces are implemented in practice by prefixing each interface name in a
protocol definition (XML) with the namespace name, and an underscore (e.g.
"xdg_wm_base").
2. Protocols in a namespace may optionally use the namespace followed by a dash
in the name (e.g. "xdg-shell").
3. The "xdg" namespace is established for protocols letting clients
configure their surfaces as "windows", allowing clients to affect how they
are managed.
4. The "wp" namespace is established for protocols generally useful to Wayland
implementations (i.e. "plumbing" protocols).
5. The "ext" namespace is established as a general catch-all for protocols that
fit into no other namespace.
#### 2.1.1 Experimental protocol namespacing
1. Experimental protocols begin with the "xx" namespace and do not include any relation
to namespaces specified in section 2.1.
2. Namespacing of experimental protocols is determined upon promotion.
### 2.2. Protocol inclusion requirements
1. All protocols found in the "xdg" and "wp" namespaces at the time of writing
are grandfathered into their respective namespace without further discussion.
2. Protocols in the "xdg" and "wp" namespace are eligible for inclusion only if
ACKed by at least 3 members.
3. Protocols in the "xdg" and "wp" namespace are ineligible for inclusion if
NACKed by any member.
4. Protocols in the "xdg" and "wp" namespaces must have at least 3 open-source
implementations (either 1 client + 2 servers, or 2 clients + 1 server) to be
eligible for inclusion.
5. Protocols in the "ext" namespace are eligible for inclusion only if ACKed by
at least 2 member projects.
6. Protocols in the "ext" namespace must have at least one open-source client &
one open-source server implementation to be eligible for inclusion.
7. "Open-source" is defined as distributed with an Open Source Initiative
approved license.
8. All protocols are eligible for inclusion only if formally reviewed in-depth
by at least one member project. For the purposes of this clause, reviews from
the individual protocol author(s) are disregarded.
#### 2.2.1 Experimental protocol inclusion requirements
1. Experimental protocols must be valid XML which can be consumed by wayland-scanner.
2. All such protocols must be created with a proposal merge request outlining the
need for and purpose of the protocol.
3. All such protocols must be clearly tagged as experimental.
### 2.3. Introducing new protocols
1. A new protocol may be proposed by submitting a merge request to the
wayland-protocols Gitlab repository.
2. Protocol proposal posts must include justification for their inclusion in
their namespace per the requirements outlined in section 2.2.
3. An indefinite discussion period for comments from wayland-protocols members
will be held, with a minimum duration of 30 days beginning from the time when
the MR was opened. Protocols which require a certain level of implementation
status, ACKs from members, and so on, should use this time to acquire them.
4. When the proposed protocol meets all requirements for inclusion per section
2.2, and the minimum discussion period has elapsed, the sponsoring member may
merge their changes into the wayland-protocol repository.
5. Amendments to existing protocols may be proposed by the same process, with
no minimum discussion period.
6. Declaring a protocol stable may be proposed by the same process, with the
regular 30 day minimum discussion period.
7. A member project has the option to invoke the 30 day discussion period for any
staging protocol proposal which has been in use without substantive changes
for a period of one year.
### 2.4. Development stalemate resolution
1. In the event that a discussion thread reaches a stalemate which cannot be
resolved, a tie-breaking vote can be requested by the protocol author or
any member project.
2. All member projects are eligible to vote in stalemate tie-breakers. Each project
may cast a single vote.
3. Tie-breaker voting periods last no fewer than seven days.
4. Tie-breaker votes must be between two choices.
5. Any member project may elect to extend the voting period by an additional seven days.
This option may only be invoked once per member project per tie-breaker and shall
not be used without cause.
6. At the end of the voting period, the choice with the most votes is declared
the winner, and development proceeds using that idea.
7. In the event of a tie, the protocol author casts the deciding vote.
### 2.5. Representation of non-members
1. A protocol proposed by a non-member inherently begins at a
responsibility deficit as compared to one initiated by a member project.
2. To address this, any protocol proposed by a non-member intended for `staging/` or
`stable/` may have a sponsor designated from a member project
3. The sponsor should have a strong understanding of the protocol they
represent as well as the time required to drive it.
4. The sponsor shall be responsible for representing the protocol and its
author in all cases which require membership, e.g., stalemate voting.
5. The member projects shall provide a sponsor for a non-member project upon request.
6. An author may make a one-time request for a different sponsor at any point.
### 2.3.1 Introducing new experimental protocols
1. Experimental protocols are merged into wayland-protocols after a two
week review period upon the author's request unless a NACK has been given or
a WAIT is in progress.
2. If all NACKs are removed from an experimental protocol, the two week review period is
started anew.
### 2.3.2 Experimental protocol removal policy
1. Unmaintained experimental protocols are removed after a three month period of
inactivity by its author, as determined by all of the following being true:
* No changes have been made to the protocol by the author
* No comments have been made to the protocol merge request by the author
* No mails have been sent to the mailing list persuant to the protocol by the author
2. A notification of intent to remove shall be given to the author in the protocol
merge request, and the protocol shall only be removed following a one week grace period
of continued inactivity.
### 2.3.3 Experimental protocol promotion
1. A merged experimental protocol may be promoted to `staging/`
upon request if it meets the requirements for landing as a
`staging/` protocol.
2. Upon promotion, an experimental protocol is removed from `experimental/`.
## 3. NACKs
1. Expressing a NACK is the sole purview of listed points-of-contact from member projects,
as specified in MEMBERS.md.
A NACK must be grounded in technical reasoning, and it constitutes the final resort
to block protocols which would harm the ecosystem or the project.
2. Any non-point-of-contact mentioning a NACK on a non-governance protocol issue, merge request,
or mailing list thread, for any purpose, shall be banned from the project for a
period of no fewer than three months. Additional penalties for repeat infractions
may be imposed at the discretion of a membership majority. A warning, delivered in private
if at all possible, shall be issued instead of a ban for first-time violations of this rule.
Any comments violating this rule shall be explicitly marked by member projects to indicate that
the NACK is invalid and has no bearing.
3. Any member project mentioning a NACK on a non-governance protocol issue, merge request,
or mailing list thread, for any reason that may be considered non-technical,
may undergo trial by eligible member projects upon receiving a written accusation of
impropriety. This accusation may be public or private, and it may occur by any method
of written communication.
If this NACK is determined by 2/3 majority of eligible member projects to be used improperly,
the offending point-of-contact shall be removed.
4. Eligible member projects during such review periods are those who have opted not to recuse themselves.
## 4. Amending this document
1. An amendment to this document may be proposed by any member project by
submitting a merge request on Gitlab.
2. A 30 day discussion period for comments from wayland-protocols members will
be held.
3. At the conclusion of the discussion period, an amendment will become
effective if it's ACKed by at least 2/3rds of all wayland-protocols member
projects, and NACKed by none. The sponsoring member may merge their change
to the wayland-protocols repository at this point.

21
MEMBERS.md Normal file
View file

@ -0,0 +1,21 @@
# wayland-protocols members
- GTK/Mutter: Jonas Ådahl <jadahl@gmail.com> (@jadahl),
Carlos Garnacho <carlosg@gnome.org> (@carlosg)
- KWin: Vlad Zahorodnii <vlad.zahorodnii@kde.org> (@zzag),
David Edmundson <david@davidedmundson.co.uk> (@davidedmundson),
Xaver Hugl <xaver.hugl@kde.org> (@Zamundaaa)
- mesa: Daniel Stone <daniel@fooishbar.org> (@daniels),
Mike Blumenkrantz <michael.blumenkrantz@gmail.com> (@zmike)
- Mir: Christopher James Halse Rogers <raof@ubuntu.com> (@RAOF),
Alan Griffiths <alan.griffiths@canonical.com>
- Qt: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(@eskilblomfeldt)
- Smithay/Cosmic: Victoria Brekenfeld <wayland@drakulix.de> (@drakulix)
- Weston: Pekka Paalanen <pekka.paalanen@collabora.com> (@pq),
Derek Foreman <derek.foreman@collabora.com> (@derekf)
- wlroots/Sway: Simon Ser <contact@emersion.fr> (@emersion),
Simon Zeni <simon@bl4ckb0ne.ca> (@bl4ckb0ne)
- Chromium: Fangzhou Ge <fangzhoug@chromium.org> (@fangzhoug),
Nick Yamane <nickdiego@igalia.com> (@nickdiego),
Max Ihlenfeldt <max@igalia.com> (@mihlenfeldt)

View file

@ -1,18 +0,0 @@
unstable_protocols = \
unstable/pointer-gestures/pointer-gestures-unstable-v1.xml \
unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml \
unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml \
unstable/text-input/text-input-unstable-v1.xml \
unstable/input-method/input-method-unstable-v1.xml \
unstable/xdg-shell/xdg-shell-unstable-v5.xml \
$(NULL)
nobase_dist_pkgdata_DATA = \
$(unstable_protocols) \
$(NULL)
dist_noinst_DATA = \
$(sort $(foreach p,$(unstable_protocols),$(dir $p)README)) \
$(NULL)
noarch_pkgconfig_DATA = wayland-protocols.pc

141
README
View file

@ -1,141 +0,0 @@
Wayland protocols
-----------------
wayland-protocols contains Wayland protocols that adds functionality not
available in the Wayland core protocol. Such protocols either adds
completely new functionality, or extends the functionality of some other
protocol either in Wayland core, or some other protocol in
wayland-protocols.
A protocol in wayland-protocols consists of a directory containing a set
of XML files containing the protocol specification, and a README file
containing detailed state and a list of maintainers.
Protocol directory tree structure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Protocols may be 'stable', 'unstable' or 'deprecated', and the interface
and protocol names as well as place in the directory tree will reflect
this.
A stable protocol is a protocol which has been declared stable by
the maintainers. Changes to such protocols will always be backward
compatible.
An unstable protocol is a protocol currently under development and this
will be reflected in the protocol and interface names. See <<Unstable
naming convention>>.
A deprecated protocol is a protocol that has either been replaced by some
other protocol, or declared undesirable for some other reason. No more
changes will be made to a deprecated protocol.
Depending on which of the above state the protocol is in, the protocol
is placed within the toplevel directory containing the protocols with the
same state. Stable protocols are placed in the +stable/+ directory,
unstable protocols are placed in the +unstable/+ directory, and
deprecated protocols are placed in the +deprecated/+ directory.
Protocol development procedure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To propose a new protocol, create a patch adding the relevant files and
Makefile.am entry to the wayland-protocols git repository with the
explanation and motivation in the commit message. Then send the patch to
the wayland-devel@lists.freedesktop.org mailing list using
'git send-email' with the subject prefix 'RFC wayland-protocols' or
'PATCH wayland-protocols' depending on what state the protocol is in.
To propose changes to existing protocols, create a patch with the
changes and send it to the list mentioned above while also CC:ing the
maintainers mentioned in the README file. Use the same rule for adding a
subject prefix as above and method for sending the patch.
If the changes are backward incompatible changes to an unstable protocol,
see <<Unstable protocol changes>>.
Interface naming convention
~~~~~~~~~~~~~~~~~~~~~~~~~~~
All protocols should avoid using generic namespaces or no namespaces in
the protocol interface names in order to minimize risk that the generated
C API collides with other C API. Interface names that may collide with
interface names from other protocols should also be avoided.
For generic protocols not limited to certain configurations (such as
specific desktop environment or operating system) the +wp_+ prefix
should be used on all interfaces in the protocol.
For operating system specific protocols, the interfaces should be
prefixed with both +wp_+ and the operating system, for example
+wp_linux_+, or +wp_freebsd_+, etc.
Unstable naming convention
~~~~~~~~~~~~~~~~~~~~~~~~~~
Unstable protocols have a special naming convention in order to make it
possible to make discoverable backward incompatible changes.
An unstable protocol has at least two versions; the major version which
represents backward incompatible changes, and the minor versions which
represents backward compatible changes to the interfaces in the protocol.
The major version is part of the XML file name, the protocol name in the
XML, and interface names in the protocol.
Minor versions are the version attributes of the interfaces in the XML.
There may be more than one minor version per protocol, if there are more
than one global.
The XML file and protocol name also has the word 'unstable' in them, and
all of the interfaces in the protocol are prefixed with +z+ and
suffixed with the major version number.
For example, an unstable protocol called foo-bar with major version 2
containing the two interfaces wp_foo and wp_bar both minor version 1 will
be placed in the directory +unstable/foo-bar/+ consisting of one file
called +README+ and one called +foo-bar-unstable-v2.xml+. The XML file
will consist of two interfaces called +zwp_foo_v2+ and +zwp_bar_v2+ with
the +version+ attribute set to +1+.
Unstable protocol changes
~~~~~~~~~~~~~~~~~~~~~~~~~
During the development of a new protocol it is possible that backward
incompatible changes are needed. Such a change needs to be represented
in the major and minor versions of the protocol.
Assuming a backward incompatible change is needed, the procedure how to
do so is the following:
. Make a copy of the XML file with the major version increased by +1+.
. Increase the major version number in the protocol XML by +1+.
. Increase the major version number in all of the interfaces in the
XML by +1+.
. Reset the minor version number (interface version attribute) of all
the interfaces to +1+.
Backward compatible changes within a major unstable version can be done
in the regular way as done in core Wayland or in stable protocols.
Declaring a protocol stable
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Once it is decided that a protocol should be declared stable, meaning no
more backward incompatible changes will ever be allowed, one last
breakage is needed.
The procedure of doing this is the following:
. Create a new directory in the +stable/+ toplevel directory with the
same name as the protocol directory in the +unstable/+ directory.
. Copy the final version of the XML that is the version that was
decided to be declared stable into the new directory. The target name
should be the same name as the protocol directory but with the +.xml+
suffix.
. Rename the name of the protocol in the XML by removing the
'unstable' part and the major version number.
. Remove the +z+ prefix and the major version number suffix from all
of the interfaces in the protocol.
. Reset all of the interface version attributes to +1+.
. Update the +README+ file in the unstable directory and create a new
+README+ file in the new directory.
Releases
~~~~~~~~
Each release of wayland-protocols finalizes the version of the protocols
to their state they had at that time.

316
README.md Normal file
View file

@ -0,0 +1,316 @@
# Wayland protocols
wayland-protocols contains Wayland protocols that add functionality not
available in the Wayland core protocol. Such protocols either add
completely new functionality, or extend the functionality of some other
protocol either in Wayland core, or some other protocol in
wayland-protocols.
A protocol in wayland-protocols consists of a directory containing a set
of XML files containing the protocol specification, and a README file
containing detailed state and a list of maintainers.
wayland-protocols is a standardization body formed of various Wayland
compositor and client developers. The governance rules are described in
[GOVERNANCE.md] and the current members are listed in [MEMBERS.md].
## Protocol phases
Protocols in general have three phases: the development phase, the testing
phase, and the stable phase.
In the development phase, a protocol may be added to wayland-protocols
as `experimental/`. It is actively being developed, for example by
iterating over it in a [merge request] or planning it in an [issue].
Extensions in this phase can have backward incompatible changes.
During this phase, patches for clients and compositors are written as a test
vehicle. Such patches should be merged with caution in clients and compositors,
because the protocol can still change.
When a protocol has reached a stage where it is ready for wider adoption,
and after the [GOVERNANCE section 2.3] requirements have been met, it enters
the "testing" phase. At this point, the protocol is added to the `staging/`
directory of wayland-protocols and made part of a release. What this means is
that implementation is encouraged in clients and compositors where the
functionality it specifies is wanted.
Extensions in staging cannot have backward incompatible changes, in that
sense they are equal to stable extensions. However, they may be completely
replaced with a new major version, or a different protocol extension altogether,
if design flaws are found in the testing phase.
After a staging protocol has been sufficiently tested in the wild and
proven adequate, its maintainers and the community at large may declare it
"stable", meaning it is unexpected to become superseded by a new major
version.
## Deprecation
A protocol may be deprecated, if it has been replaced by some other
protocol, or declared undesirable for some other reason. No more changes
will be made to a deprecated protocol.
## Legacy protocol phases
An "unstable" protocol refers to a protocol categorization policy
previously used by wayland-protocols, where protocols initially
placed in the `unstable/` directory had certain naming conventions were
applied, requiring a backward incompatible change to be declared "stable".
During this phase, protocol extension interface names were, in addition to
the major version postfix, also prefixed with `z` to distinguish them from
stable protocols.
## Protocol directory tree structure
Depending on which stage a protocol is in, the protocol is placed within
the toplevel directory containing the protocols with the same stage.
Stable protocols are placed in the `stable/` directory, staging protocols
are placed in the `staging/` directory, and deprecated protocols are
placed in the `deprecated/` directory.
Unstable protocols (see [Legacy protocol phases]) can be found in the
`unstable/` directory, but new ones should never be placed here.
## Protocol development procedure
To propose a new protocol, create a GitLab merge request adding the
relevant files and `meson.build` entry to the repository with the
explanation and motivation in the commit message. Protocols are
organized in namespaces describing their scope ("wp", "xdg" and "ext").
There are different requirements for each namespace, see [GOVERNANCE
section 2] for more information.
If the new protocol is just an idea, open an issue on the GitLab issue
tracker. If the protocol isn't ready for complete review yet and is an
RFC, create a merge request and add the "Draft:" prefix in the title.
To propose changes to existing protocols, create a GitLab merge request.
Please make sure you CC the authors and maintainers of the protocol, who
are named in the protocol's README.
Please include a `Signed-off-by` line at the end of the commit to certify
that you wrote it or otherwise have the right to pass it on as an
open-source patch. See the [Developer Certificate of Origin] for a formal
definition.
## Protocol development recommendations
It is recommended that protocols be small and specific in scope in order to
minimize sites of friction.
Development discussion should be approached with a fresh, productive mindset
and an openness to explore contrary ideas.
Development discussions must remain civil and technical in nature at all times.
## Interface naming convention
All protocols should avoid using generic namespaces or no namespaces in
the protocol interface names in order to minimize risk that the generated
C API collides with other C API. Interface names that may collide with
interface names from other protocols should also be avoided.
For generic protocols not limited to certain configurations (such as
specific desktop environment or operating system) the `wp_` prefix
should be used on all interfaces in the protocol.
For protocols allowing clients to configure how their windows are
managed, the `xdg_` prefix should be used.
For operating system specific protocols, the interfaces should be
prefixed with both `wp_` and the operating system, for example
`wp_linux_`, or `wp_freebsd_`, etc.
For more information about namespaces, see [GOVERNANCE section 2.1].
Each new non-experimental protocol XML file must include a major version
postfix, starting with `-v1`. The purpose of this postfix is to make it
possible to distinguish between backward incompatible major versions of
the same protocol.
The interfaces in the protocol XML file should as well have the same
major version postfix in their names.
For example, the protocol `foo-bar` may have a XML file
`foo-bar/foo-bar-v1.xml`, consisting of the interface `wp_foo_bar_v1`,
corresponding to the major version 1, as well as the newer version
`foo-bar/foo-bar-v2.xml` consisting of the interface `wp_foo_bar_v2`,
corresponding to the major version 2.
## Include a disclaimer
Include the following disclaimer:
```
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
```
## Use of RFC 2119 keywords
Descriptions of all new protocols must use (in lowercase) and adhere to the
proper meaning of the keywords described in [RFC 2119].
All protocol descriptions that follow the guidelines in RFC 2119 must
incorporate the following text in their toplevel protocol description section:
```
The key words "must", "must not", "required", "shall", "shall not", "should",
"should not", "recommended", "may", and "optional" in this document are to
be interpreted as described in IETF RFC 2119.
```
Note that not all existing protocol descriptions conform to RFC 2119. Protocol
maintainers are encouraged to audit their descriptions, update them as needed
to follow RFC 2119 guidelines, and mark them as conformant in the way described
in the previous paragraph.
## Backward compatible protocol changes
A protocol may receive backward compatible additions and changes. This
is to be done in the general Wayland way, using `version` and `since` XML
element attributes.
## Backward incompatible protocol changes for experimental protocols
A protocol in the experimental phase should expect to see backward incompatible
changes at any time.
Assuming a backward incompatible change is needed here, the procedure for how to
do so is the following:
- Increase the major version number in the protocol XML by 1.
- Increase the major version number in all of the interfaces in the
XML by 1.
- Reset the interface version number (interface version attribute) of all
the interfaces to 1.
- Remove all of the `since` attributes.
## Backward incompatible protocol changes for testing protocols
While not preferred, a protocol may at any stage, especially during the
testing phase, when it is located in the `staging/` directory, see
backward incompatible changes.
Assuming a backward incompatible change is needed, the procedure for how to
do so is the following:
- Make a copy of the XML file with the major version increased by 1.
- Increase the major version number in the protocol XML by 1.
- Increase the major version number in all of the interfaces in the
XML by 1.
- Reset the interface version number (interface version attribute) of all
the interfaces to 1.
- Remove all of the `since` attributes.
## Experimental Protocols: Development Recommendations
Implementations choosing to support experimental protocols must work to
support the latest version of the protocol at all times. It is therefore
recommended that developers only opt-in to supporting protocols they
have time and resources to actively develop.
A runtime option to enable features may also be useful to ensure users
do not opt-in to potentially broken behavior.
There is no expectation or requirement for stability between experimental
protocol versions. It is therefore strongly advised that such consumer
projects add build-time compile options to enable such protocols in order
to avoid compile errors from protocol version mismatches.
## Promoting a protocol from experimental
The author of an experimental protocol can request that it be promoted at any point
when it meets the requirements for `staging/`. At such time,
the namespace prefix should be determined, and then the protocol should be
renamed and merged into the appropriate directory, deleting the `experimental/`
entry.
## Declaring a protocol stable
Once it has been concluded that a protocol been proven adequate in
production, and that it is deemed unlikely to receive any backward
incompatible changes, it may be declared stable.
The procedure of doing this is the following:
- Create a new directory in the `stable/` toplevel directory with the
same name as the protocol directory in the `staging/` directory.
- Copy the final version of the XML that is the version that was
decided to be declared stable into the new directory. The target name
should be the same name as the protocol directory plus the version and
the `.xml` suffix.
- Remove the disclaimer about the protocol being in the testing phase.
- Update the `README` file in the staging directory and create a new
`README` file in the new directory.
- Replace the disclaimer in the protocol files left in the staging/
directory with the following:
```
Disclaimer: This protocol extension has been marked stable. This copy is
no longer used and only retained for backwards compatibility. The
canonical version can be found in the stable/ directory.
```
Note that the major version of the stable protocol extension, as well as
all the interface versions and names, must remain unchanged.
There are other requirements for declaring a protocol stable, see
[GOVERNANCE section 2.3].
## Releases
Each release of wayland-protocols finalizes the version of the protocols
to their state they had at that time.
## Gitlab conventions
### Triaging merge requests
New merge requests should be triaged. Doing so requires the one doing the
triage to add a set of initial labels:
~"New Protocol" - For a new protocol being added. If it's an amendment to
an existing protocol, apply the label of the corresponding protocol
instead. If none exist, create it.
~"Needs acks" - If the protocol needs one or more acknowledgements.
~"Needs implementations" - If there are not enough implementations of the
protocol.
~"Needs review" - If the protocol is in need of review.
~"In 30 day discussion period" - If the protocol needs a 30 day discussion
period.
For the meaning and requirement of acknowledgments and available
implementations, see the [GOVERNANCE.md] document.
### Managing merge requests
When merge requests get their needed feedback and items, remove the
corresponding label that marks it as needing something. For example, if a
merge request receives all the required acknowledgments, remove the
~"Needs acks" label, or if 30 days passed since opening, remove any
~"In 30 day discussion period" label.
### Nacking a merge request
If the inclusion of a merge request is denied due to one or more Nacks, add
the ~Nacked label.
[GOVERNANCE.md]: GOVERNANCE.md
[MEMBERS.md]: MEMBERS.md
[merge request]: https://gitlab.freedesktop.org/wayland/wayland-protocols/merge_requests
[issue]: https://gitlab.freedesktop.org/wayland/wayland-protocols/issues
[GOVERNANCE section 2.3]: GOVERNANCE.md#2.3-introducing-new-protocols
[Legacy protocol phases]: #legacy-protocol-phases
[GOVERNANCE section 2]: GOVERNANCE.md#2-protocols
[Developer Certificate of Origin]: https://developercertificate.org/
[GOVERNANCE section 2.1]: GOVERNANCE.md#21-protocol-namespaces
[RFC 2119]: https://www.rfc-editor.org/info/rfc2119

View file

@ -1,9 +0,0 @@
#!/bin/sh
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
(
cd "$srcdir" &&
autoreconf --force -v --install
) || exit
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"

View file

@ -1,31 +0,0 @@
AC_PREREQ([2.64])
m4_define([wayland_protocols_major_version], [1])
m4_define([wayland_protocols_minor_version], [0])
m4_define([wayland_protocols_version],
[wayland_protocols_major_version.wayland_protocols_minor_version])
AC_INIT([wayland-protocols],
[wayland_protocols_version],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=unspecified],
[wayland-protocols],
[http://wayland.freedesktop.org/])
AC_SUBST([WAYLAND_PROTOCOLS_VERSION], [wayland_protocols_version])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
AM_SILENT_RULES([yes])
PKG_NOARCH_INSTALLDIR
AC_CONFIG_FILES([
Makefile
wayland-protocols.pc
])
AC_OUTPUT
AC_MSG_RESULT([
Version ${WAYLAND_PROTOCOLS_VERSION}
Prefix ${prefix}
])

View file

@ -0,0 +1,4 @@
Input method protocol
Maintainers:
Dorota Czaplejewicz <gilaac.dcz@porcupinefactory.org>

View file

@ -0,0 +1,905 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="input_method_experimental_v2">
<copyright>
Copyright © 2008-2011 Kristian Høgsberg
Copyright © 2010-2011 Intel Corporation
Copyright © 2012-2013 Collabora, Ltd.
Copyright © 2012, 2013 Intel Corporation
Copyright © 2015, 2016 Jan Arne Petersen
Copyright © 2017, 2018 Red Hat, Inc.
Copyright © 2018 Purism SPC
Copyright © 2025 DorotaC
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="Protocol for creating input methods">
This protocol allows applications to act as input methods for compositors.
An input method context is used to manage the state of the input method.
Text strings are UTF-8 encoded, their indices and lengths are in bytes.
This document adheres to the RFC 2119 when using words like "must",
"should", "may", etc.
Warning! The protocol described in this file is currently in the
experimental phase. Backwards incompatible major versions of the
protocol are to be expected. Exposing this protocol without an opt-in
mechanism is discouraged.
</description>
<interface name="xx_input_method_v1" version="3">
<description summary="input method">
An input method object allows for clients to compose text.
The objects connects the client to a text input in an application, and
lets the client to serve as an input method for a seat.
The xx_input_method_v1 object can occupy two distinct states: active and
inactive. In the active state, the object is associated to and
communicates with a text input. In the inactive state, there is no
associated text input, and the only communication is with the compositor.
Initially, the input method is in the inactive state.
Requests issued in the inactive state must be accepted by the compositor.
Because of the serial mechanism, and the state reset on activate event,
they will not have any effect on the state of the next text input.
There must be no more than one input method object per seat.
</description>
<enum name="error">
<entry name="surface_has_role" value="0x0" summary="surface already has a role"/>
<entry name="inactive" value="0x1" summary="operation requires the input method to be active"/>
</enum>
<event name="activate">
<description summary="input method has been requested">
Notification that a text input focused on this seat requested the input
method to be activated.
This event serves the purpose of providing the compositor with an
active input method.
This event resets all state associated with previous
surrounding_text, text_change_cause, and content_type events, as well
as the state associated with set_preedit_string, commit_string, and
delete_surrounding_text requests, and destroys any existing input_popup_surface objects.
In addition, it marks the xx_input_method_v1 object as active.
The surrounding_text, and content_type events must follow before the
next done event if the text input supports the respective
functionality.
State set with this event is double-buffered. It will get applied on
the next xx_input_method_v1.done event, and stay valid until changed.
</description>
</event>
<event name="deactivate">
<description summary="deactivate event">
Notification that no focused text input currently needs an active
input method on this seat.
This event marks the xx_input_method_v1 object as inactive.
compositor must destroy all existing xx_input_popup_surface_v2 objects.
This event resets all state associated with previous
surrounding_text, text_change_cause, and content_type events, as well
as the state associated with set_preedit_string, commit_string, and
delete_surrounding_text requests.
State set with this event is double-buffered. It will get applied on
the next xx_input_method_v1.done event, and stay valid until changed.
</description>
</event>
<event name="surrounding_text">
<description summary="surrounding text event">
Updates the surrounding plain text around the cursor, excluding the
preedit text.
If any preedit text is present, it is replaced with the cursor for the
purpose of this event.
The argument text is a buffer containing the preedit string, and must
include the cursor position, and the complete selection. It should
contain additional characters before and after these. There is a
maximum length of wayland messages, so text can not be longer than 4000
bytes.
cursor is the byte offset of the cursor within the text buffer.
anchor is the byte offset of the selection anchor within the text
buffer. If there is no selected text, anchor must be the same as
cursor.
If this event does not arrive before the first done event, the input
method may assume that the text input does not support this
functionality and ignore following surrounding_text events.
Values set with this event are double-buffered. They will get applied
and set to initial values on the next xx_input_method_v1.done
event.
The initial state for affected fields is empty, meaning that the text
input does not support sending surrounding text. If the empty values
get applied, subsequent attempts to change them may have no effect.
</description>
<arg name="text" type="string"/>
<arg name="cursor" type="uint"/>
<arg name="anchor" type="uint"/>
</event>
<event name="text_change_cause">
<description summary="indicates the cause of surrounding text change">
Tells the input method why the text surrounding the cursor changed.
Whenever the client detects an external change in text, cursor, or
anchor position, it must issue this request to the compositor. This
request is intended to give the input method a chance to update the
preedit text in an appropriate way, e.g. by removing it when the user
starts typing with a keyboard.
cause describes the source of the change.
The value set with this event is double-buffered. It will get applied
and set to its initial value on the next xx_input_method_v1.done
event.
The initial value of cause is input_method.
</description>
<arg name="cause" type="uint" enum="xx_text_input_v3.change_cause"/>
</event>
<event name="content_type">
<description summary="content purpose and hint">
Indicates the content type and hint for the current
xx_input_method_v1 instance.
Values set with this event are double-buffered. They will get applied
on the next xx_input_method_v1.done event.
They get reset to initial on the next committed deactivate event.
The initial value for hint is none, and the initial value for purpose
is normal.
</description>
<arg name="hint" type="uint" enum="xx_text_input_v3.content_hint"/>
<arg name="purpose" type="uint" enum="xx_text_input_v3.content_purpose"/>
</event>
<event name="set_available_actions" since="3">
<description summary="announce the available actions">
Announces the actions available for the currently active text input.
Values set with this event are double-buffered. They will get applied
on the next .done event.
They get reset to the initial value on the next committed deactivate event.
The initial value is an empty set: no actions are available.
Values in the available_actions array come from text-input-v3.action.
</description>
<arg name="available_actions" type="array" summary="available actions"/>
</event>
<event name="announce_supported_features" since="3">
<description summary="announce extra supported features">
Notifies the input method what the currently active text input client is able to do.
This event should come within the same .done sequence as .activate. Otherwise, the input method may ignore it.
Values set with this event are double-buffered. They will get applied
on the next .done event.
They get reset to initial on the next committed deactivate event.
The initial value for features is none.
</description>
<arg name="features" type="uint" enum="xx_text_input_v3.supported_features"/>
</event>
<event name="done">
<description summary="apply state">
Atomically applies state changes recently sent to the client.
The done event establishes and updates the state of the client, and
must be issued after any changes to apply them.
Text input state (content purpose, content hint, surrounding text, and
change cause) is conceptually double-buffered within an input method
context.
Events modify the pending state, as opposed to the current state in use
by the input method. A done event atomically applies all pending state,
replacing the current state. After done, the new pending state is as
documented for each related request.
Events must be applied in the order of arrival.
Neither current nor pending state are modified unless noted otherwise.
</description>
</event>
<request name="perform_action" since="3">
<description summary="perform action">
Perform an action on this text input.
Values set with this event are double-buffered. They must be applied
and reset to initial on the next commit request.
The initial value of action is none.
</description>
<arg name="action" type="uint" enum="xx_text_input_v3.action" summary="action to perform"/>
</request>
<request name="commit_string">
<description summary="commit string">
Send the commit string text for insertion to the application.
Inserts a string at current cursor position (see commit event
sequence). The string to commit could be either just a single character
after a key press or the result of some composing.
The argument text is a buffer containing the string to insert. There is
a maximum length of wayland messages, so text can not be longer than
4000 bytes.
Values set with this request are double-buffered. They must be applied
and reset to initial on the next .commit request.
The initial value of text is an empty string.
</description>
<arg name="text" type="string"/>
</request>
<request name="set_preedit_string">
<description summary="pre-edit string">
Send the pre-edit string text to the application text input.
Place a new composing text (pre-edit) at the current cursor position.
Any previously set composing text must be removed. Any previously
existing selected text must be removed. The cursor is moved to a new
position within the preedit string.
The argument text is a buffer containing the preedit string. There is
a maximum length of wayland messages, so text can not be longer than
4000 bytes.
The arguments cursor_begin and cursor_end are counted in bytes relative
to the beginning of the submitted string buffer. Cursor should be
hidden by the text input when both are equal to -1.
cursor_begin indicates the beginning of the cursor. cursor_end
indicates the end of the cursor. It may be equal or different than
cursor_begin.
Values set with this request are double-buffered. They must be applied on
the next xx_input_method_v1.commit request.
They must be reset to initial on the next committed disable event.
The initial value of text is an empty string. The initial value of
cursor_begin, and cursor_end are both 0.
</description>
<arg name="text" type="string"/>
<arg name="cursor_begin" type="int"/>
<arg name="cursor_end" type="int"/>
</request>
<request name="delete_surrounding_text">
<description summary="delete text">
Remove the surrounding text.
before_length and after_length are the number of bytes before and after
the current cursor index (excluding the preedit text) to delete.
If any preedit text is present, it is replaced with the cursor for the
purpose of this event. In effect before_length is counted from the
beginning of preedit text, and after_length from its end (see commit
event sequence).
Values set with this request are double-buffered. They must be applied
and reset to initial on the next xx_input_method_v1.commit request.
The initial values of both before_length and after_length are 0.
</description>
<arg name="before_length" type="uint"/>
<arg name="after_length" type="uint"/>
</request>
<request name="move_cursor" since="3">
<description summary="move cursor and change selection">
Unselects text, moves the cursor and selects text.
This is equivalent to dragging the mouse over some text: it deselects whatever might be currently selected and selects a new range of text.
The offsets used in arguments are in bytes relative to the current cursor position. Cursor is the new position of the cursor, and anchor is the opposite end of selection. If there's no selection, anchor should be equal to cursor.
The offsets do not take preedit contents into account, nor is preedit changed in any way with this request.
Both cursor and anchor must fall on code point boundaries, otherwise text input client may ignore the request. It is therefore not recommended for an input method to move any of them beyond the text received in surrounding_text.
When surrounding_text is not supported, the offsets must not be interpreted as bytes, but as some human-readable unit at least as big as a code point, for example a grapheme.
The cursor and anchor arguments can also take the following special values:
BEGINNING := 0x8000_0000 = i32::MIN
END := 0x7fff_ffff = i32::MAX
meaning, respectively, the beginning and the end of of all text in the input field.
Values set with this event are double-buffered. They must be applied
and reset to initial on the next commit request.
The initial values of both cursor and anchor are 0.
</description>
<arg name="cursor" type="int"/>
<arg name="anchor" type="int"/>
</request>
<request name="commit">
<description summary="apply state">
Apply state changes from commit_string, set_preedit_string and
delete_surrounding_text requests.
The state relating to these events is double-buffered, and each one
modifies the pending state. This request replaces the current state
with the pending state.
The connected text input is expected to proceed by evaluating the
changes in the following order:
1. Replace existing preedit string with the cursor.
2. Delete requested surrounding text.
3. Insert commit string with the cursor at its end.
4. Move the cursor and selection.
5. Calculate surrounding text to send.
6. Insert new preedit text in cursor position.
7. Place cursor inside preedit text.
8. Perform the requested action.
Note that the input method can not receive more than 4000 bytes of selection text, which might be the case for example when the entire document is selected. Nevertheless, the text input must delete the entire selected range before inserting the commit string.
The serial number reflects the last state of the xx_input_method_v1
object known to the client. The value of the serial argument must be
equal to the number of done events already issued by that object. When
the compositor receives a commit request with a serial different than
the number of past done events, it must proceed as normal, except it
should not change the current state of the xx_input_method_v1 object.
</description>
<arg name="serial" type="uint"/>
</request>
<request name="get_input_popup_surface" since="2">
<description summary="create popup surface">
Creates a new xx_input_popup_surface_v2 object wrapping a given
surface.
The surface gets assigned the "input_popup" role. If the surface
already has an assigned role, the compositor must issue a protocol
error.
Issuing this request before receiving a committed .activate causes the "inactive" error.
</description>
<arg name="id" type="new_id" interface="xx_input_popup_surface_v2"/>
<arg name="surface" type="object" interface="wl_surface"/>
<arg name="positioner" type="object" interface="xx_input_popup_positioner_v1"/>
</request>
<event name="unavailable">
<description summary="input method unavailable">
The input method ceased to be available.
The compositor must issue this event as the only event on the object if
there was another input_method object associated with the same seat at
the time of its creation.
The compositor must issue this request when the object is no longer
useable, e.g. due to seat removal.
The input method context becomes inert and should be destroyed after
deactivation is handled. Any further requests and events except for the
destroy request must be ignored.
</description>
</event>
<request name="destroy" type="destructor">
<description summary="destroy the input method">
Destroys the xx_input_method_v1 object and any associated child
objects.
</description>
</request>
</interface>
<interface name="xx_input_popup_surface_v2" version="1">
<description summary="popup surface">
An input method popup surface is a short-lived, temporary surface.
It is meant as an area to show suggestions, candidates, or for other input-related uses.
The compositor should anchor it at the active text input cursor area.
The client must call wl_surface.commit on the corresponding wl_surface
for input_popup_surface state updates to take effect, unless otherwise noted.
After the initial wl_surface.commit, the compositor must reply with a configure sequence (see .start_configure) initializing all the compositor-provided state of the popup. That means providing values for:
- width
- height
- anchor_x
- anchor_y
- anchor_width
- anchor_height
- serial
using the appropriate events.
The popup will only be presented to the user after the client receives the configure sequence and replies with .ack_configure.
An example init sequence could look like this:
1. client (Cl): popup = input_method.get_popup(wl_surface, positioner)
2. Cl: wl_surface.commit()
3. compositor (Co): popup.start_configure(150, 150, 10, -2, 5, 30)
5. Co: input_method.done()
6. Cl: ack_configure()
7. Cl: wl_surface.commit()
A newly created input_popup_surface will be stacked on top of all previously created
input_popup_surfaces associated with the same text input.
A typical sequence resulting from the user selecting a new text field and typing some text:
1. compositor (Co): input_method.enable()
2. Co: input_method.done()
3. [init sequence]
4. Co: input_method.set_surrounding_text("new text")
5. Co: popup.start_configure(150, 150, -60, -2, 55, 30)
6. Co: input_method.done()
7. client (Cl): ack_configure()
8. Cl: wl_surface.commit()
When the corresponding input_method receives a commited .disable event, the popup gets destroyed and becomes invalid and its surface gets unmapped.
The client must not destroy the underlying wl_surface while the
xx_input_popup_surface_v2 object exists.
</description>
<enum name="error">
<entry name="invalid_serial" value="0" summary="received acknowledgement for a serial which has already been acknowledged or has never been issued"/>
</enum>
<event name="start_configure">
<description summary="configure the popup surface">
The start_configure event updates the popup geometry and marks the start of a configure sequence.
The anchor_* arguments represent the geometry of the anchor to which the popup was attached, relative to the upper left corner of the
popup's surface. Note that this makes anchor_x, anchor_y the reverse of the what they represent in xdg_popup.
A configure sequence is a set of one or more events configuring the state of the
input_popup_surface, starting with this event and ending with input_method.done. After the input_method.done event, the configure sequence is considered submitted.
State set by event in a configure sequence is conceptually double-buffered.
Every argument overwrites its previous value. The state change should get applied atomically with the input_method.done ending the sequence, and the value of serial should return to the undefined value.
Events on the input_popup_surface object received outside a configure sequence (while serial is undefined) must be ignored by the client.
A configure sequence shall be sent every time the compositor (re)positions the popup, or the shape of the anchor changes, for example after popup creation, or in response to text being typed and the text cursor moving.
The client may update the surface in response to input_method.done. Unless the popup is destroyed by the input_method.done, the client must reply with
an .ack_configure request with the serial sent in the start_configure event at
some point after the sequence ends and before committing the new surface.
If the client receives multiple configure sequences before it can respond
to one, it is free to discard all but the last event it received.
<!--
This sounds complicated because it is.
There are two semi-dependent states: that of the text input and that of the popup surface(s).
Alternatives:
1. Don't synchronize the state of the popup and the state of the text.
Rejected because every¹ time the pre-edit changes shape there are two events: the .configure for the surface and the .done from the input method.
¹Actually only when the pre-edit is committed. In the current design, changing the pre-edit doesn't get reported to input-method and doesn't cause a .done. A .done gets emitted for the cursor shape change (so on every stroke), so the compositor would be able to filter it out by paying attention to state changes. That would leave double-rendering only in the case of committing the text (surrounding-text changes) or text changing without input causing reposition (collaborative editing). Worth it maybe?
On the other hand, it's not impossible in the future that some other property gets updated on nearly every text change.
2. Complicate some and mandate .done after some .configures
Rejected because the different path for syncing (on .confgure or on .done) are difficult to explain and sound like a source of bugs. Also, this ended up needing additional events.
3. Simplify a lot and remove .configure in favor of relying on .done entirely
Rejected because it pulls in .ack_configure after every .done regardless of surface status. Also underspecifed regarding which popup needs to be configured.
-->
</description>
<arg name="width" type="uint" summary="popup width"/>
<arg name="height" type="uint" summary="popup height"/>
<arg name="anchor_x" type="int"
summary="x position relative to anchor geometry"/>
<arg name="anchor_y" type="int"
summary="y position relative to anchor geometry"/>
<arg name="anchor_width" type="uint"
summary="width of the anchor area"/>
<arg name="anchor_height" type="uint"
summary="height of the anchor area"/>
<arg name="serial" type="uint" summary="serial of the configure sequence"/>
</event>
<request name="ack_configure">
<description summary="acknowledge a configure sequence">
This request notifies the compositor that the client updated its surface in response to a configure sequence.
The purpose of this request is to synchronize the updates of the surface geometry with the surface contents.
For example, when the compositor assigns a size larger than prevously, the client must fill the additional space before the popup gets displayed to the user with the new size. When the compositor receives .ack_configure, it can proceed to draw the new size.
.ack_configure should be sent after every submitted configure sequence, passing along the serial received in it.
An .ack_configure request is conceptually double-buffered.
Every request overrides the previous one. The request takes effect once the .commit request is sent on the corresponding surface.
If the client receives multiple configure sequences before it
can respond to one, it may acknowledge only the last configure sequence by using its serial in the .ack_configure request.
Committing an .ack_configure request consumes the serial number sent with
the request, as well as serial numbers sent by all configure sequences
submitted on this input_popup_surface prior to the configure sequence referenced by
the committed serial.
Committing this request with a serial that, for this surface, never appeared in a submitted configure sequence, or one that was already committed before, raises an invalid_serial
error.
</description>
<arg name="serial" type="uint" summary="the serial from the configure sequence"/>
</request>
<request name="reposition">
<description summary="recalculate the popup's location">
Reposition an already-mapped popup. The popup will be placed given the
details in the passed input_popup_positioner object.
The request is processed immediately, without the need to issue wl_surface.commit, but the actual repositioning takes place later, after .ack_configure.
The compositor should reply with a configure sequence including:
- input_popup_surface.start_configure,
- input_popup_surface.repositioned, including the token passed in this request.
This will discard any parameters set by the previous positioner.
If multiple .reposition requests are sent before the .repositioned event is submitted as part of a configure sequence, the compositor may ignore all
but the last one.
The new popup position will not take
effect until the corresponding configure sequence is acknowledged by the
client. See input_popup_surface.repositioned for details.
The token itself is opaque, and has no other special meaning.
</description>
<arg name="positioner" type="object" interface="xx_input_popup_positioner_v1"/>
<arg name="token" type="uint" summary="reposition request token"/>
</request>
<event name="repositioned">
<description summary="signal the completion of a reposition request">
The compositor sends the .repositioned event in response to the .reposition request to notify about its completion.
The new geometry of the popup can be communicated using additional events within a configure sequence including:
- input_popup_surface.start_configure, and
- the .anchor_position event to update the relative position to the anchor.
When responding to a .reposition request, the token argument is the token passed in the that request.
This event is sent as part of a configure sequence.
State set by this event is conceptually double-buffered.
Every argument overwrites its previous value. The state change should get applied atomically with the next input_method.done event.
The client should optionally update the content of the popup, but must
acknowledge the new popup configuration for the new position to take
effect. See input_popup_surface.ack_configure for details.
</description>
<arg name="token" type="uint" summary="reposition request token"/>
</event>
<request name="destroy" type="destructor">
<description summary="remove the popup">
This destroys the popup. Explicitly destroying the input_popup_surface
object will also dismiss the popup, and unmap the surface.
</description>
</request>
</interface>
<interface name="xx_input_popup_positioner_v1" version="1">
<description summary="input method popup positioner">
The input_popup_positioner provides a collection of rules for the placement of an input method popup surface relative to the cursor.
Rules can be defined to ensure
the text input area remains within the visible area's borders, and to
specify how the popup changes its position, such as sliding along
an axis, or flipping around a rectangle. These positioner-created rules are
constrained by the requirement that a popup must intersect with or
be at least partially adjacent to the surface containing the text input.
See the various requests for details about possible rules.
A newly created positioner has the following state:
- 0 surface width
- 0 surface height
- anchor at the center ("none")
- gravity towards the center ("none")
- constraints adjustment set to none
- offset at x = 0, y = 0
- not reactive
Upon receiving a request taking the positioner as an argument, the compositor makes a copy of the rules
specified by the input_popup_positioner. Thus, after the request is complete the
input_popup_positioner object can be destroyed or reused; further changes to the
object will have no effect on previous usages.
For an input_popup_positioner object to be considered complete, its state must contain a non-zero width and height. Passing an incomplete input_popup_positioner object when
positioning a surface raises an invalid_positioner error.
</description>
<enum name="error">
<entry name="invalid_input" value="0" summary="invalid input provided"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the input_popup_positioner object">
Notify the compositor that the positioner will no longer be used.
</description>
</request>
<request name="set_size">
<description summary="set the size of the to-be positioned rectangle">
Set the size of the surface that is to be positioned with the positioner
object. The size is in surface-local coordinates and corresponds to the
window geometry. See xdg_surface.set_window_geometry.
If any dimension is set to zero, the invalid_input error is raised.
</description>
<arg name="width" type="uint" summary="width of positioned rectangle"/>
<arg name="height" type="uint" summary="height of positioned rectangle"/>
</request>
<enum name="anchor">
<entry name="none" value="0" summary="no edge, specfies center"/>
<entry name="top" value="1"/>
<entry name="bottom" value="2"/>
<entry name="left" value="3"/>
<entry name="right" value="4"/>
<entry name="top_left" value="5"/>
<entry name="bottom_left" value="6"/>
<entry name="top_right" value="7"/>
<entry name="bottom_right" value="8"/>
</enum>
<request name="set_anchor">
<description summary="set anchor rectangle anchor">
Defines the anchor point for the anchor rectangle. The specified anchor
is used to derive an anchor point that the popup surface will be
positioned relative to. If a corner anchor is set (e.g. 'top_left' or
'bottom_right'), the anchor point will be at the specified corner;
otherwise, the derived anchor point will be centered on the specified
edge, or in the center of the anchor rectangle if no edge is specified.
</description>
<arg name="anchor" type="uint" enum="anchor"
summary="anchor"/>
</request>
<enum name="gravity">
<entry name="none" value="0" summary="center to center"/>
<entry name="top" value="1"/>
<entry name="bottom" value="2"/>
<entry name="left" value="3"/>
<entry name="right" value="4"/>
<entry name="top_left" value="5"/>
<entry name="bottom_left" value="6"/>
<entry name="top_right" value="7"/>
<entry name="bottom_right" value="8"/>
</enum>
<request name="set_gravity">
<description summary="set surface gravity">
Defines in what direction the surface should be positioned, relative to
the anchor point of the anchor rectangle. If a corner gravity is
specified (e.g. 'bottom_right' or 'top_left'), then the surface
will be placed towards the specified gravity; otherwise, the child
surface will be centered over the anchor point on any axis that had no
gravity specified. If the gravity is not in the gravity enum, an
invalid_input error is raised.
</description>
<arg name="gravity" type="uint" enum="gravity"
summary="gravity direction"/>
</request>
<enum name="constraint_adjustment" bitfield="true">
<description summary="constraint adjustments">
The constraint adjustment value define ways the compositor will adjust
the position of the surface, if the unadjusted position would result
in the surface being partly constrained.
Whether a surface is considered 'constrained' is left to the compositor
to determine. For example, the surface may be partly outside the
compositor's defined 'work area', thus necessitating the child surface's
position be adjusted until it is entirely inside the work area.
The adjustments can be combined, according to a defined precedence: 1)
Flip, 2) Slide, 3) Resize.
</description>
<entry name="none" value="0">
<description summary="don't move the surface when constrained">
Don't alter the surface position even if it is constrained on some
axis, for example partially outside the edge of an output.
</description>
</entry>
<entry name="slide_x" value="1">
<description summary="move along the x axis until unconstrained">
Slide the surface along the x axis until it is no longer constrained.
First try to slide towards the direction of the gravity on the x axis
until either the edge in the opposite direction of the gravity is
unconstrained or the edge in the direction of the gravity is
constrained.
Then try to slide towards the opposite direction of the gravity on the
x axis until either the edge in the direction of the gravity is
unconstrained or the edge in the opposite direction of the gravity is
constrained.
</description>
</entry>
<entry name="slide_y" value="2">
<description summary="move along the y axis until unconstrained">
Slide the surface along the y axis until it is no longer constrained.
First try to slide towards the direction of the gravity on the y axis
until either the edge in the opposite direction of the gravity is
unconstrained or the edge in the direction of the gravity is
constrained.
Then try to slide towards the opposite direction of the gravity on the
y axis until either the edge in the direction of the gravity is
unconstrained or the edge in the opposite direction of the gravity is
constrained.
</description>
</entry>
<entry name="flip_x" value="4">
<description summary="invert the anchor and gravity on the x axis">
Invert the anchor and gravity on the x axis if the surface is
constrained on the x axis. For example, if the left edge of the
surface is constrained, the gravity is 'left' and the anchor is
'left', change the gravity to 'right' and the anchor to 'right'.
If the adjusted position also ends up being constrained, the resulting
position of the flip_x adjustment will be the one before the
adjustment.
</description>
</entry>
<entry name="flip_y" value="8">
<description summary="invert the anchor and gravity on the y axis">
Invert the anchor and gravity on the y axis if the surface is
constrained on the y axis. For example, if the bottom edge of the
surface is constrained, the gravity is 'bottom' and the anchor is
'bottom', change the gravity to 'top' and the anchor to 'top'.
The adjusted position is calculated given the original anchor
rectangle and offset, but with the new flipped anchor and gravity
values.
If the adjusted position also ends up being constrained, the resulting
position of the flip_y adjustment will be the one before the
adjustment.
</description>
</entry>
<entry name="resize_x" value="16">
<description summary="horizontally resize the surface">
Resize the surface horizontally so that it is completely
unconstrained.
</description>
</entry>
<entry name="resize_y" value="32">
<description summary="vertically resize the surface">
Resize the surface vertically so that it is completely unconstrained.
</description>
</entry>
</enum>
<request name="set_constraint_adjustment">
<description summary="set the adjustment to be done when constrained">
Specify how the popup should be positioned if the originally intended
position caused the surface to be constrained, meaning at least
partially outside positioning boundaries set by the compositor. The
adjustment is set by constructing a bitmask describing the adjustment to
be made when the surface is constrained on that axis.
If no bit for one axis is set, the compositor will assume that the child
surface should not change its position on that axis when constrained.
If more than one bit for one axis is set, the order of how adjustments
are applied is specified in the corresponding adjustment descriptions.
The default adjustment is none.
</description>
<arg name="constraint_adjustment" type="uint" enum="constraint_adjustment"
summary="bit mask of constraint adjustments"/>
</request>
<request name="set_offset">
<description summary="set surface position offset">
Specify the surface position offset relative to the position of the
anchor on the anchor rectangle and the anchor on the surface. For
example if the anchor of the anchor rectangle is at (x, y), the surface
has the gravity bottom|right, and the offset is (ox, oy), the calculated
surface position will be (x + ox, y + oy). The offset position of the
surface is the one used for constraint testing. See
set_constraint_adjustment.
An example use case is placing a popup menu on top of a user interface
element, while aligning the user interface element of the parent surface
with some user interface element placed somewhere in the popup surface.
</description>
<arg name="x" type="int" summary="surface position x offset"/>
<arg name="y" type="int" summary="surface position y offset"/>
</request>
<request name="set_reactive">
<description summary="continuously reconstrain the surface">
When set reactive, the surface is reconstrained if the conditions used
for constraining changed, e.g. the window containing the text input moved.
Whenever the conditions change and the popup gets reconstrained, a
configure sequence is sent with updated geometry.
</description>
</request>
</interface>
<interface name="xx_input_method_manager_v2" version="3">
<description summary="input method manager">
The input method manager allows the client to become the input method on
a chosen seat.
No more than one input method must be associated with any seat at any
given time.
</description>
<request name="get_input_method">
<description summary="request an input method object">
Request a new input xx_input_method_v1 object associated with a given
seat.
</description>
<arg name="seat" type="object" interface="wl_seat"/>
<arg name="input_method" type="new_id" interface="xx_input_method_v1"/>
</request>
<request name="get_positioner">
<description summary="create a positioner object">
Create a positioner object. A positioner object is used to position
surfaces relative to some parent surface. See the interface description
and xdg_surface.get_popup for details.
</description>
<arg name="id" type="new_id" interface="xx_input_popup_positioner_v1"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the input method manager">
Destroys the xx_input_method_manager_v2 object.
The xx_input_method_v1 objects originating from it remain valid.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Keyboard filter protocol
Maintainers:
Dorota Czaplejewicz <gilaac.dcz@porcupinefactory.org>

View file

@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="keyboard_filter_experimental_v1">
<copyright>
Copyright 2018 Mike Blumenkrantz
Copyright 2018 Samsung Electronics Co., Ltd
Copyright 2018 Red Hat Inc.
Copyright 2025 DorotaC
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="filter and intercept keyboard events">
The keyboard_filter protocol allows a client to intercept selected keyboard events and prevent them from reaching the focused surface.
This protocol offers a way to alter events reaching an application without the need to allow generating arbitrary keyboard events.
High-level overview of the interfaces:
The keyboard_filter_manager exposes the bind_to_input_method request which binds a wl_keyboard to an xx_input_method.
The resulting keyboard_filter object has the can be then used for intercepting keyboard events in accordance to input method needs.
This document adheres to the RFC 2119 when using words like "must",
"should", "may", etc.
Warning! The protocol described in this file is currently in the
experimental phase. Backwards incompatible major versions of the
protocol are to be expected. Exposing this protocol without an opt-in
mechanism is discouraged.
</description>
<interface name="xx_keyboard_filter_v1" version="1">
<description summary="keyboard event filtering functionality">
Manages the filtering of key presses.
</description>
<enum name="error">
<entry name="invalid_serial" value="0x1" summary="compositor received serial not adhering to requirements"/>
</enum>
<request name="unbind">
<description summary="Stop intercepting">
Unbind the keyboard and stop intercepting events.
Unbinds the bound keyboard and the input method. the compositor must stop redirecting keyboard events. Events that the keyboard_filter client has not yet responded to are treated as if they received the "passthrough" action.
This request takes effect immediately.
</description>
</request>
<enum name="filter_action">
<entry name="consume" value="0" summary="consume the key event"/>
<entry name="passthrough" value="1" summary="pass the key event to the text input client"/>
</enum>
<request name="filter">
<description summary="decide the processing of a keyboard event">
This request controls the filtering of keyboard input events before reaching the focused surface.
Usage:
While keyboard_filter is intercepting, the compositor must send every intercepted event to its bound wl_keyboard, and hold a copy of it in an internal queue.
When the client responds with the .filter request, the compositor either removes the event from the queue (filter_action.consume), or sends the copy to the original wl_keyboard objects (filter_action.passthrough).
The compositor must process .filter the oldest event in the queue before processing more recent ones.
For this reason, the client sets the argument "serial" to the serial of the corresponding event it received.
Exceptions:
If the event is other than wl_keyboard.key or contains no serial, it cannot be filtered. The keyboard_filter client must not respond to it with .filter request. When such an event is oldest in the queue, the compositor must proceed as if the event had received a "passthrough" reply.
As of wl_keyboard v10 and keyboard_filter_v1, the only event that can be filtered is the wl_keyboard.key event.
Sequence:
The wl_keyboard begins to receive events after input_method.activate is committed.
The valid serial is the serial of the oldest wl_keyboard event which has been sent after input_method.activate but which hasn't yet received a .filter confirmation.
The compositor may raise the invalid_serial error in response to events with serials it had not issued.
The compositor must ignore events with all other serials. (Particularly, this means events with repeating serials are accepted normally and are not ignored).
Events must be filtered in order of arrival.
</description>
<arg name="serial" type="uint"/>
<arg name="action" type="uint" enum="filter_action"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the keyboard">
Destroys the keyboard_filter object, stops event interception, and unbinds the wl_keyboard and input_method objects bound to it.
</description>
</request>
</interface>
<interface name="xx_keyboard_filter_manager_v1" version="1">
<enum name="error">
<entry name="already_bound" value="0x1" summary="an argument is already bound"/>
<entry name="wrong_seat" value="0x2" summary="the keyboard i attached to the wrong seat for this operation"/>
</enum>
<request name="bind_to_input_method">
<description summary="Bind a keyboard to an input method">
Bind a keyboard to an input method for the purpose of capturing key presses before they reach the text input client.
When a wl_keyboard is bound, the compositor must redirect to it the input events intended for the focused surface with text input enabled. The wl_keyboard instance receives no other events from then on.
See keyboard_filter.filter.
For the bound wl_keyboard instance to intercept events, the following conditions must be fulfilled:
- there's a focused surface,
- the surface has an enabled text input object,
- the bound input method is active (for the meaning of "active", see input_method.activate, input_method.deactivate).
When those conditions are fulfilled, the compositor must start redirecting input events intended for the text input surface to the wl_keyboard bound with this request. Otherwise, the text input surface receives events without intercepting them.
Be aware that the text input client might use a wl_keyboard object(s) of different version(s) than the one used by the input method. The compositor should issue events as it would normally do for the versions in question. This protocol assumes that events to multiple keyboards of different protocol versions are equivalent.
Background:
Whenever the input method is activated, the compositor must start sending it keyboard events intended for the text-input client, so that the input method can be controlled using a keyboard.
Traditionally, from the user perspective, input methods receive keys as if they were an overlay: keys which are interesting to the input method gain a special input method meaning, all others work as usual.
The binding and the keyboard_filter.filter request together make this possible by letting the input method indicate which events it is interested in.
Conceptually, when a wl_keyboard is bound to an input_method, the compositor prevents all keyboard events directed to the text input client from reaching it. They are delayed until the input method decides how to filter them using the keyboard_filter.filter request.
Arguments:
The wl_keyboard must not be already bound to another interface.
The wl_keyboard must only receive events between committed .activate and .deactivate.
The surface argument represents an arbitrary wl_surface. When issuing wl_keyboard.enter and wl_keyboard.leave on the bound wl_keyboard, the compositor must replace the original surface argument with the one provided by the input method in this request.
Because the wl_keyboard.enter and wl_keyboard.leave events require a surface as the target, one must be provided even if the input method doesn't display one. A dummy one is sufficient. The provided wl_surface will not be used for any other purpose than explained above.
The surface must outlive the input method.
NOTE: This feature works much better with compositor-side key repeat introduced in wl_seat version 10. This protocol doesn't provide controls for filtering repeat key events generated client-side.
A compositor implementing this protocol should implement compositor-side key repeat.
This request takes effect immediately.
Attempting to bind a keyboard to an input method which is already bound must cause the already_bound error.
Attempting to bind a keyboard object which was already bound must cause the already_bound error.
Attempting to bind a keyboard object to an input method acting on a different seat must cause the wrong_seat error.
When the input method gets destroyed, the compositor must stop issuing events to the keyboard and ignore any further requests to keyboard_filter, except keyboard_filter.destroy.
</description>
<arg name="keyboard" type="object" interface="wl_keyboard" />
<arg name="input_method" type="object" interface="xx_input_method_v1" />
<arg name="surface" type="object" interface="wl_surface" />
<arg name="extensions" type="new_id" interface="xx_keyboard_filter_v1"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the input method manager">
Destroys the xx_keyboard_filter_manager_v1 object.
The xx_keyboard_filter_v1 objects originating from it remain unaffected.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Session management protocol
Maintainers:
Carlos Garnacho <carlosg@gnome.org>

View file

@ -0,0 +1,264 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xx_session_management_v1">
<copyright>
Copyright 2018 Mike Blumenkrantz
Copyright 2018 Samsung Electronics Co., Ltd
Copyright 2018 Red Hat Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="Protocol for managing application sessions">
This description provides a high-level overview of the interplay between
the interfaces defined this protocol. For details, see the protocol
specification.
The xx_session_manager protocol declares interfaces necessary to
allow clients to restore toplevel state from previous executions. The
xx_session_manager_v1.get_session request can be used to obtain a
xx_session_v1 resource representing the state of a set of toplevels.
Clients may obtain the session string to use in future calls through
the xx_session_v1.created event. Compositors will use this string
as an identifiable token for future runs, possibly storing data about
the related toplevels in persistent storage.
Toplevels are managed through the xx_session_v1.add_toplevel and
xx_session_toplevel_v1.remove pair of requests. Clients will explicitly
request a toplevel to be restored according to prior state through the
xx_session_v1.restore_toplevel request before the toplevel is mapped.
Warning! The protocol described in this file is currently in the
experimental phase. Backwards incompatible major versions of the
protocol are to be expected. Exposing this protocol without an opt-in
mechanism is discouraged.
</description>
<interface name="xx_session_manager_v1" version="1">
<description summary="manage sessions for applications">
The xx_session_manager interface defines base requests for creating and
managing a session for an application. Sessions persist across application
and compositor restarts unless explicitly destroyed. A session is created
for the purpose of maintaining an application's xdg_toplevel surfaces
across compositor or application restarts. The compositor should remember
as many states as possible for surfaces in a given session, but there is
no requirement for which states must be remembered.
</description>
<enum name="error">
<entry name="in_use" summary="a requested session is already in use"
value="1"/>
</enum>
<enum name="reason">
<description summary="reason for getting a session">
The reason may determine in what way a session restores the window
management state of associated toplevels.
For example newly launched applications might be launched on the active
workspace with restored size and position, while a recovered
applications might restore additional state such as active workspace and
stacking order.
</description>
<entry name="launch" value="1">
<description summary="an app is newly launched">
A new app instance is launched, for example from an app launcher.
</description>
</entry>
<entry name="recover" value="2">
<description summary="an app recovered">
A app instance is recovering from for example a compositor or app crash.
</description>
</entry>
<entry name="session_restore" value="3">
<description summary="an app restored">
A app instance is restored, for example part of a restored session, or
restored from having been temporarily terminated due to resource
constraints.
</description>
</entry>
</enum>
<request name="destroy" type="destructor">
<description summary="Destroy this object">
This has no effect other than to destroy the xx_session_manager object.
</description>
</request>
<request name="get_session">
<description summary="create or restore a session">
Create a session object corresponding to either an existing session
identified by the given session identifier string or a new session.
While the session object exists, the session is considered to be "in
use".
If a identifier string represents a session that is currently actively
in use by the the same client, an 'in_use' error is raised. If some
other client is currently using the same session, the new session will
replace managing the associated state.
NULL is passed to initiate a new session. If an id is passed which does
not represent a valid session, the compositor treats it as if NULL had
been passed.
A client is allowed to have any number of in use sessions at the same
time.
</description>
<arg name="id" type="new_id" interface="xx_session_v1"/>
<arg name="reason" type="uint" enum="reason"
summary="reason for session"/>
<arg name="session" type="string"
summary="the session to restore"
allow-null="true"/>
</request>
</interface>
<interface name="xx_session_v1" version="1">
<description summary="A session for an application">
A xx_session_v1 object represents a session for an application. While the
object exists, all surfaces which have been added to the session will
have states stored by the compositor which can be reapplied at a later
time. Two sessions cannot exist for the same identifier string.
States for surfaces added to a session are automatically updated by the
compositor when they are changed.
Surfaces which have been added to a session are automatically removed from
the session if xdg_toplevel.destroy is called for the surface.
</description>
<enum name="error">
<entry name="invalid_restore"
summary="restore cannot be performed after initial toplevel commit"
value="1"/>
<entry name="name_in_use"
summary="toplevel name is already in used"
value="2"/>
<entry name="already_mapped"
summary="toplevel was already mapped when restored"
value="3"/>
</enum>
<request name="destroy" type="destructor">
<description summary="Destroy the session">
Destroy a session object, preserving the current state but not continuing
to make further updates if state changes occur. This makes the associated
xx_toplevel_session_v1 objects inert.
</description>
</request>
<request name="remove" type="destructor">
<description summary="Remove the session">
Remove the session, making it no longer available for restoration. A
compositor should in response to this request remove the data related to
this session from its storage.
</description>
</request>
<request name="add_toplevel">
<description summary="add a new surface to the session">
Attempt to add a given surface to the session. The passed name is used
to identify what window is being restored, and may be used store window
specific state within the session.
Calling this with a toplevel that is already managed by the session with
the same associated will raise an in_use error.
</description>
<arg name="id" type="new_id" interface="xx_toplevel_session_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
<arg name="name" type="string"/>
</request>
<request name="restore_toplevel">
<description summary="restore a surface state">
Inform the compositor that the toplevel associated with the passed name
should have its window management state restored.
Calling this with a toplevel that is already managed by the session with
the same associated will raise an in_use error.
This request must be called prior to the first commit on the associated
wl_surface, otherwise an already_mapped error is raised.
As part of the initial configure sequence, if the toplevel was
successfully restored, a xx_toplevel_session_v1.restored event is
emitted. See the xx_toplevel_session_v1.restored event for further
details.
</description>
<arg name="id" type="new_id" interface="xx_toplevel_session_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
<arg name="name" type="string"/>
</request>
<event name="created">
<description summary="newly-created session id">
Emitted at most once some time after getting a new session object. It
means that no previous state was restored, and a new session was created.
The passed id can be used to restore previous sessions.
</description>
<arg name="id" type="string"/>
</event>
<event name="restored">
<description summary="the session has been restored">
Emitted at most once some time after getting a new session object. It
means that previous state was at least partially restored. The same id
can again be used to restore previous sessions.
</description>
</event>
<event name="replaced">
<description summary="the session has been restored">
Emitted at most once, if the session was taken over by some other
client. When this happens, the session and all its toplevel session
objects become inert, and should be destroyed.
</description>
</event>
</interface>
<interface name="xx_toplevel_session_v1" version="1">
<request name="destroy" type="destructor">
<description summary="Destroy the object">
Destroy the object. This has no effect window management of the
associated toplevel.
</description>
</request>
<request name="remove" type="destructor">
<description summary="remove a surface from the session">
Remove a specified surface from the session and render any corresponding
xx_toplevel_session_v1 object inert. The compositor should remove any
data related to the toplevel in the corresponding session from its internal
storage.
</description>
</request>
<event name="restored">
<description summary="a toplevel's session has been restored">
The "restored" event is emitted prior to the first
xdg_toplevel.configure for the toplevel. It will only be emitted after
xx_session_v1.restore_toplevel, and the initial empty surface state has
been applied, and it indicates that the surface's session is being
restored with this configure event.
</description>
<arg name="surface" type="object" interface="xdg_toplevel"/>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,6 @@
Text input protocol
Maintainers:
Dorota Czaplejewicz <gilaac.dcz@porcupinefactory.org>

View file

@ -0,0 +1,575 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xx_text_input_unstable_v3">
<copyright>
Copyright © 2012, 2013 Intel Corporation
Copyright © 2015, 2016 Jan Arne Petersen
Copyright © 2017, 2018 Red Hat, Inc.
Copyright © 2018 Purism SPC
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
</copyright>
<description summary="Protocol for composing text">
This protocol allows compositors to act as input methods and to send text
to applications. A text input object is used to manage state of what are
typically text entry fields in the application.
This document adheres to the RFC 2119 when using words like "must",
"should", "may", etc.
Warning! The protocol described in this file is experimental and
backward incompatible changes may be made. Backward compatible changes
may be added together with the corresponding interface version bump.
Backward incompatible changes are done by bumping the version number in
the protocol and interface names and resetting the interface version.
Once the protocol is to be declared stable, the 'xx' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
</description>
<interface name="xx_text_input_v3" version="2">
<description summary="text input">
The xx_text_input_v3 interface represents text input and input methods
associated with a seat. It provides enter/leave events to follow the
text input focus for a seat.
Requests are used to enable/disable the text-input object and set
state information like surrounding and selected text or the content type.
The information about the entered text is sent to the text-input object
via the preedit_string and commit_string events.
Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices
must not point to middle bytes inside a code point: they must either
point to the first byte of a code point or to the end of the buffer.
Lengths must be measured between two valid indices.
Focus moving throughout surfaces will result in the emission of
xx_text_input_v3.enter and xx_text_input_v3.leave events. The focused
surface must commit xx_text_input_v3.enable and
xx_text_input_v3.disable requests as the keyboard focus moves across
editable and non-editable elements of the UI. Those two requests are not
expected to be paired with each other, the compositor must be able to
handle consecutive series of the same request.
State is sent by the state requests (set_surrounding_text,
set_content_type and set_cursor_rectangle) and a commit request. After an
enter event or disable request all state information is invalidated and
needs to be resent by the client.
</description>
<request name="destroy" type="destructor">
<description summary="Destroy the xx_text_input">
Destroy the xx_text_input object. Also disables all surfaces enabled
through this xx_text_input object.
</description>
</request>
<request name="enable">
<description summary="Request text input to be enabled">
Requests text input on the surface previously obtained from the enter
event.
This request must be issued every time the active text input changes
to a new one, including within the current surface. Use
xx_text_input_v3.disable when there is no longer any input focus on
the current surface.
Clients must not enable more than one text input on the single seat
and should disable the current text input before enabling the new one.
At most one instance of text input may be in enabled state per instance,
Requests to enable the another text input when some text input is active
must be ignored by compositor.
This request resets all state associated with previous enable, disable,
set_surrounding_text, set_text_change_cause, set_content_type, and
set_cursor_rectangle requests, as well as the state associated with
preedit_string, commit_string, delete_surrounding_text, and action
events.
The set_surrounding_text, set_content_type and set_cursor_rectangle
requests must follow if the text input supports the necessary
functionality.
State set with this request is double-buffered. It will get applied on
the next xx_text_input_v3.commit request, and stay valid until the
next committed enable or disable request.
The changes must be applied by the compositor after issuing a
xx_text_input_v3.commit request.
</description>
</request>
<request name="disable">
<description summary="Disable text input on a surface">
Explicitly disable text input on the current surface (typically when
there is no focus on any text entry inside the surface).
State set with this request is double-buffered. It will get applied on
the next xx_text_input_v3.commit request.
</description>
</request>
<request name="set_surrounding_text">
<description summary="sets the surrounding text">
Sets the surrounding plain text around the input, excluding the preedit
text.
The client should notify the compositor of any changes in any of the
values carried with this request, including changes caused by handling
incoming text-input events as well as changes caused by other
mechanisms like keyboard typing.
If the client is unaware of the text around the cursor, it should not
issue this request, to signify lack of support to the compositor.
Text is UTF-8 encoded, and should include the cursor position, the
complete selection and additional characters before and after them.
There is a maximum length of wayland messages, so text can not be
longer than 4000 bytes.
Cursor is the byte offset of the cursor within text buffer.
Anchor is the byte offset of the selection anchor within text buffer.
If there is no selected text, anchor is the same as cursor.
If any preedit text is present, it is replaced with a cursor for the
purpose of this event.
Values set with this request are double-buffered. They will get applied
on the next xx_text_input_v3.commit request, and stay valid until the
next committed enable or disable request.
The initial state for affected fields is empty, meaning that the text
input does not support sending surrounding text. If the empty values
get applied, subsequent attempts to change them may have no effect.
</description>
<arg name="text" type="string"/>
<arg name="cursor" type="int"/>
<arg name="anchor" type="int"/>
</request>
<enum name="change_cause">
<description summary="text change reason">
Reason for the change of surrounding text or cursor posision.
</description>
<entry name="input_method" value="0" summary="input method caused the change"/>
<entry name="other" value="1" summary="something else than the input method caused the change"/>
</enum>
<request name="set_text_change_cause">
<description summary="indicates the cause of surrounding text change">
Tells the compositor why the text surrounding the cursor changed.
Whenever the client detects an external change in text, cursor, or
anchor posision, it must issue this request to the compositor. This
request is intended to give the input method a chance to update the
preedit text in an appropriate way, e.g. by removing it when the user
starts typing with a keyboard.
cause describes the source of the change.
The value set with this request is double-buffered. It must be applied
and reset to initial at the next xx_text_input_v3.commit request.
The initial value of cause is input_method.
</description>
<arg name="cause" type="uint" enum="change_cause"/>
</request>
<enum name="content_hint" bitfield="true">
<description summary="content hint">
Content hint is a bitmask to allow to modify the behavior of the text
input.
</description>
<entry name="none" value="0x0" summary="no special behavior"/>
<entry name="completion" value="0x1" summary="suggest word completions"/>
<entry name="spellcheck" value="0x2" summary="suggest word corrections"/>
<entry name="auto_capitalization" value="0x4" summary="switch to uppercase letters at the start of a sentence"/>
<entry name="lowercase" value="0x8" summary="prefer lowercase letters"/>
<entry name="uppercase" value="0x10" summary="prefer uppercase letters"/>
<entry name="titlecase" value="0x20" summary="prefer casing for titles and headings (can be language dependent)"/>
<entry name="hidden_text" value="0x40" summary="characters should be hidden"/>
<entry name="sensitive_data" value="0x80" summary="typed text should not be stored"/>
<entry name="latin" value="0x100" summary="just Latin characters should be entered"/>
<entry name="multiline" value="0x200" summary="the text input is multiline"/>
</enum>
<enum name="content_purpose">
<description summary="content purpose">
The content purpose allows to specify the primary purpose of a text
input.
This allows an input method to show special purpose input panels with
extra characters or to disallow some characters.
</description>
<entry name="normal" value="0" summary="default input, allowing all characters"/>
<entry name="alpha" value="1" summary="allow only alphabetic characters"/>
<entry name="digits" value="2" summary="allow only digits"/>
<entry name="number" value="3" summary="input a number (including decimal separator and sign)"/>
<entry name="phone" value="4" summary="input a phone number"/>
<entry name="url" value="5" summary="input an URL"/>
<entry name="email" value="6" summary="input an email address"/>
<entry name="name" value="7" summary="input a name of a person"/>
<entry name="password" value="8" summary="input a password (combine with sensitive_data hint)"/>
<entry name="pin" value="9" summary="input is a numeric password (combine with sensitive_data hint)"/>
<entry name="date" value="10" summary="input a date"/>
<entry name="time" value="11" summary="input a time"/>
<entry name="datetime" value="12" summary="input a date and time"/>
<entry name="terminal" value="13" summary="input for a terminal"/>
</enum>
<request name="set_content_type">
<description summary="set content purpose and hint">
Sets the content purpose and content hint. While the purpose is the
basic purpose of an input field, the hint flags allow to modify some of
the behavior.
Values set with this request are double-buffered. They will get applied
on the next xx_text_input_v3.commit request.
Subsequent attempts to update them may have no effect. The values
remain valid until the next committed enable or disable request.
The initial value for hint is none, and the initial value for purpose
is normal.
</description>
<arg name="hint" type="uint" enum="content_hint"/>
<arg name="purpose" type="uint" enum="content_purpose"/>
</request>
<request name="set_cursor_rectangle">
<description summary="set cursor position">
Marks an area around the cursor as a x, y, width, height rectangle in
surface local coordinates.
Allows the compositor to put a window with word suggestions near the
cursor, without obstructing the text being input.
If the client is unaware of the position of edited text, it should not
issue this request, to signify lack of support to the compositor.
Values set with this request are double-buffered. They will get applied
on the next xx_text_input_v3.commit request, and stay valid until the
next committed enable or disable request.
The initial values describing a cursor rectangle are empty. That means
the text input does not support describing the cursor area. If the
empty values get applied, subsequent attempts to change them may have
no effect.
</description>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</request>
<request name="commit">
<description summary="commit state">
Atomically applies state changes recently sent to the compositor.
The commit request establishes and updates the state of the client, and
must be issued after any changes to apply them.
Text input state (enabled status, content purpose, content hint,
surrounding text and change cause, cursor rectangle) is conceptually
double-buffered within the context of a text input, i.e. between a
committed enable request and the following committed enable or disable
request.
Protocol requests modify the pending state, as opposed to the current
state in use by the input method. A commit request atomically applies
all pending state, replacing the current state. After commit, the new
pending state is as documented for each related request.
Requests are applied in the order of arrival.
Neither current nor pending state are modified unless noted otherwise.
The compositor must count the number of commit requests coming from
each xx_text_input_v3 object and use the count as the serial in done
events.
</description>
</request>
<event name="enter">
<description summary="enter event">
Notification that this seat's text-input focus is on a certain surface.
If client has created multiple text input objects, compositor must send
this event to all of them.
When the seat has the keyboard capability the text-input focus follows
the keyboard focus. This event sets the current surface for the
text-input object.
</description>
<arg name="surface" type="object" interface="wl_surface"/>
</event>
<event name="leave">
<description summary="leave event">
Notification that this seat's text-input focus is no longer on a
certain surface. The client should reset any preedit string previously
set.
The leave notification clears the current surface. It is sent before
the enter notification for the new focus. After leave event, compositor
must ignore requests from any text input instances until next enter
event.
When the seat has the keyboard capability the text-input focus follows
the keyboard focus.
</description>
<arg name="surface" type="object" interface="wl_surface"/>
</event>
<event name="preedit_string">
<description summary="pre-edit">
Notify when a new composing text (pre-edit) should be set at the
current cursor position. Any previously set composing text must be
removed. Any previously existing selected text must be removed.
The argument text contains the pre-edit string buffer.
The parameters cursor_begin and cursor_end are counted in bytes
relative to the beginning of the submitted text buffer. Cursor should
be hidden when both are equal to -1.
They could be represented by the client as a line if both values are
the same, or as a text highlight otherwise.
Values set with this event are double-buffered. They must be applied
and reset to initial on the next xx_text_input_v3.done event.
The initial value of text is an empty string, and cursor_begin,
cursor_end and cursor_hidden are all 0.
</description>
<arg name="text" type="string" allow-null="true"/>
<arg name="cursor_begin" type="int"/>
<arg name="cursor_end" type="int"/>
</event>
<event name="commit_string">
<description summary="text commit">
Notify when text should be inserted into the editor widget. The text to
commit could be either just a single character after a key press or the
result of some composing (pre-edit).
Values set with this event are double-buffered. They must be applied
and reset to initial on the next xx_text_input_v3.done event.
The initial value of text is an empty string.
</description>
<arg name="text" type="string" allow-null="true"/>
</event>
<event name="delete_surrounding_text">
<description summary="delete surrounding text">
Notify when the text around the current cursor position should be
deleted.
Before_length and after_length are the number of bytes before and after
the current cursor index (excluding the selection) to delete.
If a preedit text is present, in effect before_length is counted from
the beginning of it, and after_length from its end (see done event
sequence).
Values set with this event are double-buffered. They must be applied
and reset to initial on the next xx_text_input_v3.done event.
The initial values of both before_length and after_length are 0.
</description>
<arg name="before_length" type="uint" summary="length of text before current cursor position"/>
<arg name="after_length" type="uint" summary="length of text after current cursor position"/>
</event>
<event name="move_cursor" since="2">
<description summary="move cursor and change selection">
Unselects text, moves the cursor and selects text.
This is equivalent to dragging the mouse over some text: it deselects whatever might be currently selected and selects a new range of text.
The offsets used in arguments are in bytes relative to the current cursor position. Cursor is the new position of the cursor, and anchor is the opposite end of selection. If there's no selection, anchor should be equal to cursor.
In terms of dragging the mouse, the anchor is the start, and cursor the end.
The offsets do not take preedit contents into account, nor is preedit changed in any way with this request.
Both cursor and anchor must fall on code point boundaries, otherwise text input client may ignore the request. It is therefore not recommended for an input method to move any of them beyond the text received in surrounding_text.
<!-- Code point boundary checking must happen in the application because no one else is obliged to track the contents.
There are two ways to handle it:
1. add a request from the application informing the compositor of the mistake, so that the compositor can send an error and crash the input method, giving it the chance to reset and go back to normal
2. just ignore the request and hope the input method can resynchronize through surrounding_text
Choosing 2. because it's easier to implement.
-->
When surrounding_text is not supported, the offsets must not be interpreted as bytes, but as some human-readable unit at least as big as a code point, for example a grapheme.
The cursor and anchor arguments can also take the following special values:
BEGINNING := 0x8000_0000 = i32::MIN
END := 0x7fff_ffff = i32::MAX
meaning, respectively, the beginning and the end of of all text in the input field.
Values set with this event are double-buffered. They must be applied
and reset to initial on the next commit request.
The initial values of both cursor and anchor are 0.
</description>
<arg name="cursor" type="int"/>
<arg name="anchor" type="int"/>
</event>
<event name="done">
<description summary="apply changes">
Instruct the application to apply changes to state requested by the
preedit_string, commit_string delete_surrounding_text, and action
events.
The state relating to these events is double-buffered, and each one
modifies the pending state. This event replaces the current state with
the pending state.
The application must proceed by evaluating the changes in the following
order:
1. Replace existing preedit string with the cursor.
2. Delete requested surrounding text.
3. Insert commit string with the cursor at its end.
4. Move the cursor and selection.
5. Calculate surrounding text to send.
6. Insert new preedit text in cursor position.
7. Place cursor inside preedit text.
8. Perform the requested action.
The serial number reflects the last state of the xx_text_input_v3
object known to the compositor. The value of the serial argument must
be equal to the number of commit requests already issued on that object.
When the client receives a done event with a serial different than the
number of past commit requests, it must proceed with evaluating and
applying the changes as normal, except it should not change the current
state of the xx_text_input_v3 object. All pending state requests
(set_surrounding_text, set_content_type and set_cursor_rectangle) on
the xx_text_input_v3 object should be sent and committed after
receiving a xx_text_input_v3.done event with a matching serial.
</description>
<arg name="serial" type="uint"/>
</event>
<enum name="action" since="2">
<description summary="action">
A possible action to perform on a text input.
</description>
<!-- Notably missing: moving cursor, deleting and setting a selection. They are nicer to use as part of the text manipulation interface: ranges can be selected there.
Exceptions: the IME doesn't know where lines start or end. The IME will not get to see the entire 4MB document so it can't select all through the text interface. But this doesn't seem urgent. -->
<!-- types of finish actions are better communicated as a hint: this triggers a URL navigation, this sends a search query, this sends a message, etc. The input method can then choose the appropriate buttons to display -->
<entry name="finish" value="0">
<description summary="trigger appropriate action for the completion of editing">
This should be triggered when the user is done with editing the field and wants to move on. For example, the query was typed and the user wants the search result. Or the name was entered and the address needs to be typed next.
The action to perform depends on the application, and should match the value of the current content_purpose.
All clients SHOULD implement this action. Without it, on-screen keyboards don't work as expected.
</description>
</entry>
</enum>
<event name="perform_action" since="2">
<description summary="action performed">
The input method issued an action to perform on this text input.
Values set with this event are double-buffered. They must be applied
and reset to initial on the next .done event.
The initial value of action is none.
</description>
<arg name="action" type="uint" enum="action" summary="action performed"/>
</event>
<request name="set_available_actions" since="2">
<description summary="announce the available actions">
Announces the actions available for the currently active text input.
Values set with this event are double-buffered. They will get applied
on the next .done event.
They get reset to the initial value on the next committed deactivate event.
The initial value is an empty set: no actions are available.
Values in the available_actions array come from text-input-v3.action.
</description>
<!-- Removed the protocol error on none and duplicates because a client has no interest in crashing for slight compositor misbehaviour. Ignoring extraneous values should not be a problem for any half-competent library. -->
<arg name="available_actions" type="array" summary="available actions"/>
<!-- Should this be a bitmap instead of an array? 32 generic actions should be enough, and client-specific actions would need a new protocol anyway -->
</request>
<enum name="supported_features" bitfield="true" since="2">
<description summary="possible supported features">
Client functionality over the baseline that isn't indicated implicitly.
This does not include events coming with .enable: when the input method receives such an event, it is clear the text input supports it, e.g. content_type, available_actions.
Baseline functionality like commit_string, set_preedit_string must always be supported for the protocol to be useful.
The flags match text-input protocol versions, but should be kept general enough to support other protocols.
</description>
<entry name="none" value="0x0" summary="no extra functionality supported"/>
<entry name="move_cursor" value="0x1" summary="the move_cursor request"/>
</enum>
<request name="announce_supported_features" since="2">
<description summary="announce extra supported features">
Notifies the input method what the currently active text input client is able to do.
This event should come within the same .done sequence as .activate. Otherwise, the input method may ignore it.
Values set with this event are double-buffered. They will get applied
on the next .done event.
They get reset to initial on the next committed deactivate event.
The initial value for features is none.
</description>
<arg name="features" type="uint" enum="xx_text_input_v3.supported_features"/>
</request>
</interface>
<interface name="xx_text_input_manager_v3" version="2">
<description summary="text input manager">
A factory for text-input objects. This object is a global singleton.
</description>
<request name="destroy" type="destructor">
<description summary="Destroy the xx_text_input_manager">
Destroy the xx_text_input_manager object.
</description>
</request>
<request name="get_text_input">
<description summary="create a new text input object">
Creates a new text-input object for a given seat.
</description>
<arg name="id" type="new_id" interface="xx_text_input_v3"/>
<arg name="seat" type="object" interface="wl_seat"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,18 @@
header_install_dir = get_option('includedir') / 'wayland-protocols'
foreach protocol_file : protocol_files
header_name = fs.name(protocol_file).replace('.xml', '-enum.h')
headers += custom_target(
header_name,
output: header_name,
input: '../..' / protocol_file,
command: [
prog_scanner,
'--strict',
'enum-header',
'@INPUT@',
'@OUTPUT@',
],
install: true,
install_dir: header_install_dir,
)
endforeach

202
meson.build Normal file
View file

@ -0,0 +1,202 @@
project('wayland-protocols',
version: '1.47',
meson_version: '>= 0.58.0',
license: 'MIT/Expat',
)
wayland_protocols_version = meson.project_version()
fs = import('fs')
dep_scanner = dependency('wayland-scanner',
version: get_option('tests') ? '>=1.23.0' : '>=1.20.0',
native: true,
fallback: 'wayland'
)
prog_scanner = find_program(dep_scanner.get_variable(pkgconfig: 'wayland_scanner', internal: 'wayland_scanner'))
stable_protocols = {
'linux-dmabuf': ['v1'],
'presentation-time': [''],
'tablet': ['v2'],
'viewporter': [''],
'xdg-shell': [''],
}
unstable_protocols = {
'fullscreen-shell': ['v1'],
'idle-inhibit': ['v1'],
'input-method': ['v1'],
'input-timestamps': ['v1'],
'keyboard-shortcuts-inhibit': ['v1'],
'linux-dmabuf': ['v1'],
'linux-explicit-synchronization': ['v1'],
'pointer-constraints': ['v1'],
'pointer-gestures': ['v1'],
'primary-selection': ['v1'],
'relative-pointer': ['v1'],
'tablet': ['v1', 'v2'],
'text-input': ['v1', 'v3'],
'xdg-decoration': ['v1'],
'xdg-foreign': ['v1', 'v2'],
'xdg-output': ['v1'],
'xdg-shell': ['v5', 'v6'],
'xwayland-keyboard-grab': ['v1'],
}
staging_protocols = {
'alpha-modifier': ['v1'],
'color-management': ['v1'],
'color-representation': ['v1'],
'commit-timing': ['v1'],
'content-type': ['v1'],
'cursor-shape': ['v1'],
'drm-lease': ['v1'],
'ext-background-effect': ['v1'],
'ext-data-control': ['v1'],
'ext-foreign-toplevel-list': ['v1'],
'ext-idle-notify': ['v1'],
'ext-image-capture-source': ['v1'],
'ext-image-copy-capture': ['v1'],
'ext-session-lock': ['v1'],
'ext-transient-seat': ['v1'],
'ext-workspace': ['v1'],
'fifo': ['v1'],
'fractional-scale': ['v1'],
'linux-drm-syncobj': ['v1'],
'pointer-warp': ['v1'],
'security-context': ['v1'],
'single-pixel-buffer': ['v1'],
'tearing-control': ['v1'],
'xdg-activation': ['v1'],
'xdg-dialog': ['v1'],
'xdg-system-bell': ['v1'],
'xdg-toplevel-drag': ['v1'],
'xdg-toplevel-icon': ['v1'],
'xdg-toplevel-tag': ['v1'],
'xwayland-shell': ['v1'],
}
experimental_protocols = {
'xx-input-method': ['v2'],
'xx-keyboard-filter': ['v1'],
'xx-session-management': ['v1'],
'xx-text-input': ['v3'],
}
protocol_files = []
installed_protocol_files = []
stable_protocol_files = []
foreach name, versions : stable_protocols
foreach version : versions
if version == ''
stable_protocol_files += ['stable/@0@/@0@.xml'.format(name)]
else
stable_protocol_files += ['stable/@0@/@0@-@1@.xml'.format(name, version)]
endif
endforeach
endforeach
installed_protocol_files += stable_protocol_files
protocol_files += stable_protocol_files
staging_protocol_files = []
foreach name, versions : staging_protocols
foreach version : versions
staging_protocol_files += [
'staging/@0@/@0@-@1@.xml'.format(name, version)
]
endforeach
endforeach
installed_protocol_files += staging_protocol_files
protocol_files += staging_protocol_files
unstable_protocol_files = []
foreach name, versions : unstable_protocols
foreach version : versions
unstable_protocol_files += [
'unstable/@0@/@0@-unstable-@1@.xml'.format(name, version)
]
endforeach
endforeach
installed_protocol_files += unstable_protocol_files
protocol_files += unstable_protocol_files
experimental_protocol_files = []
foreach name, versions : experimental_protocols
foreach version : versions
experimental_protocol_files += [
'experimental/@0@/@0@-@1@.xml'.format(name, version)
]
endforeach
endforeach
protocol_files += experimental_protocol_files
# Check that each protocol has a README
foreach protocol_file : protocol_files
dir = fs.parent(protocol_file)
if not fs.is_file(dir + '/README')
error('Missing README in @0@'.format(protocol_file))
endif
endforeach
foreach protocol_file : installed_protocol_files
protocol_install_dir = fs.parent(join_paths(
get_option('datadir'),
'wayland-protocols',
protocol_file,
))
install_data(
protocol_file,
install_dir: protocol_install_dir,
)
endforeach
include_dirs = []
headers = []
if dep_scanner.version().version_compare('>=1.22.90')
subdir('include/wayland-protocols')
include_dirs = ['include']
endif
wayland_protocols_srcdir = meson.current_source_dir()
pkgconfig_configuration = configuration_data()
pkgconfig_configuration.set('prefix', get_option('prefix'))
pkgconfig_configuration.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
pkgconfig_configuration.set('datarootdir', '${prefix}/@0@'.format(get_option('datadir')))
pkgconfig_configuration.set('abs_top_srcdir', wayland_protocols_srcdir)
pkgconfig_configuration.set('PACKAGE', 'wayland-protocols')
pkgconfig_configuration.set('WAYLAND_PROTOCOLS_VERSION', wayland_protocols_version)
pkg_install_dir = join_paths(get_option('datadir'), 'pkgconfig')
configure_file(
input: 'wayland-protocols.pc.in',
output: 'wayland-protocols.pc',
configuration: pkgconfig_configuration,
install_dir: pkg_install_dir,
)
configure_file(
input: 'wayland-protocols-uninstalled.pc.in',
output: 'wayland-protocols-uninstalled.pc',
configuration: pkgconfig_configuration,
)
wayland_protocols = declare_dependency(
include_directories: include_dirs,
variables: {
'pkgdatadir': wayland_protocols_srcdir,
},
sources: headers,
)
meson.override_dependency('wayland-protocols', wayland_protocols)
if get_option('tests')
subdir('tests')
endif
summary({
'Headers': include_dirs.length() > 0,
}, bool_yn: true)

4
meson_options.txt Normal file
View file

@ -0,0 +1,4 @@
option('tests',
type: 'boolean',
value: true,
description: 'Build the tests')

View file

@ -0,0 +1,5 @@
Linux DMA-BUF protocol
Maintainers:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> (@pq)
Daniel Stone <daniels@collabora.com> (@daniels)

View file

@ -0,0 +1,218 @@
.. Copyright 2021 Simon Ser
.. contents::
linux-dmabuf feedback introduction
==================================
linux-dmabuf feedback allows compositors and clients to negotiate optimal buffer
allocation parameters. This document will assume that the compositor is using a
rendering API such as OpenGL or Vulkan and KMS as the presentation API: even if
linux-dmabuf feedback isn't restricted to this use-case, it's the most common.
linux-dmabuf feedback introduces the following concepts:
1. A main device. This is the render device that the compositor is using to
perform composition. Compositors should always be able to display a buffer
submitted by a client, so this device can be used as a fallback in case none
of the more optimized code-paths work. Clients should allocate buffers such
that they can be imported and textured from the main device.
2. One or more tranches. Each tranche consists of a target device, allocation
flags and a set of format/modifier pairs. A tranche can be seen as a set of
formats/modifier pairs that are compatible with the target device.
A tranche can have the ``scanout`` flag. It means that the target device is
a KMS device, and that buffers allocated with one of the format/modifier
pairs in the tranche are eligible for direct scanout.
Clients should use the tranches in order to allocate buffers with the most
appropriate format/modifier and also to avoid allocating in private device
memory when cross-device operations are going to happen.
linux-dmabuf feedback implementation notes
==========================================
This section contains recommendations for client and compositor implementations.
For clients
-----------
Clients are expected to either pick a fixed DRM format beforehand, or
perform the following steps repeatedly until they find a suitable format.
Basic clients may only support static buffer allocation on startup. These
clients should do the following:
1. Send a ``get_default_feedback`` request to get global feedback.
2. Select the device indicated by ``main_device`` for allocation.
3. For each tranche:
1. If ``tranche_target_device`` doesn't match the allocation device, ignore
the tranche.
2. Accumulate allocation flags from ``tranche_flags``.
3. Accumulate format/modifier pairs received via ``tranche_formats`` in a
list.
4. When the ``tranche_done`` event is received, try to allocate the buffer
with the accumulated list of modifiers and allocation flags. If that
fails, proceed with the next tranche. If that succeeds, stop the loop.
4. Destroy the feedback object.
Tranches are ordered by preference: the more optimized tranches come first. As
such, clients should use the first tranche that happens to work.
Some clients may have already selected the device they want to use beforehand.
These clients can ignore the ``main_device`` event, and ignore tranches whose
``tranche_target_device`` doesn't match the selected device. Such clients need
to be prepared for the ``wp_linux_buffer_params.create`` request to potentially
fail.
If the client allocates a buffer without specifying explicit modifiers on a
device different from the one indicated by ``main_device``, then the client
must force a linear layout.
Some clients might support re-negotiating the buffer format/modifier on the
fly. These clients should send a ``get_surface_feedback`` request and keep the
feedback object alive after the initial allocation. Each time a new set of
feedback parameters is received (ended by the ``done`` event), they should
perform the same steps as basic clients described above. They should detect
when the optimal allocation parameters didn't change (same
format/modifier/flags) to avoid needlessly re-allocating their buffers.
Some clients might additionally support switching the device used for
allocations on the fly. Such clients should send a ``get_surface_feedback``
request. For each tranche, select the device indicated by
``tranche_target_device`` for allocation. Accumulate allocation flags (received
via ``tranche_flags``) and format/modifier pairs (received via
``tranche_formats``) as usual. When the ``tranche_done`` event is received, try
to allocate the buffer with the accumulated list of modifiers and the
allocation flags. Try to import the resulting buffer by sending a
``wp_linux_buffer_params.create`` request (this might fail). Repeat with each
tranche until an allocation and import succeeds. Each time a new set of
feedback parameters is received, they should perform these steps again. They
should detect when the optimal allocation parameters didn't change (same
device/format/modifier/flags) to avoid needlessly re-allocating their buffers.
For compositors
---------------
Basic compositors may only support texturing the DMA-BUFs via a rendering API
such as OpenGL or Vulkan. Such compositors can send a single tranche as a reply
to both ``get_default_feedback`` and ``get_surface_feedback``. Set the
``main_device`` to the rendering device. Send the tranche with
``tranche_target_device`` set to the rendering device and all of the DRM
format/modifier pairs supported by the rendering API. Do not set the
``scanout`` flag in the ``tranche_flags`` event.
Some compositors may support direct scan-out for full-screen surfaces. These
compositors can re-send the feedback parameters when a surface becomes
full-screen or leaves full-screen mode if the client has used the
``get_surface_feedback`` request. The non-full-screen feedback parameters are
the same as basic compositors described above. The full-screen feedback
parameters have two tranches: one with the format/modifier pairs supported by
the KMS plane, with the ``scanout`` flag set in the ``tranche_flags`` event and
with ``tranche_target_device`` set to the KMS scan-out device; the other with
the rest of the format/modifier pairs (supported for texturing, but not for
scan-out), without the ``scanout`` flag set in the ``tranche_flags`` event, and
with the ``tranche_target_device`` set to the rendering device.
Some compositors may support direct scan-out for all surfaces. These
compositors can send two tranches for surfaces that become candidates for
direct scan-out, similarly to compositors supporting direct scan-out for
fullscreen surfaces. When a surface stops being a candidate for direct
scan-out, compositors should re-send the feedback parameters optimized for
texturing only. The way candidates for direct scan-out are selected is
compositor policy, a possible implementation is to select as many surfaces as
there are available hardware planes, starting from surfaces closer to the eye.
Some compositors may support multiple devices at the same time. If the
compositor supports rendering with a fixed device and direct scan-out on a
secondary device, it may send a separate tranche for surfaces displayed on
the secondary device that are candidates for direct scan-out. The
``tranche_target_device`` for this tranche will be the secondary device and
will not match the ``main_device``.
Some compositors may support switching their rendering device at runtime or
changing their rendering device depending on the surface. When the rendering
device changes for a surface, such compositors may re-send the feedback
parameters with a different ``main_device``. However there is a risk that
clients don't support switching their device at runtime and continue using the
previous device. For this reason, compositors should always have a fallback
rendering device that they initially send as ``main_device``, such that these
clients use said fallback device.
Compositors should not change the ``main_device`` on-the-fly when explicit
modifiers are not supported, because there's a risk of importing buffers
with an implicit non-linear modifier as a linear buffer, resulting in
misinterpreted buffer contents.
Compositors should not send feedback parameters if they don't have a fallback
path. For instance, compositors shouldn't send a format/modifier supported for
direct scan-out but not supported by the rendering API for texturing.
Compositors can decide to use multiple tranches to describe the allocation
parameters optimized for texturing. For example, if there are formats which
have a fast texturing path and formats which have a slower texturing path, the
compositor can decide to expose two separate tranches.
Compositors can decide to use intermediate tranches to describe code-paths
slower than direct scan-out but faster than texturing. For instance, a
compositor could insert an intermediate tranche if it's possible to use a
mem2mem device to convert buffers to be able to use scan-out.
``dev_t`` encoding
==================
The protocol carries ``dev_t`` values on the wire using arrays. A compositor
written in C can encode the values as follows:
.. code-block:: c
struct stat drm_node_stat;
struct wl_array dev_array = {
.size = sizeof(drm_node_stat.st_rdev),
.data = &drm_node_stat.st_rdev,
};
A client can decode the values as follows:
.. code-block:: c
dev_t dev;
assert(dev_array->size == sizeof(dev));
memcpy(&dev, dev_array->data, sizeof(dev));
Because two DRM nodes can refer to the same DRM device while having different
``dev_t`` values, clients should use ``drmDevicesEqual`` to compare two
devices.
``format_table`` encoding
=========================
The ``format_table`` event carries a file descriptor containing a list of
format + modifier pairs. The list is an array of pairs which can be accessed
with this C structure definition:
.. code-block:: c
struct dmabuf_format_modifier {
uint32_t format;
uint32_t pad; /* unused */
uint64_t modifier;
};
Integration with other APIs
===========================
- libdrm: ``drmGetDeviceFromDevId`` returns a ``drmDevice`` from a device ID.
- EGL: the `EGL_EXT_device_drm_render_node`_ extension may be used to query the
DRM device render node used by a given EGL display. When unavailable, the
older `EGL_EXT_device_drm`_ extension may be used as a fallback.
- Vulkan: the `VK_EXT_physical_device_drm`_ extension may be used to query the
DRM device used by a given ``VkPhysicalDevice``.
.. _EGL_EXT_device_drm: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_drm.txt
.. _EGL_EXT_device_drm_render_node: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_drm_render_node.txt
.. _VK_EXT_physical_device_drm: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_physical_device_drm.html

View file

@ -0,0 +1,585 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="linux_dmabuf_v1">
<copyright>
Copyright © 2014, 2015 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="zwp_linux_dmabuf_v1" version="5">
<description summary="factory for creating dmabuf-based wl_buffers">
This interface offers ways to create generic dmabuf-based wl_buffers.
For more information about dmabuf, see:
https://www.kernel.org/doc/html/next/userspace-api/dma-buf-alloc-exchange.html
Clients can use the get_surface_feedback request to get dmabuf feedback
for a particular surface. If the client wants to retrieve feedback not
tied to a surface, they can use the get_default_feedback request.
The following are required from clients:
- Clients must ensure that either all data in the dma-buf is
coherent for all subsequent read access or that coherency is
correctly handled by the underlying kernel-side dma-buf
implementation.
- Don't make any more attachments after sending the buffer to the
compositor. Making more attachments later increases the risk of
the compositor not being able to use (re-import) an existing
dmabuf-based wl_buffer.
The underlying graphics stack must ensure the following:
- The dmabuf file descriptors relayed to the server will stay valid
for the whole lifetime of the wl_buffer. This means the server may
at any time use those fds to import the dmabuf into any kernel
sub-system that might accept it.
However, when the underlying graphics stack fails to deliver the
promise, because of e.g. a device hot-unplug which raises internal
errors, after the wl_buffer has been successfully created the
compositor must not raise protocol errors to the client when dmabuf
import later fails.
To create a wl_buffer from one or more dmabufs, a client creates a
zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params
request. All planes required by the intended format are added with
the 'add' request. Finally, a 'create' or 'create_immed' request is
issued, which has the following outcome depending on the import success.
The 'create' request,
- on success, triggers a 'created' event which provides the final
wl_buffer to the client.
- on failure, triggers a 'failed' event to convey that the server
cannot use the dmabufs received from the client.
For the 'create_immed' request,
- on success, the server immediately imports the added dmabufs to
create a wl_buffer. No event is sent from the server in this case.
- on failure, the server can choose to either:
- terminate the client by raising a fatal error.
- mark the wl_buffer as failed, and send a 'failed' event to the
client. If the client uses a failed wl_buffer as an argument to any
request, the behaviour is compositor implementation-defined.
For all DRM formats and unless specified in another protocol extension,
pre-multiplied alpha is used for pixel values.
Unless specified otherwise in another protocol extension, implicit
synchronization is used. In other words, compositors and clients must
wait and signal fences implicitly passed via the DMA-BUF's reservation
mechanism.
</description>
<request name="destroy" type="destructor">
<description summary="unbind the factory">
Objects created through this interface, especially wl_buffers, will
remain valid.
</description>
</request>
<request name="create_params">
<description summary="create a temporary object for buffer parameters">
This temporary object is used to collect multiple dmabuf handles into
a single batch to create a wl_buffer. It can only be used once and
should be destroyed after a 'created' or 'failed' event has been
received.
</description>
<arg name="params_id" type="new_id" interface="zwp_linux_buffer_params_v1"
summary="the new temporary"/>
</request>
<event name="format" deprecated-since="4">
<description summary="supported buffer format">
This event advertises one buffer format that the server supports.
All the supported formats are advertised once when the client
binds to this interface. A roundtrip after binding guarantees
that the client has received all supported formats.
For the definition of the format codes, see the
zwp_linux_buffer_params_v1::create request.
Starting version 4, the format event is deprecated and must not be
sent by compositors. Instead, use get_default_feedback or
get_surface_feedback.
</description>
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
</event>
<event name="modifier" since="3" deprecated-since="4">
<description summary="supported buffer format modifier">
This event advertises the formats that the server supports, along with
the modifiers supported for each format. All the supported modifiers
for all the supported formats are advertised once when the client
binds to this interface. A roundtrip after binding guarantees that
the client has received all supported format-modifier pairs.
For legacy support, DRM_FORMAT_MOD_INVALID (that is, modifier_hi ==
0x00ffffff and modifier_lo == 0xffffffff) is allowed in this event.
It indicates that the server can support the format with an implicit
modifier. When a plane has DRM_FORMAT_MOD_INVALID as its modifier, it
is as if no explicit modifier is specified. The effective modifier
will be derived from the dmabuf.
A compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for
a given format supports both explicit modifiers and implicit modifiers.
For the definition of the format and modifier codes, see the
zwp_linux_buffer_params_v1::create and zwp_linux_buffer_params_v1::add
requests.
Starting version 4, the modifier event is deprecated and must not be
sent by compositors. Instead, use get_default_feedback or
get_surface_feedback.
</description>
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
<arg name="modifier_hi" type="uint"
summary="high 32 bits of layout modifier"/>
<arg name="modifier_lo" type="uint"
summary="low 32 bits of layout modifier"/>
</event>
<!-- Version 4 additions -->
<request name="get_default_feedback" since="4">
<description summary="get default feedback">
This request creates a new wp_linux_dmabuf_feedback object not bound
to a particular surface. This object will deliver feedback about dmabuf
parameters to use if the client doesn't support per-surface feedback
(see get_surface_feedback).
</description>
<arg name="id" type="new_id" interface="zwp_linux_dmabuf_feedback_v1"/>
</request>
<request name="get_surface_feedback" since="4">
<description summary="get feedback for a surface">
This request creates a new wp_linux_dmabuf_feedback object for the
specified wl_surface. This object will deliver feedback about dmabuf
parameters to use for buffers attached to this surface.
If the surface is destroyed before the wp_linux_dmabuf_feedback object,
the feedback object becomes inert.
</description>
<arg name="id" type="new_id" interface="zwp_linux_dmabuf_feedback_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="zwp_linux_buffer_params_v1" version="5">
<description summary="parameters for creating a dmabuf-based wl_buffer">
This temporary object is a collection of dmabufs and other
parameters that together form a single logical buffer. The temporary
object may eventually create one wl_buffer unless cancelled by
destroying it before requesting 'create'.
Single-planar formats only require one dmabuf, however
multi-planar formats may require more than one dmabuf. For all
formats, an 'add' request must be called once per plane (even if the
underlying dmabuf fd is identical).
You must use consecutive plane indices ('plane_idx' argument for 'add')
from zero to the number of planes used by the drm_fourcc format code.
All planes required by the format must be given exactly once, but can
be given in any order. Each plane index can only be set once; subsequent
calls with a plane index which has already been set will result in a
plane_set error being generated.
</description>
<enum name="error">
<entry name="already_used" value="0"
summary="the dmabuf_batch object has already been used to create a wl_buffer"/>
<entry name="plane_idx" value="1"
summary="plane index out of bounds"/>
<entry name="plane_set" value="2"
summary="the plane index was already set"/>
<entry name="incomplete" value="3"
summary="missing or too many planes to create a buffer"/>
<entry name="invalid_format" value="4"
summary="format not supported"/>
<entry name="invalid_dimensions" value="5"
summary="invalid width or height"/>
<entry name="out_of_bounds" value="6"
summary="offset + stride * height goes out of dmabuf bounds"/>
<entry name="invalid_wl_buffer" value="7"
summary="invalid wl_buffer resulted from importing dmabufs via
the create_immed request on given buffer_params"/>
</enum>
<request name="destroy" type="destructor">
<description summary="delete this object, used or not">
Cleans up the temporary data sent to the server for dmabuf-based
wl_buffer creation.
</description>
</request>
<request name="add">
<description summary="add a dmabuf to the temporary set">
This request adds one dmabuf to the set in this
zwp_linux_buffer_params_v1.
The 64-bit unsigned value combined from modifier_hi and modifier_lo
is the dmabuf layout modifier. DRM AddFB2 ioctl calls this the
fb modifier, which is defined in drm_mode.h of Linux UAPI.
This is an opaque token. Drivers use this token to express tiling,
compression, etc. driver-specific modifications to the base format
defined by the DRM fourcc code.
Starting from version 4, the invalid_format protocol error is sent if
the format + modifier pair was not advertised as supported.
Starting from version 5, the invalid_format protocol error is sent if
all planes don't use the same modifier.
This request raises the PLANE_IDX error if plane_idx is too large.
The error PLANE_SET is raised if attempting to set a plane that
was already set.
</description>
<arg name="fd" type="fd" summary="dmabuf fd"/>
<arg name="plane_idx" type="uint" summary="plane index"/>
<arg name="offset" type="uint" summary="offset in bytes"/>
<arg name="stride" type="uint" summary="stride in bytes"/>
<arg name="modifier_hi" type="uint"
summary="high 32 bits of layout modifier"/>
<arg name="modifier_lo" type="uint"
summary="low 32 bits of layout modifier"/>
</request>
<enum name="flags" bitfield="true">
<entry name="y_invert" value="1" summary="contents are y-inverted"/>
<entry name="interlaced" value="2" summary="content is interlaced"/>
<entry name="bottom_first" value="4" summary="bottom field first"/>
</enum>
<request name="create">
<description summary="create a wl_buffer from the given dmabufs">
This asks for creation of a wl_buffer from the added dmabuf
buffers. The wl_buffer is not created immediately but returned via
the 'created' event if the dmabuf sharing succeeds. The sharing
may fail at runtime for reasons a client cannot predict, in
which case the 'failed' event is triggered.
The 'format' argument is a DRM_FORMAT code, as defined by the
libdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the
authoritative source on how the format codes should work.
The 'flags' is a bitfield of the flags defined in enum "flags".
'y_invert' means the that the image needs to be y-flipped.
Flag 'interlaced' means that the frame in the buffer is not
progressive as usual, but interlaced. An interlaced buffer as
supported here must always contain both top and bottom fields.
The top field always begins on the first pixel row. The temporal
ordering between the two fields is top field first, unless
'bottom_first' is specified. It is undefined whether 'bottom_first'
is ignored if 'interlaced' is not set.
This protocol does not convey any information about field rate,
duration, or timing, other than the relative ordering between the
two fields in one buffer. A compositor may have to estimate the
intended field rate from the incoming buffer rate. It is undefined
whether the time of receiving wl_surface.commit with a new buffer
attached, applying the wl_surface state, wl_surface.frame callback
trigger, presentation, or any other point in the compositor cycle
is used to measure the frame or field times. There is no support
for detecting missed or late frames/fields/buffers either, and
there is no support whatsoever for cooperating with interlaced
compositor output.
The composited image quality resulting from the use of interlaced
buffers is explicitly undefined. A compositor may use elaborate
hardware features or software to deinterlace and create progressive
output frames from a sequence of interlaced input buffers, or it
may produce substandard image quality. However, compositors that
cannot guarantee reasonable image quality in all cases are recommended
to just reject all interlaced buffers.
Any argument errors, including non-positive width or height,
mismatch between the number of planes and the format, bad
format, bad offset or stride, may be indicated by fatal protocol
errors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS,
OUT_OF_BOUNDS.
Dmabuf import errors in the server that are not obvious client
bugs are returned via the 'failed' event as non-fatal. This
allows attempting dmabuf sharing and falling back in the client
if it fails.
This request can be sent only once in the object's lifetime, after
which the only legal request is destroy. This object should be
destroyed after issuing a 'create' request. Attempting to use this
object after issuing 'create' raises ALREADY_USED protocol error.
It is not mandatory to issue 'create'. If a client wants to
cancel the buffer creation, it can just destroy this object.
</description>
<arg name="width" type="int" summary="base plane width in pixels"/>
<arg name="height" type="int" summary="base plane height in pixels"/>
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
<arg name="flags" type="uint" enum="flags" summary="see enum flags"/>
</request>
<event name="created">
<description summary="buffer creation succeeded">
This event indicates that the attempted buffer creation was
successful. It provides the new wl_buffer referencing the dmabuf(s).
Upon receiving this event, the client should destroy the
zwp_linux_buffer_params_v1 object.
</description>
<arg name="buffer" type="new_id" interface="wl_buffer"
summary="the newly created wl_buffer"/>
</event>
<event name="failed">
<description summary="buffer creation failed">
This event indicates that the attempted buffer creation has
failed. It usually means that one of the dmabuf constraints
has not been fulfilled.
Upon receiving this event, the client should destroy the
zwp_linux_buffer_params_v1 object.
</description>
</event>
<request name="create_immed" since="2">
<description summary="immediately create a wl_buffer from the given
dmabufs">
This asks for immediate creation of a wl_buffer by importing the
added dmabufs.
In case of import success, no event is sent from the server, and the
wl_buffer is ready to be used by the client.
Upon import failure, either of the following may happen, as seen fit
by the implementation:
- the client is terminated with one of the following fatal protocol
errors:
- INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS,
in case of argument errors such as mismatch between the number
of planes and the format, bad format, non-positive width or
height, or bad offset or stride.
- INVALID_WL_BUFFER, in case the cause for failure is unknown or
platform specific.
- the server creates an invalid wl_buffer, marks it as failed and
sends a 'failed' event to the client. The result of using this
invalid wl_buffer as an argument in any request by the client is
defined by the compositor implementation.
This takes the same arguments as a 'create' request, and obeys the
same restrictions.
</description>
<arg name="buffer_id" type="new_id" interface="wl_buffer"
summary="id for the newly created wl_buffer"/>
<arg name="width" type="int" summary="base plane width in pixels"/>
<arg name="height" type="int" summary="base plane height in pixels"/>
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
<arg name="flags" type="uint" enum="flags" summary="see enum flags"/>
</request>
</interface>
<interface name="zwp_linux_dmabuf_feedback_v1" version="5">
<description summary="dmabuf feedback">
This object advertises dmabuf parameters feedback. This includes the
preferred devices and the supported formats/modifiers.
The parameters are sent once when this object is created and whenever they
change. The done event is always sent once after all parameters have been
sent. When a single parameter changes, all parameters are re-sent by the
compositor.
Compositors can re-send the parameters when the current client buffer
allocations are sub-optimal. Compositors should not re-send the
parameters if re-allocating the buffers would not result in a more optimal
configuration. In particular, compositors should avoid sending the exact
same parameters multiple times in a row.
The tranche_target_device and tranche_formats events are grouped by
tranches of preference. For each tranche, a tranche_target_device, one
tranche_flags and one or more tranche_formats events are sent, followed
by a tranche_done event finishing the list. The tranches are sent in
descending order of preference. All formats and modifiers in the same
tranche have the same preference.
To send parameters, the compositor sends one main_device event, tranches
(each consisting of one tranche_target_device event, one tranche_flags
event, tranche_formats events and then a tranche_done event), then one
done event.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the feedback object">
Using this request a client can tell the server that it is not going to
use the wp_linux_dmabuf_feedback object anymore.
</description>
</request>
<event name="done">
<description summary="all feedback has been sent">
This event is sent after all parameters of a wp_linux_dmabuf_feedback
object have been sent.
This allows changes to the wp_linux_dmabuf_feedback parameters to be
seen as atomic, even if they happen via multiple events.
</description>
</event>
<event name="format_table">
<description summary="format and modifier table">
This event provides a file descriptor which can be memory-mapped to
access the format and modifier table.
The table contains a tightly packed array of consecutive format +
modifier pairs. Each pair is 16 bytes wide. It contains a format as a
32-bit unsigned integer, followed by 4 bytes of unused padding, and a
modifier as a 64-bit unsigned integer. The native endianness is used.
The client must map the file descriptor in read-only private mode.
Compositors are not allowed to mutate the table file contents once this
event has been sent. Instead, compositors must create a new, separate
table file and re-send feedback parameters. Compositors are allowed to
store duplicate format + modifier pairs in the table.
</description>
<arg name="fd" type="fd" summary="table file descriptor"/>
<arg name="size" type="uint" summary="table size, in bytes"/>
</event>
<event name="main_device">
<description summary="preferred main device">
This event advertises the main device that the server prefers to use
when direct scan-out to the target device isn't possible. The
advertised main device may be different for each
wp_linux_dmabuf_feedback object, and may change over time.
There is exactly one main device. The compositor must send at least
one preference tranche with tranche_target_device equal to main_device.
Clients need to create buffers that the main device can import and
read from, otherwise creating the dmabuf wl_buffer will fail (see the
wp_linux_buffer_params.create and create_immed requests for details).
The main device will also likely be kept active by the compositor,
so clients can use it instead of waking up another device for power
savings.
In general the device is a DRM node. The DRM node type (primary vs.
render) is unspecified. Clients must not rely on the compositor sending
a particular node type. Clients cannot check two devices for equality
by comparing the dev_t value.
If explicit modifiers are not supported and the client performs buffer
allocations on a different device than the main device, then the client
must force the buffer to have a linear layout.
</description>
<arg name="device" type="array" summary="device dev_t value"/>
</event>
<event name="tranche_done">
<description summary="a preference tranche has been sent">
This event splits tranche_target_device and tranche_formats events in
preference tranches. It is sent after a set of tranche_target_device
and tranche_formats events; it represents the end of a tranche. The
next tranche will have a lower preference.
</description>
</event>
<event name="tranche_target_device">
<description summary="target device">
This event advertises the target device that the server prefers to use
for a buffer created given this tranche. The advertised target device
may be different for each preference tranche, and may change over time.
There is exactly one target device per tranche.
The target device may be a scan-out device, for example if the
compositor prefers to directly scan-out a buffer created given this
tranche. The target device may be a rendering device, for example if
the compositor prefers to texture from said buffer.
The client can use this hint to allocate the buffer in a way that makes
it accessible from the target device, ideally directly. The buffer must
still be accessible from the main device, either through direct import
or through a potentially more expensive fallback path. If the buffer
can't be directly imported from the main device then clients must be
prepared for the compositor changing the tranche priority or making
wl_buffer creation fail (see the wp_linux_buffer_params.create and
create_immed requests for details).
If the device is a DRM node, the DRM node type (primary vs. render) is
unspecified. Clients must not rely on the compositor sending a
particular node type. Clients cannot check two devices for equality by
comparing the dev_t value.
This event is tied to a preference tranche, see the tranche_done event.
</description>
<arg name="device" type="array" summary="device dev_t value"/>
</event>
<event name="tranche_formats">
<description summary="supported buffer format modifier">
This event advertises the format + modifier combinations that the
compositor supports.
It carries an array of indices, each referring to a format + modifier
pair in the last received format table (see the format_table event).
Each index is a 16-bit unsigned integer in native endianness.
For legacy support, DRM_FORMAT_MOD_INVALID is an allowed modifier.
It indicates that the server can support the format with an implicit
modifier. When a buffer has DRM_FORMAT_MOD_INVALID as its modifier, it
is as if no explicit modifier is specified. The effective modifier
will be derived from the dmabuf.
A compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for
a given format supports both explicit modifiers and implicit modifiers.
Compositors must not send duplicate format + modifier pairs within the
same tranche or across two different tranches with the same target
device and flags.
This event is tied to a preference tranche, see the tranche_done event.
For the definition of the format and modifier codes, see the
wp_linux_buffer_params.create request.
</description>
<arg name="indices" type="array" summary="array of 16-bit indexes"/>
</event>
<enum name="tranche_flags" bitfield="true">
<entry name="scanout" value="1" summary="direct scan-out tranche"/>
</enum>
<event name="tranche_flags">
<description summary="tranche flags">
This event sets tranche-specific flags.
The scanout flag is a hint that direct scan-out may be attempted by the
compositor on the target device if the client appropriately allocates a
buffer. How to allocate a buffer that can be scanned out on the target
device is implementation-defined.
This event is tied to a preference tranche, see the tranche_done event.
</description>
<arg name="flags" type="uint" enum="tranche_flags" summary="tranche flags"/>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,5 @@
Presentation time protocol
Maintainers:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> (@pq)

View file

@ -0,0 +1,268 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="presentation_time">
<!-- wrap:70 -->
<copyright>
Copyright © 2013-2014 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_presentation" version="2">
<description summary="timed presentation related wl_surface requests">
<!-- Introduction -->
The main feature of this interface is accurate presentation
timing feedback to ensure smooth video playback while maintaining
audio/video synchronization. Some features use the concept of a
presentation clock, which is defined in the
presentation.clock_id event.
A content update for a wl_surface is submitted by a
wl_surface.commit request. Request 'feedback' associates with
the wl_surface.commit and provides feedback on the content
update, particularly the final realized presentation time.
<!-- Completing presentation -->
When the final realized presentation time is available, e.g.
after a framebuffer flip completes, the requested
presentation_feedback.presented events are sent. The final
presentation time can differ from the compositor's predicted
display update time and the update's target time, especially
when the compositor misses its target vertical blanking period.
</description>
<enum name="error">
<description summary="fatal presentation errors">
These fatal protocol errors may be emitted in response to
illegal presentation requests.
</description>
<entry name="invalid_timestamp" value="0"
summary="invalid value in tv_nsec"/>
<entry name="invalid_flag" value="1"
summary="invalid flag"/>
</enum>
<request name="destroy" type="destructor">
<description summary="unbind from the presentation interface">
Informs the server that the client will no longer be using
this protocol object. Existing objects created by this object
are not affected.
</description>
</request>
<request name="feedback">
<description summary="request presentation feedback information">
Request presentation feedback for the current content submission
on the given surface. This creates a new presentation_feedback
object, which will deliver the feedback information once. If
multiple presentation_feedback objects are created for the same
submission, they will all deliver the same information.
For details on what information is returned, see the
presentation_feedback interface.
</description>
<arg name="surface" type="object" interface="wl_surface"
summary="target surface"/>
<arg name="callback" type="new_id" interface="wp_presentation_feedback"
summary="new feedback object"/>
</request>
<event name="clock_id">
<description summary="clock ID for timestamps">
This event tells the client in which clock domain the
compositor interprets the timestamps used by the presentation
extension. This clock is called the presentation clock.
The compositor sends this event when the client binds to the
presentation interface. The presentation clock does not change
during the lifetime of the client connection.
The clock identifier is platform dependent. On POSIX platforms, the
identifier value is one of the clockid_t values accepted by
clock_gettime(). clock_gettime() is defined by POSIX.1-2001.
Timestamps in this clock domain are expressed as tv_sec_hi,
tv_sec_lo, tv_nsec triples, each component being an unsigned
32-bit value. Whole seconds are in tv_sec which is a 64-bit
value combined from tv_sec_hi and tv_sec_lo, and the
additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999].
Note that clock_id applies only to the presentation clock,
and implies nothing about e.g. the timestamps used in the
Wayland core protocol input events.
Compositors should prefer a clock which does not jump and is
not slewed e.g. by NTP. The absolute value of the clock is
irrelevant. Precision of one millisecond or better is
recommended. Clients must be able to query the current clock
value directly, not by asking the compositor.
</description>
<arg name="clk_id" type="uint" summary="platform clock identifier"/>
</event>
</interface>
<interface name="wp_presentation_feedback" version="2">
<description summary="presentation time feedback event">
A presentation_feedback object returns an indication that a
wl_surface content update has become visible to the user.
One object corresponds to one content update submission
(wl_surface.commit). There are two possible outcomes: the
content update is presented to the user, and a presentation
timestamp delivered; or, the user did not see the content
update because it was superseded or its surface destroyed,
and the content update is discarded.
Once a presentation_feedback object has delivered a 'presented'
or 'discarded' event it is automatically destroyed.
</description>
<event name="sync_output">
<description summary="presentation synchronized to this output">
As presentation can be synchronized to only one output at a
time, this event tells which output it was. This event is only
sent prior to the presented event.
As clients may bind to the same global wl_output multiple
times, this event is sent for each bound instance that matches
the synchronized output. If a client has not bound to the
right wl_output global at all, this event is not sent.
</description>
<arg name="output" type="object" interface="wl_output"
summary="presentation output"/>
</event>
<enum name="kind" bitfield="true">
<description summary="bitmask of flags in presented event">
These flags provide information about how the presentation of
the related content update was done. The intent is to help
clients assess the reliability of the feedback and the visual
quality with respect to possible tearing and timings.
</description>
<entry name="vsync" value="0x1">
<description summary="presentation was vsync'd">
The presentation was synchronized to the "vertical retrace" by
the display hardware such that tearing does not happen.
Relying on software scheduling is not acceptable for this
flag. If presentation is done by a copy to the active
frontbuffer, then it must guarantee that tearing cannot
happen.
</description>
</entry>
<entry name="hw_clock" value="0x2">
<description summary="hardware provided the presentation timestamp">
The display hardware provided measurements that the hardware
driver converted into a presentation timestamp. Sampling a
clock in software is not acceptable for this flag.
</description>
</entry>
<entry name="hw_completion" value="0x4">
<description summary="hardware signalled the start of the presentation">
The display hardware signalled that it started using the new
image content. The opposite of this is e.g. a timer being used
to guess when the display hardware has switched to the new
image content.
</description>
</entry>
<entry name="zero_copy" value="0x8">
<description summary="presentation was done zero-copy">
The presentation of this update was done zero-copy. This means
the buffer from the client was given to display hardware as
is, without copying it. Compositing with OpenGL counts as
copying, even if textured directly from the client buffer.
Possible zero-copy cases include direct scanout of a
fullscreen surface and a surface on a hardware overlay.
</description>
</entry>
</enum>
<event name="presented" type="destructor">
<description summary="the content update was displayed">
The associated content update was displayed to the user at the
indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of
the timestamp, see presentation.clock_id event.
The timestamp corresponds to the time when the content update
turned into light the first time on the surface's main output.
Compositors may approximate this from the framebuffer flip
completion events from the system, and the latency of the
physical display path if known.
This event is preceded by all related sync_output events
telling which output's refresh cycle the feedback corresponds
to, i.e. the main output for the surface. Compositors are
recommended to choose the output containing the largest part
of the wl_surface, or keeping the output they previously
chose. Having a stable presentation output association helps
clients predict future output refreshes (vblank).
The 'refresh' argument gives the compositor's prediction of how
many nanoseconds after tv_sec, tv_nsec the very next output
refresh may occur. This is to further aid clients in
predicting future refreshes, i.e., estimating the timestamps
targeting the next few vblanks. If such prediction cannot
usefully be done, the argument is zero.
For version 2 and later, if the output does not have a constant
refresh rate, explicit video mode switches excluded, then the
refresh argument must be either an appropriate rate picked by the
compositor (e.g. fastest rate), or 0 if no such rate exists.
For version 1, if the output does not have a constant refresh rate,
the refresh argument must be zero.
The 64-bit value combined from seq_hi and seq_lo is the value
of the output's vertical retrace counter when the content
update was first scanned out to the display. This value must
be compatible with the definition of MSC in
GLX_OML_sync_control specification. Note, that if the display
path has a non-zero latency, the time instant specified by
this counter may differ from the timestamp's.
If the output does not have a concept of vertical retrace or a
refresh cycle, or the output device is self-refreshing without
a way to query the refresh count, then the arguments seq_hi
and seq_lo must be zero.
</description>
<arg name="tv_sec_hi" type="uint"
summary="high 32 bits of the seconds part of the presentation timestamp"/>
<arg name="tv_sec_lo" type="uint"
summary="low 32 bits of the seconds part of the presentation timestamp"/>
<arg name="tv_nsec" type="uint"
summary="nanoseconds part of the presentation timestamp"/>
<arg name="refresh" type="uint" summary="nanoseconds till next refresh"/>
<arg name="seq_hi" type="uint"
summary="high 32 bits of refresh counter"/>
<arg name="seq_lo" type="uint"
summary="low 32 bits of refresh counter"/>
<arg name="flags" type="uint" enum="kind" summary="combination of 'kind' values"/>
</event>
<event name="discarded" type="destructor">
<description summary="the content update was not displayed">
The content update was never displayed to the user.
</description>
</event>
</interface>
</protocol>

4
stable/tablet/README Normal file
View file

@ -0,0 +1,4 @@
Tablet protocol
Maintainers:
Peter Hutterer <peter.hutterer@who-t.net> (@whot)

1297
stable/tablet/tablet-v2.xml Normal file

File diff suppressed because it is too large Load diff

7
stable/viewporter/README Normal file
View file

@ -0,0 +1,7 @@
Viewporter: cropping and scaling extension for surface contents
Previously known as wl_scaler.
Maintainers:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> (@pq)

View file

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="viewporter">
<copyright>
Copyright © 2013-2016 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_viewporter" version="1">
<description summary="surface cropping and scaling">
The global interface exposing surface cropping and scaling
capabilities is used to instantiate an interface extension for a
wl_surface object. This extended interface will then allow
cropping and scaling the surface contents, effectively
disconnecting the direct relationship between the buffer and the
surface size.
</description>
<request name="destroy" type="destructor">
<description summary="unbind from the cropping and scaling interface">
Informs the server that the client will not be using this
protocol object anymore. This does not affect any other objects,
wp_viewport objects included.
</description>
</request>
<enum name="error">
<entry name="viewport_exists" value="0"
summary="the surface already has a viewport object associated"/>
</enum>
<request name="get_viewport">
<description summary="extend surface interface for crop and scale">
Instantiate an interface extension for the given wl_surface to
crop and scale its content. If the given wl_surface already has
a wp_viewport object associated, the viewport_exists
protocol error is raised.
</description>
<arg name="id" type="new_id" interface="wp_viewport"
summary="the new viewport interface id"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface"/>
</request>
</interface>
<interface name="wp_viewport" version="1">
<description summary="crop and scale interface to a wl_surface">
An additional interface to a wl_surface object, which allows the
client to specify the cropping and scaling of the surface
contents.
This interface works with two concepts: the source rectangle (src_x,
src_y, src_width, src_height), and the destination size (dst_width,
dst_height). The contents of the source rectangle are scaled to the
destination size, and content outside the source rectangle is ignored.
This state is double-buffered, see wl_surface.commit.
The two parts of crop and scale state are independent: the source
rectangle, and the destination size. Initially both are unset, that
is, no scaling is applied. The whole of the current wl_buffer is
used as the source, and the surface size is as defined in
wl_surface.attach.
If the destination size is set, it causes the surface size to become
dst_width, dst_height. The source (rectangle) is scaled to exactly
this size. This overrides whatever the attached wl_buffer size is,
unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
has no content and therefore no size. Otherwise, the size is always
at least 1x1 in surface local coordinates.
If the source rectangle is set, it defines what area of the wl_buffer is
taken as the source. If the source rectangle is set and the destination
size is not set, then src_width and src_height must be integers, and the
surface size becomes the source rectangle size. This results in cropping
without scaling. If src_width or src_height are not integers and
destination size is not set, the bad_size protocol error is raised when
the surface state is applied.
The coordinate transformations from buffer pixel coordinates up to
the surface-local coordinates happen in the following order:
1. buffer_transform (wl_surface.set_buffer_transform)
2. buffer_scale (wl_surface.set_buffer_scale)
3. crop and scale (wp_viewport.set*)
This means, that the source rectangle coordinates of crop and scale
are given in the coordinates after the buffer transform and scale,
i.e. in the coordinates that would be the surface-local coordinates
if the crop and scale was not applied.
If src_x or src_y are negative, the bad_value protocol error is raised.
Otherwise, if the source rectangle is partially or completely outside of
the non-NULL wl_buffer, then the out_of_buffer protocol error is raised
when the surface state is applied. A NULL wl_buffer does not raise the
out_of_buffer error.
If the wl_surface associated with the wp_viewport is destroyed,
all wp_viewport requests except 'destroy' raise the protocol error
no_surface.
If the wp_viewport object is destroyed, the crop and scale
state is removed from the wl_surface. The change will be applied
on the next wl_surface.commit.
</description>
<request name="destroy" type="destructor">
<description summary="remove scaling and cropping from the surface">
The associated wl_surface's crop and scale state is removed.
The change is applied on the next wl_surface.commit.
</description>
</request>
<enum name="error">
<entry name="bad_value" value="0"
summary="negative or zero values in width or height"/>
<entry name="bad_size" value="1"
summary="destination size is not integer"/>
<entry name="out_of_buffer" value="2"
summary="source rectangle extends outside of the content area"/>
<entry name="no_surface" value="3"
summary="the wl_surface was destroyed"/>
</enum>
<request name="set_source">
<description summary="set the source rectangle for cropping">
Set the source rectangle of the associated wl_surface. See
wp_viewport for the description, and relation to the wl_buffer
size.
If all of x, y, width and height are -1.0, the source rectangle is
unset instead. Any other set of values where width or height are zero
or negative, or x or y are negative, raise the bad_value protocol
error.
The crop and scale state is double-buffered, see wl_surface.commit.
</description>
<arg name="x" type="fixed" summary="source rectangle x"/>
<arg name="y" type="fixed" summary="source rectangle y"/>
<arg name="width" type="fixed" summary="source rectangle width"/>
<arg name="height" type="fixed" summary="source rectangle height"/>
</request>
<request name="set_destination">
<description summary="set the surface size for scaling">
Set the destination size of the associated wl_surface. See
wp_viewport for the description, and relation to the wl_buffer
size.
If width is -1 and height is -1, the destination size is unset
instead. Any other pair of values for width and height that
contains zero or negative values raises the bad_value protocol
error.
The crop and scale state is double-buffered, see wl_surface.commit.
</description>
<arg name="width" type="int" summary="surface width"/>
<arg name="height" type="int" summary="surface height"/>
</request>
</interface>
</protocol>

5
stable/xdg-shell/README Normal file
View file

@ -0,0 +1,5 @@
xdg shell protocol
Maintainers:
Jonas Ådahl <jadahl@gmail.com> (@jadahl)
Mike Blumenkrantz <michael.blumenkrantz@gmail.com> (@zmike)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
Alpha modifier protocol
Maintainers:
Xaver Hugl <xaver.hugl@kde.org> (@Zamundaaa)

View file

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="alpha_modifier_v1">
<copyright>
Copyright © 2024 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_alpha_modifier_v1" version="1">
<description summary="surface alpha modifier manager">
This interface allows a client to set a factor for the alpha values on a
surface, which can be used to offload such operations to the compositor,
which can in turn for example offload them to KMS.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the alpha modifier manager object">
Destroy the alpha modifier manager. This doesn't destroy objects
created with the manager.
</description>
</request>
<enum name="error">
<entry name="already_constructed" value="0"
summary="wl_surface already has a alpha modifier object"/>
</enum>
<request name="get_surface">
<description summary="create a new alpha modifier surface object">
Create a new alpha modifier surface object associated with the
given wl_surface. If there is already such an object associated with
the wl_surface, the already_constructed error will be raised.
</description>
<arg name="id" type="new_id" interface="wp_alpha_modifier_surface_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="wp_alpha_modifier_surface_v1" version="1">
<description summary="alpha modifier object for a surface">
This interface allows the client to set a factor for the alpha values on
a surface, which can be used to offload such operations to the compositor.
The default factor is UINT32_MAX.
This object has to be destroyed before the associated wl_surface. Once the
wl_surface is destroyed, all request on this object will raise the
no_surface error.
</description>
<enum name="error">
<entry name="no_surface" value="0" summary="wl_surface was destroyed"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the alpha modifier object">
This destroys the object, and is equivalent to set_multiplier with
a value of UINT32_MAX, with the same double-buffered semantics as
set_multiplier.
</description>
</request>
<request name="set_multiplier">
<description summary="specify the alpha multiplier">
Sets the alpha multiplier for the surface. The alpha multiplier is
double-buffered state, see wl_surface.commit for details.
This factor is applied in the compositor's blending space, as an
additional step after the processing of per-pixel alpha values for the
wl_surface. The exact meaning of the factor is thus undefined, unless
the blending space is specified in a different extension.
This multiplier is applied even if the buffer attached to the
wl_surface doesn't have an alpha channel; in that case an alpha value
of one is used instead.
Zero means completely transparent, UINT32_MAX means completely opaque.
</description>
<arg name="factor" type="uint"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,11 @@
Color management and HDR protocol
Maintainers:
Sebastian Wick <sebastian at sebastianwick.net>
Pekka Paalanen <pekka.paalanen@collabora.com>
Historical credits not mentioned in the first commit:
- Niels Ole Salscheider, for an early protocol version
https://lists.freedesktop.org/archives/wayland-devel/2014-October/017755.html

View file

@ -0,0 +1,144 @@
---
SPDX-FileCopyrightText: 2025 Collabora, Ltd.
SPDX-License-Identifier: MIT
---
Contents
[TOC]
# Wayland Color-Management Protocol
This document is an appendix to the [color-management][cm-spec]
protocol specification.
## Transfer functions (normative)
`wp_color_manager_v1` enumeration `transfer_function` lists a selection
of transfer functions describing display-referred image encoding between
normalized [electrical] $`E`$ and [optical] $`L`$ values. The function
definitions are as follows.
$`L`$
: Screen luminance in cd/m² in the assumed viewing environment.
Since the protocol uses the reference luminance level as a proxy for the
environment, these values must be interpreted in the context of the
reference luminance level.
$`L_W`$
: Screen luminance for peak white; the primary color volume maximum luminance.
$`L_B`$
: Screen luminance for black; the primary color volume minimum luminance.
### `bt1886`
```math
L = a\left(\max\left(E + b,0\right)\right)^\gamma
```
where $`\gamma = 2.4`$ and the parameters
```math
a = \left(L_W^{1/\gamma} - L_B^{1/\gamma}\right)^\gamma,
```
```math
b = \frac{L_B^{1/\gamma}}{L_W^{1/\gamma} - L_B^{1/\gamma}}.
```
The above are specified by [ITU-R BT.1886].
Note, that $`E < 0`$ and $`E > 1`$ are possible with limited range
quantization, as required by e.g. the calibration method in [ITU-R BT.814].
### `compound_power_2_4`
```math
O = \begin{cases}
\frac{E}{12.92}, & 0 \leq E < 0.04045\\
\left( \frac{E + 0.055}{1.055} \right)^{2.4}, & 0.04045 \leq E \leq 1
\end{cases}
```
The above is the IEC 61966-2-1 piece-wise transfer function,
as recorded in [Khronos Data Format Specification][KDFS] 1.4.0
Section 13.3, and restricted to the unit range.
```math
L = (L_W - L_B)O + L_B
```
### `gamma22`
```math
O = E^{2.2}, \quad 0 \leq E \leq 1
```
```math
L = (L_W - L_B)O + L_B
```
### `gamma28`
```math
O = E^{2.8}, \quad 0 \leq E \leq 1
```
```math
L = (L_W - L_B)O + L_B
```
### `ext_linear`
```math
O = E, \quad \forall E \in \Reals
```
```math
L = (L_W - L_B)O + L_B
```
### `st2084_pq`
```math
\begin{align*}
m_1 &=& \vphantom{\Bigg(} \frac{2610}{16384} &= 0.1593017578125\\
m_2 &=& \vphantom{\Bigg(} 128\left(\frac{2523}{4096}\right) &= 78.84375\\
c_1 = c_3 c_2 + 1 &=& \vphantom{\Bigg(} \frac{3424}{4096} &= 0.8359375\\
c_2 &=& \vphantom{\Bigg(} 32\left(\frac{2413}{4096}\right) &= 18.8515625\\
c_3 &=& \vphantom{\Bigg(} 32\left(\frac{2392}{4096}\right) &= 18.6875
\end{align*}
```
```math
O = \left(
\frac{\max\left[
\left(E^\frac{1}{m_2} - c_1\right), 0
\right]}{c_2 - c_3 E^\frac{1}{m_2}}
\right)^\frac{1}{m_1},
\quad 0 \leq E \leq 1
```
And the inverse
```math
E = \left( \frac{c_1 + c_2 O^{m_1}}{1 + c_3 O^{m_1}} \right)^{m_2},
\quad 0 \leq O \leq 1
```
The above are specified by [ITU-R BT.2100].
```math
L = 10'000\ \mathrm{cd/m²} \cdot O + L_B
```
[cm-spec]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tree/main/staging/color-management
[electrical]: https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/glossary.md#electrical-color-value
[optical]: https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/glossary.md#optical-color-value
[ITU-R BT.814]: https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/specs.md#itu-r-bt814
[ITU-R BT.1886]: https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/specs.md#itu-r-bt1886
[ITU-R BT.2100]: https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/specs.md#itu-r-bt2100
[KDFS]: https://registry.khronos.org/DataFormat/

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,6 @@
color-representation protocol
Maintainers:
Simon Ser <contact@emersion.fr>
Sebastian Wick <sebastian@sebastianwick.net>
Pekka Paalanen <pekka.paalanen@collabora.com>

View file

@ -0,0 +1,433 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="color_representation_v1">
<copyright>
Copyright 2022 Simon Ser
Copyright 2022 Red Hat, Inc.
Copyright 2022 Collabora, Ltd.
Copyright 2022-2025 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="color representation protocol extension">
This protocol extension delivers the metadata required to define alpha mode,
the color model, sub-sampling and quantization range used when interpreting
buffer contents. The main use case is defining how the YCbCr family of pixel
formats convert to RGB.
Note that this protocol does not define the colorimetry of the resulting RGB
channels / tristimulus values. Without the help of other extensions the
resulting colorimetry is therefore implementation defined.
If this extension is not used, the color representation used is compositor
implementation defined.
Recommendation ITU-T H.273
"Coding-independent code points for video signal type identification"
shall be referred to as simply H.273 here.
</description>
<interface name="wp_color_representation_manager_v1" version="1">
<description summary="color representation manager singleton">
A singleton global interface used for getting color representation
extensions for wl_surface. The extension interfaces allow setting the
color representation of surfaces.
Compositors should never remove this global.
</description>
<enum name="error">
<description summary="protocol errors"/>
<entry name="surface_exists" value="1"
summary="color representation surface exists already"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
Destroy the wp_color_representation_manager_v1 object. This does not
affect any other objects in any way.
</description>
</request>
<request name="get_surface">
<description summary="create a color representation interface for a wl_surface">
If a wp_color_representation_surface_v1 object already exists for the
given wl_surface, the protocol error surface_exists is raised.
This creates a new color wp_color_representation_surface_v1 object for
the given wl_surface.
See the wp_color_representation_surface_v1 interface for more details.
</description>
<arg name="id"
type="new_id" interface="wp_color_representation_surface_v1"/>
<arg name="surface"
type="object" interface="wl_surface"/>
</request>
<event name="supported_alpha_mode">
<description summary="supported alpha modes">
When this object is created, it shall immediately send this event once
for each alpha mode the compositor supports.
For the definition of the supported values, see the
wp_color_representation_surface_v1::alpha_mode enum.
</description>
<arg name="alpha_mode"
type="uint" enum="wp_color_representation_surface_v1.alpha_mode"
summary="supported alpha mode"/>
</event>
<event name="supported_coefficients_and_ranges">
<description summary="supported matrix coefficients and ranges">
When this object is created, it shall immediately send this event once
for each matrix coefficient and color range combination the compositor
supports.
For the definition of the supported values, see the
wp_color_representation_surface_v1::coefficients and
wp_color_representation_surface_v1::range enums.
</description>
<arg name="coefficients"
type="uint" enum="wp_color_representation_surface_v1.coefficients"
summary="supported matrix coefficients"/>
<arg name="range"
type="uint" enum="wp_color_representation_surface_v1.range"
summary="full range flag"/>
</event>
<event name="done">
<description summary="all features have been sent">
This event is sent when all supported features have been sent.
</description>
</event>
</interface>
<interface name="wp_color_representation_surface_v1" version="1">
<description summary="color representation extension to a surface">
A wp_color_representation_surface_v1 allows the client to set the color
representation metadata of a surface.
By default, a surface does not have any color representation metadata set.
The reconstruction of R, G, B signals on such surfaces is compositor
implementation defined. The alpha mode is assumed to be
premultiplied_electrical when the alpha mode is unset.
If the wl_surface associated with the wp_color_representation_surface_v1
is destroyed, the wp_color_representation_surface_v1 object becomes inert.
</description>
<enum name="error">
<description summary="protocol errors"/>
<entry name="alpha_mode" value="1"
summary="unsupported alpha mode"/>
<entry name="coefficients" value="2"
summary="unsupported coefficients"/>
<entry name="pixel_format" value="3"
summary="the pixel format and a set value are incompatible"/>
<entry name="inert" value="4"
summary="forbidden request on inert object"/>
<entry name="chroma_location" value="5"
summary="invalid chroma location"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the color representation">
Destroy the wp_color_representation_surface_v1 object.
Destroying this object unsets all the color representation metadata from
the surface. See the wp_color_representation_surface_v1 interface
description for how a compositor handles a surface without color
representation metadata. Unsetting is double-buffered state, see
wl_surface.commit.
</description>
</request>
<enum name="alpha_mode">
<description summary="alpha mode">
Specifies how the alpha channel affects the color channels.
</description>
<entry name="premultiplied_electrical" value="0">
<description summary="premultiplied alpha in electrical values">
Electrical color channel values (after transfer function encoding)
are already multiplied with the alpha channel value.
</description>
</entry>
<entry name="premultiplied_optical" value="1">
<description summary="premultiplied alpha in optical values">
Optical color channel values (before transfer function encoding)
are already multiplied with the alpha channel value.
</description>
</entry>
<entry name="straight" value="2">
<description summary="straight alpha">
Alpha channel has not been pre-multiplied into color channels.
</description>
</entry>
</enum>
<enum name="coefficients">
<description summary="named coefficients">
Named matrix coefficients used to encode well-known sets of
coefficients. H.273 is the authority, when it comes to the exact values
of coefficients and authoritative specifications, where an equivalent
code point exists.
A value of 0 is invalid and will never be present in the list of enums.
Descriptions do list the specifications for convenience.
</description>
<entry name="identity" value="1">
<description summary="The identity matrix">
Coefficients as defined by
- IEC 61966-2-1 sRGB
- SMPTE ST 428-1 (2019)
Equivalent to H.273 MatrixCoefficients code point 0.
Compatible with pixel formats of the RGB family.
</description>
</entry>
<entry name="bt709" value="2">
<description summary="BT.709 matrix coefficients">
Coefficients as defined by
- Rec. ITU-R BT.709-6
- Rec. ITU-R BT.1361-0 conventional colour gamut system (historical)
- Rec. ITU-R BT.1361-0 conventional colour gamut system and extended
colour gamut system (historical)
- IEC 61966-2-4 xvYCC709
- SMPTE RP 177 (1993) Annex B
Equivalent to H.273 MatrixCoefficients code point 1.
Compatible with pixel formats of the YCbCr family.
</description>
</entry>
<entry name="fcc" value="3">
<description summary="FCC matrix coefficients">
Coefficients as defined by
- United States Federal Communications Commission (2003) Title 47
Code of Federal Regulations 73.682 (a) (20)
Equivalent to H.273 MatrixCoefficients code point 4.
Compatible with pixel formats of the YCbCr family.
</description>
</entry>
<entry name="bt601" value="4">
<description summary="BT.601-7 matrix coefficients">
Coefficients as defined by
- Rec. ITU-R BT.470-6 System B, G (historical)
- Rec. ITU-R BT.601-7 625
- Rec. ITU-R BT.601-7 525
- Rec. ITU-R BT.1358-0 625 (historical)
- Rec. ITU-R BT.1358-1 525 or 625 (historical)
- Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
- Rec. ITU-R BT.1700-0 NTSC
- IEC 61966-2-1 sYCC
- IEC 61966-2-4 xvYCC601
- SMPTE ST 170 (2004)
Equivalent to H.273 MatrixCoefficients code point 5, 6.
Compatible with pixel formats of the YCbCr family.
</description>
</entry>
<entry name="smpte240" value="5">
<description summary="SMPTE ST 240 matrix coefficients">
Coefficients as defined by
- SMPTE ST 240 (1999)
Equivalent to H.273 MatrixCoefficients code point 7.
Compatible with pixel formats of the YCbCr family.
</description>
</entry>
<entry name="bt2020" value="6">
<description summary="BT.2020 and BT.2100 YCbCr matrix coefficients">
Coefficients as defined by
- Rec. ITU-R BT.2020-2 (non-constant luminance)
- Rec. ITU-R BT.2100-2 YCbCr
Equivalent to H.273 MatrixCoefficients code point 9.
Compatible with pixel formats of the YCbCr family.
</description>
</entry>
<entry name="bt2020_cl" value="7">
<description summary="BT.2020 matrix coefficients for constant luminance">
Coefficients as defined by
- Rec. ITU-R BT.2020-2 (constant luminance)
Equivalent to H.273 MatrixCoefficients code point 10.
Compatible with pixel formats of the YCbCr family.
</description>
</entry>
<entry name="ictcp" value="8">
<description summary="BT.2100 ICtCp matrix coefficients">
Coefficients as defined by
- Rec. ITU-R BT.2100-2 ICTCP
Equivalent to H.273 MatrixCoefficients code point 14.
Compatible with pixel formats of the YCbCr family.
</description>
</entry>
</enum>
<enum name="range">
<description summary="Color range values">
Possible color range values.
A value of 0 is invalid and will never be present in the list of enums.
</description>
<entry name="full" value="1" summary="Full color range"/>
<entry name="limited" value="2" summary="Limited color range"/>
</enum>
<enum name="chroma_location">
<description summary="Chroma sample location for 4:2:0 YCbCr">
Chroma sample location as defined by H.273 Chroma420SampleLocType.
A value of 0 is invalid and will never be present in the list of enums.
The descriptions list the matching Vulkan VkChromaLocation combinations
for convenience.
</description>
<entry name="type_0" value="1">
<description summary="Horizontal offset of 0, vertical offset of 0.5">
Corresponding to VkChromaLocations:
- xChromaOffset: VK_CHROMA_LOCATION_COSITED_EVEN
- yChromaOffset: VK_CHROMA_LOCATION_MIDPOINT
Equivalent to H.273 Chroma420SampleLocType 0.
</description>
</entry>
<entry name="type_1" value="2">
<description summary="Horizontal offset of 0.5, vertical offset of 0.5">
Corresponding to VkChromaLocations:
- xChromaOffset: VK_CHROMA_LOCATION_MIDPOINT
- yChromaOffset: VK_CHROMA_LOCATION_MIDPOINT
Equivalent to H.273 Chroma420SampleLocType 1.
</description>
</entry>
<entry name="type_2" value="3">
<description summary="Horizontal offset of 0, vertical offset of 0">
Corresponding to VkChromaLocations:
- xChromaOffset: VK_CHROMA_LOCATION_COSITED_EVEN
- yChromaOffset: VK_CHROMA_LOCATION_COSITED_EVEN
Equivalent to H.273 Chroma420SampleLocType 2.
</description>
</entry>
<entry name="type_3" value="4">
<description summary="Horizontal offset of 0.5, vertical offset of 0">
Corresponding to VkChromaLocations:
- xChromaOffset: VK_CHROMA_LOCATION_MIDPOINT
- yChromaOffset: VK_CHROMA_LOCATION_COSITED_EVEN
Equivalent to H.273 Chroma420SampleLocType 3.
</description>
</entry>
<entry name="type_4" value="5">
<description summary="Horizontal offset of 0, vertical offset of 1">
Equivalent to H.273 Chroma420SampleLocType 4.
</description>
</entry>
<entry name="type_5" value="6">
<description summary="Horizontal offset of 0.5, vertical offset of 1">
Equivalent to H.273 Chroma420SampleLocType 5.
</description>
</entry>
</enum>
<request name="set_alpha_mode">
<description summary="set the surface alpha mode">
If this protocol object is inert, the protocol error inert is raised.
Assuming an alpha channel exists, it is always linear. The alpha mode
determines whether and how the color channels include pre-multiplied
alpha. Using straight alpha might have performance benefits.
Only alpha modes advertised by the compositor are allowed to be used as
argument for this request. The "alpha_mode" protocol error is raised
otherwise.
Alpha mode is double buffered, see wl_surface.commit.
</description>
<arg name="alpha_mode" type="uint" enum="alpha_mode"
summary="alpha mode"/>
</request>
<request name="set_coefficients_and_range">
<description summary="set the matrix coefficients and range">
If this protocol object is inert, the protocol error inert is raised.
Set the matrix coefficients and video range which defines the formula
and the related constants used to derive red, green and blue signals.
Usually coefficients correspond to MatrixCoefficients code points in
H.273.
Only combinations advertised by the compositor are allowed to be used as
argument for this request. The "coefficients" protocol error is raised
otherwise.
A call to wl_surface.commit verifies that the pixel format and the
coefficients-range combination in the committed surface contents are
compatible, if contents exist. The "pixel_format" protocol error is
raised otherwise.
A pixel format is compatible with the coefficients-range combination if
the related equations and conventions as defined in H.273 can produce
the color channels (RGB or YCbCr) of the pixel format.
For the definition of the supported combination, see the
wp_color_representation_surface_v1::coefficients and
wp_color_representation_surface_v1::range enums.
The coefficients-range combination is double-buffered, see
wl_surface.commit.
</description>
<arg name="coefficients" type="uint" enum="coefficients"
summary="matrix coefficients"/>
<arg name="range" type="uint" enum="range"
summary="range"/>
</request>
<request name="set_chroma_location">
<description summary="set the chroma location">
If this protocol object is inert, the protocol error inert is raised.
Set the chroma location type which defines the position of downsampled
chroma samples, corresponding to Chroma420SampleLocType code points in
H.273.
An invalid chroma location enum value raises the "chroma_location"
protocol error.
A call to wl_surface.commit verifies that the pixel format and chroma
location type in the committed surface contents are compatible, if
contents exist. The "pixel_format" protocol error is raised otherwise.
For the definition of the supported chroma location types, see the
wp_color_representation_surface_v1::chroma_location enum.
The chroma location type is double-buffered, see wl_surface.commit.
</description>
<arg name="chroma_location" type="uint" enum="chroma_location"
summary="chroma sample location"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,79 @@
.. Copyright 2022 Red Hat, Inc.
.. contents::
Rec ITU-T H.273
===============
Rec ITU-T H.273 (short H.273) is a Recommendation from the International
Telecommunication Union (ITU) with the title "Coding-independent code points for
video signal type identification". All published versions can be found at
https://www.itu.int/rec/T-REC-H.273/en.
For a quick introduction to Rec ITU-T H.273 see
https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/cicp_h273.md.
Code point and pixel format compatibility
=========================================
Certain color representation metadata requires the selected code point to be
compatible with the buffer's pixel format. Which code points are compatible with
which pixel formats depends on the type of metadata.
All ``Chroma420SampleLocType`` chroma location code points are compatible with
4:2:0 subsampled pixel formats. Using a pixel format which is not 4:2:0
subsampled in a commit where a ``Chroma420SampleLocType`` code point is set
results in a protocol error. Clients can unset all code points again by
destroying the wp_color_representation_surface_v1, when they switch to such
formats.
The matrix coefficients' code point and pixel format compatibility is harder to
determine and depends on the specific code point.
The ``MatrixCoefficients`` code points are defined by "Rec ITU-T H.273
Coding-independent code points for video signal type identification". This
document further defines equations which describe how a tristimulus value can be
transformed. Which equations can be applied depends on which
``MatrixCoefficients`` code point is selected and if the ``VideoFullRangeFlag``
is set or not. By applying the applicable equations on a tristimulus value one
or more color encodings can be inferred. This color encoding has three channels
and each of those channels must map to the pixel format of the surface's buffer.
In Rec ITU-T H.273 (07/21) those channels are either R, G and B or Y, Cb and Cr.
Equations numbers used in the examples below are taken from Rec ITU-T H.273
(07/21) and might change in future versions.
For example code point 0: equations 11-13 transform the tristimulus values E\
:sub:`R`, E\ :sub:`G`, E\ :sub:`B` to a non-linear encoding E'\ :sub:`R`, E'\
:sub:`G`, E'\ :sub:`B`. Those can be transformed to an RGB encoding with
equations 20-22 (if the ``VideoFullRangeFlag`` is not set) or 26-28 (if the
``VideoFullRangeFlag`` is set). A YCbCr encoding can be inferred from the RGB
encoding with equations 41-43.
Therefore the code point 0 is compatible only with pixel formats which contain
the RGB or YCbCr color channels. The pixel formats may additionally carry unused
bits, alpha or other channels.
For example code point 1: apply equations 11-13, 38-40 and either 23-25 or 29-31
(depending on the ``VideoFullRangeFlag``) to arrive at the YCbCr encoding. An
RGB encoding cannot be inferred from the applicable equations.
Therefore code point 1 is is compatible only with pixel formats which contain
the YCbCr color channels.
MatrixCoefficients usage
========================
Note that the ``MatrixCoefficients`` equations as defined by Rec ITU-T H.273
describe how the client transforms the tristimulus values to an encoding which
ends up in the buffer it sends to the compositor. Compositors will use the
inverse steps, including the transfer characteristics which are not defined by
this protocol to convert the encoding back to tristimulus values with color
primaries which are also not defined by this protocol.
Some ``MatrixCoefficients`` code points require applying formulas or infering
constants from the transfer characteristics or color primaries of the image.
Compositors should not advertise support for such code points if the client
can't communicate the transfer characteristics and color primaries to the
compositor. Communicating those when needed is left for other Wayland extensions
to be used in conjunction with color-representation.

View file

@ -0,0 +1,4 @@
Commit Timing Protocol
Maintainers:
Derek Foreman <derek.foreman@collabora.com> (@derekf)

View file

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="commit_timing_v1">
<copyright>
Copyright © 2023 Valve Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_commit_timing_manager_v1" version="1">
<description summary="commit timing">
When a compositor latches on to new content updates it will check for
any number of requirements of the available content updates (such as
fences of all buffers being signalled) to consider the update ready.
This protocol provides a method for adding a time constraint to surface
content. This constraint indicates to the compositor that a content
update should be presented as closely as possible to, but not before,
a specified time.
This protocol does not change the Wayland property that content
updates are applied in the order they are received, even when some
content updates contain timestamps and others do not.
To provide timestamps, this global factory interface must be used to
acquire a wp_commit_timing_v1 object for a surface, which may then be
used to provide timestamp information for commits.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<enum name="error">
<entry name="commit_timer_exists" value="0"
summary="commit timer already exists for surface"/>
</enum>
<request name="destroy" type="destructor">
<description summary="unbind from the commit timing interface">
Informs the server that the client will no longer be using
this protocol object. Existing objects created by this object
are not affected.
</description>
</request>
<request name="get_timer">
<description summary="request commit timer interface for surface">
Establish a timing controller for a surface.
Only one commit timer can be created for a surface, or a
commit_timer_exists protocol error will be generated.
</description>
<arg name="id" type="new_id" interface="wp_commit_timer_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="wp_commit_timer_v1" version="1">
<description summary="Surface commit timer">
An object to set a time constraint for a content update on a surface.
</description>
<enum name="error">
<entry name="invalid_timestamp" value="0"
summary="timestamp contains an invalid value"/>
<entry name="timestamp_exists" value="1"
summary="timestamp exists"/>
<entry name="surface_destroyed" value="2"
summary="the associated surface no longer exists"/>
</enum>
<request name="set_timestamp">
<description summary="Specify time the following commit takes effect">
Provide a timing constraint for a surface content update.
A set_timestamp request may be made before a wl_surface.commit to
tell the compositor that the content is intended to be presented
as closely as possible to, but not before, the specified time.
The time is in the domain of the compositor's presentation clock.
An invalid_timestamp error will be generated for invalid tv_nsec.
If a timestamp already exists on the surface, a timestamp_exists
error is generated.
Requesting set_timestamp after the commit_timer object's surface is
destroyed will generate a "surface_destroyed" error.
</description>
<arg name="tv_sec_hi" type="uint"
summary="high 32 bits of the seconds part of target time"/>
<arg name="tv_sec_lo" type="uint"
summary="low 32 bits of the seconds part of target time"/>
<arg name="tv_nsec" type="uint"
summary="nanoseconds part of target time"/>
</request>
<request name="destroy" type="destructor">
<description summary="Destroy the timer">
Informs the server that the client will no longer be using
this protocol object.
Existing timing constraints are not affected by the destruction.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,5 @@
Content type hint protocol
Maintainers:
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> (@linkmauve)
Xaver Hugl <xaver.hugl@gmail.com> (@Zamundaaa)

View file

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="content_type_v1">
<copyright>
Copyright © 2021 Emmanuel Gil Peyrot
Copyright © 2022 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_content_type_manager_v1" version="1">
<description summary="surface content type manager">
This interface allows a client to describe the kind of content a surface
will display, to allow the compositor to optimize its behavior for it.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the content type manager object">
Destroy the content type manager. This doesn't destroy objects created
with the manager.
</description>
</request>
<enum name="error">
<entry name="already_constructed" value="0"
summary="wl_surface already has a content type object"/>
</enum>
<request name="get_surface_content_type">
<description summary="create a new content type object">
Create a new content type object associated with the given surface.
Creating a wp_content_type_v1 from a wl_surface which already has one
attached is a client error: already_constructed.
</description>
<arg name="id" type="new_id" interface="wp_content_type_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="wp_content_type_v1" version="1">
<description summary="content type object for a surface">
The content type object allows the compositor to optimize for the kind
of content shown on the surface. A compositor may for example use it to
set relevant drm properties like "content type".
The client may request to switch to another content type at any time.
When the associated surface gets destroyed, this object becomes inert and
the client should destroy it.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the content type object">
Switch back to not specifying the content type of this surface. This is
equivalent to setting the content type to none, including double
buffering semantics. See set_content_type for details.
</description>
</request>
<enum name="type">
<description summary="possible content types">
These values describe the available content types for a surface.
</description>
<entry name="none" value="0">
<description summary="no content type applies">
The content type none means that either the application has no data
about the content type, or that the content doesn't fit into one of
the other categories.
</description>
</entry>
<entry name="photo" value="1">
<description summary="photo content type">
The content type photo describes content derived from digital still
pictures and may be presented with minimal processing.
</description>
</entry>
<entry name="video" value="2">
<description summary="video content type">
The content type video describes a video or animation and may be
presented with more accurate timing to avoid stutter. Where scaling
is needed, scaling methods more appropriate for video may be used.
</description>
</entry>
<entry name="game" value="3">
<description summary="game content type">
The content type game describes a running game. Its content may be
presented with reduced latency.
</description>
</entry>
</enum>
<request name="set_content_type">
<description summary="specify the content type">
Set the surface content type. This informs the compositor that the
client believes it is displaying buffers matching this content type.
This is purely a hint for the compositor, which can be used to adjust
its behavior or hardware settings to fit the presented content best.
The content type is double-buffered state, see wl_surface.commit for
details.
</description>
<arg name="content_type" type="uint" enum="type"
summary="the content type"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
cursor-shape protocol
Maintainers:
Simon Ser <contact@emersion.fr> (@emersion)

View file

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="cursor_shape_v1">
<copyright>
Copyright 2018 The Chromium Authors
Copyright 2023 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_cursor_shape_manager_v1" version="2">
<description summary="cursor shape manager">
This global offers an alternative, optional way to set cursor images. This
new way uses enumerated cursors instead of a wl_surface like
wl_pointer.set_cursor does.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
Destroy the cursor shape manager.
</description>
</request>
<request name="get_pointer">
<description summary="manage the cursor shape of a pointer device">
Obtain a wp_cursor_shape_device_v1 for a wl_pointer object.
When the pointer capability is removed from the wl_seat, the
wp_cursor_shape_device_v1 object becomes inert.
</description>
<arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
<arg name="pointer" type="object" interface="wl_pointer"/>
</request>
<request name="get_tablet_tool_v2">
<description summary="manage the cursor shape of a tablet tool device">
Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object.
When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1
object becomes inert.
</description>
<arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
<arg name="tablet_tool" type="object" interface="zwp_tablet_tool_v2"/>
</request>
</interface>
<interface name="wp_cursor_shape_device_v1" version="2">
<description summary="cursor shape for a device">
This interface allows clients to set the cursor shape.
</description>
<enum name="shape">
<description summary="cursor shapes">
This enum describes cursor shapes.
The names are taken from the CSS W3C specification:
https://w3c.github.io/csswg-drafts/css-ui/#cursor
with a few additions.
Note that there are some groups of cursor shapes that are related:
The first group is drag-and-drop cursors which are used to indicate
the selected action during dnd operations. The second group is resize
cursors which are used to indicate resizing and moving possibilities
on window borders. It is recommended that the shapes in these groups
should use visually compatible images and metaphors.
</description>
<entry name="default" value="1" summary="default cursor"/>
<entry name="context_menu" value="2" summary="a context menu is available for the object under the cursor"/>
<entry name="help" value="3" summary="help is available for the object under the cursor"/>
<entry name="pointer" value="4" summary="pointer that indicates a link or another interactive element"/>
<entry name="progress" value="5" summary="progress indicator"/>
<entry name="wait" value="6" summary="program is busy, user should wait"/>
<entry name="cell" value="7" summary="a cell or set of cells may be selected"/>
<entry name="crosshair" value="8" summary="simple crosshair"/>
<entry name="text" value="9" summary="text may be selected"/>
<entry name="vertical_text" value="10" summary="vertical text may be selected"/>
<entry name="alias" value="11" summary="drag-and-drop: alias of/shortcut to something is to be created"/>
<entry name="copy" value="12" summary="drag-and-drop: something is to be copied"/>
<entry name="move" value="13" summary="drag-and-drop: something is to be moved"/>
<entry name="no_drop" value="14" summary="drag-and-drop: the dragged item cannot be dropped at the current cursor location"/>
<entry name="not_allowed" value="15" summary="drag-and-drop: the requested action will not be carried out"/>
<entry name="grab" value="16" summary="drag-and-drop: something can be grabbed"/>
<entry name="grabbing" value="17" summary="drag-and-drop: something is being grabbed"/>
<entry name="e_resize" value="18" summary="resizing: the east border is to be moved"/>
<entry name="n_resize" value="19" summary="resizing: the north border is to be moved"/>
<entry name="ne_resize" value="20" summary="resizing: the north-east corner is to be moved"/>
<entry name="nw_resize" value="21" summary="resizing: the north-west corner is to be moved"/>
<entry name="s_resize" value="22" summary="resizing: the south border is to be moved"/>
<entry name="se_resize" value="23" summary="resizing: the south-east corner is to be moved"/>
<entry name="sw_resize" value="24" summary="resizing: the south-west corner is to be moved"/>
<entry name="w_resize" value="25" summary="resizing: the west border is to be moved"/>
<entry name="ew_resize" value="26" summary="resizing: the east and west borders are to be moved"/>
<entry name="ns_resize" value="27" summary="resizing: the north and south borders are to be moved"/>
<entry name="nesw_resize" value="28" summary="resizing: the north-east and south-west corners are to be moved"/>
<entry name="nwse_resize" value="29" summary="resizing: the north-west and south-east corners are to be moved"/>
<entry name="col_resize" value="30" summary="resizing: that the item/column can be resized horizontally"/>
<entry name="row_resize" value="31" summary="resizing: that the item/row can be resized vertically"/>
<entry name="all_scroll" value="32" summary="something can be scrolled in any direction"/>
<entry name="zoom_in" value="33" summary="something can be zoomed in"/>
<entry name="zoom_out" value="34" summary="something can be zoomed out"/>
<entry name="dnd_ask" value="35" summary="drag-and-drop: the user will select which action will be carried out (non-css value)" since="2"/>
<entry name="all_resize" value="36" summary="resizing: something can be moved or resized in any direction (non-css value)" since="2"/>
</enum>
<enum name="error">
<entry name="invalid_shape" value="1"
summary="the specified shape value is invalid"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the cursor shape device">
Destroy the cursor shape device.
The device cursor shape remains unchanged.
</description>
</request>
<request name="set_shape">
<description summary="set device cursor to the shape">
Sets the device cursor to the specified shape. The compositor will
change the cursor image based on the specified shape.
The cursor actually changes only if the input device focus is one of
the requesting client's surfaces. If any, the previous cursor image
(surface or shape) is replaced.
The "shape" argument must be a valid enum entry, otherwise the
invalid_shape protocol error is raised.
This is similar to the wl_pointer.set_cursor and
zwp_tablet_tool_v2.set_cursor requests, but this request accepts a
shape instead of contents in the form of a surface. Clients can mix
set_cursor and set_shape requests.
The serial parameter must match the latest wl_pointer.enter or
zwp_tablet_tool_v2.proximity_in serial number sent to the client.
Otherwise the request will be ignored.
</description>
<arg name="serial" type="uint" summary="serial number of the enter event"/>
<arg name="shape" type="uint" enum="shape"/>
</request>
</interface>
</protocol>

6
staging/drm-lease/README Normal file
View file

@ -0,0 +1,6 @@
Linux DRM lease
Maintainers:
Simon Zeni <simon@bl4ckb0ne.ca> (@bl4ckb0ne)
Marius Vlad <marius.vlad@collabora.com> (@mvlad)
Xaver Hugl <xaver.hugl@gmail.com> (@Zamundaaa)

View file

@ -0,0 +1,317 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="drm_lease_v1">
<copyright>
Copyright © 2018 NXP
Copyright © 2019 Status Research &amp; Development GmbH.
Copyright © 2021 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_drm_lease_device_v1" version="1">
<description summary="lease device">
This protocol is used by Wayland compositors which act as Direct
Rendering Manager (DRM) masters to lease DRM resources to Wayland
clients.
The compositor will advertise one wp_drm_lease_device_v1 global for each
DRM node. Some time after a client binds to the wp_drm_lease_device_v1
global, the compositor will send a drm_fd event followed by zero, one or
more connector events. After all currently available connectors have been
sent, the compositor will send a wp_drm_lease_device_v1.done event.
When the list of connectors available for lease changes the compositor
will send wp_drm_lease_device_v1.connector events for added connectors and
wp_drm_lease_connector_v1.withdrawn events for removed connectors,
followed by a wp_drm_lease_device_v1.done event.
The compositor will indicate when a device is gone by removing the global
via a wl_registry.global_remove event. Upon receiving this event, the
client should destroy any matching wp_drm_lease_device_v1 object.
To destroy a wp_drm_lease_device_v1 object, the client must first issue
a release request. Upon receiving this request, the compositor will
immediately send a released event and destroy the object. The client must
continue to process and discard drm_fd and connector events until it
receives the released event. Upon receiving the released event, the
client can safely cleanup any client-side resources.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="create_lease_request">
<description summary="create a lease request object">
Creates a lease request object.
See the documentation for wp_drm_lease_request_v1 for details.
</description>
<arg name="id" type="new_id" interface="wp_drm_lease_request_v1" />
</request>
<request name="release">
<description summary="release this object">
Indicates the client no longer wishes to use this object. In response
the compositor will immediately send the released event and destroy
this object. It can however not guarantee that the client won't receive
connector events before the released event. The client must not send any
requests after this one, doing so will raise a wl_display error.
Existing connectors, lease request and leases will not be affected.
</description>
</request>
<event name="drm_fd">
<description summary="open a non-master fd for this DRM node">
The compositor will send this event when the wp_drm_lease_device_v1
global is bound, although there are no guarantees as to how long this
takes - the compositor might need to wait until regaining DRM master.
The included fd is a non-master DRM file descriptor opened for this
device and the compositor must not authenticate it.
The purpose of this event is to give the client the ability to
query DRM and discover information which may help them pick the
appropriate DRM device or select the appropriate connectors therein.
</description>
<arg name="fd" type="fd" summary="DRM file descriptor" />
</event>
<event name="connector">
<description summary="advertise connectors available for leases">
The compositor will use this event to advertise connectors available for
lease by clients. This object may be passed into a lease request to
indicate the client would like to lease that connector, see
wp_drm_lease_request_v1.request_connector for details. While the
compositor will make a best effort to not send disconnected connectors,
no guarantees can be made.
The compositor must send the drm_fd event before sending connectors.
After the drm_fd event it will send all available connectors but may
send additional connectors at any time.
</description>
<arg name="id" type="new_id" interface="wp_drm_lease_connector_v1" />
</event>
<event name="done">
<description summary="signals grouping of connectors">
The compositor will send this event to indicate that it has sent all
currently available connectors after the client binds to the global or
when it updates the connector list, for example on hotplug, drm master
change or when a leased connector becomes available again. It will
similarly send this event to group wp_drm_lease_connector_v1.withdrawn
events of connectors of this device.
</description>
</event>
<event name="released" type="destructor">
<description summary="the compositor has finished using the device">
This event is sent in response to the release request and indicates
that the compositor is done sending connector events.
The compositor will destroy this object immediately after sending the
event and it will become invalid. The client should release any
resources associated with this device after receiving this event.
</description>
</event>
</interface>
<interface name="wp_drm_lease_connector_v1" version="1">
<description summary="a leasable DRM connector">
Represents a DRM connector which is available for lease. These objects are
created via wp_drm_lease_device_v1.connector events, and should be passed
to lease requests via wp_drm_lease_request_v1.request_connector.
Immediately after the wp_drm_lease_connector_v1 object is created the
compositor will send a name, a description, a connector_id and a done
event. When the description is updated the compositor will send a
description event followed by a done event.
</description>
<event name="name">
<description summary="name">
The compositor sends this event once the connector is created to
indicate the name of this connector. This will not change for the
duration of the Wayland session, but is not guaranteed to be consistent
between sessions.
If the compositor supports wl_output version 4 and this connector
corresponds to a wl_output, the compositor should use the same name as
for the wl_output.
</description>
<arg name="name" type="string" summary="connector name" />
</event>
<event name="description">
<description summary="description">
The compositor sends this event once the connector is created to provide
a human-readable description for this connector, which may be presented
to the user. The compositor may send this event multiple times over the
lifetime of this object to reflect changes in the description.
</description>
<arg name="description" type="string" summary="connector description" />
</event>
<event name="connector_id">
<description summary="connector_id">
The compositor sends this event once the connector is created to
indicate the DRM object ID which represents the underlying connector
that is being offered. Note that the final lease may include additional
object IDs, such as CRTCs and planes.
</description>
<arg name="connector_id" type="uint" summary="DRM connector ID" />
</event>
<event name="done">
<description summary="all properties have been sent">
This event is sent after all properties of a connector have been sent.
This allows changes to the properties to be seen as atomic even if they
happen via multiple events.
</description>
</event>
<event name="withdrawn">
<description summary="lease offer withdrawn">
Sent to indicate that the compositor will no longer honor requests for
DRM leases which include this connector. The client may still issue a
lease request including this connector, but the compositor will send
wp_drm_lease_v1.finished without issuing a lease fd. Compositors are
encouraged to send this event when they lose access to connector, for
example when the connector is hot-unplugged, when the connector gets
leased to a client or when the compositor loses DRM master.
If a client holds a lease for the connector, the status of the lease
remains the same. The client should destroy the object after receiving
this event.
</description>
</event>
<request name="destroy" type="destructor">
<description summary="destroy connector">
The client may send this request to indicate that it will not use this
connector. Clients are encouraged to send this after receiving the
"withdrawn" event so that the server can release the resources
associated with this connector offer. Neither existing lease requests
nor leases will be affected.
</description>
</request>
</interface>
<interface name="wp_drm_lease_request_v1" version="1">
<description summary="DRM lease request">
A client that wishes to lease DRM resources will attach the list of
connectors advertised with wp_drm_lease_device_v1.connector that they
wish to lease, then use wp_drm_lease_request_v1.submit to submit the
request.
</description>
<enum name="error">
<entry name="wrong_device" value="0"
summary="requested a connector from a different lease device"/>
<entry name="duplicate_connector" value="1"
summary="requested a connector twice"/>
<entry name="empty_lease" value="2"
summary="requested a lease without requesting a connector"/>
</enum>
<request name="request_connector">
<description summary="request a connector for this lease">
Indicates that the client would like to lease the given connector.
This is only used as a suggestion, the compositor may choose to
include any resources in the lease it issues, or change the set of
leased resources at any time. Compositors are however encouraged to
include the requested connector and other resources necessary
to drive the connected output in the lease.
Requesting a connector that was created from a different lease device
than this lease request raises the wrong_device error. Requesting a
connector twice will raise the duplicate_connector error.
</description>
<arg name="connector" type="object"
interface="wp_drm_lease_connector_v1" />
</request>
<request name="submit" type="destructor">
<description summary="submit the lease request">
Submits the lease request and creates a new wp_drm_lease_v1 object.
After calling submit the compositor will immediately destroy this
object, issuing any more requests will cause a wl_display error.
The compositor doesn't make any guarantees about the events of the
lease object, clients cannot expect an immediate response.
Not requesting any connectors before submitting the lease request
will raise the empty_lease error.
</description>
<arg name="id" type="new_id" interface="wp_drm_lease_v1" />
</request>
</interface>
<interface name="wp_drm_lease_v1" version="1">
<description summary="a DRM lease">
A DRM lease object is used to transfer the DRM file descriptor to the
client and manage the lifetime of the lease.
Some time after the wp_drm_lease_v1 object is created, the compositor
will reply with the lease request's result. If the lease request is
granted, the compositor will send a lease_fd event. If the lease request
is denied, the compositor will send a finished event without a lease_fd
event.
</description>
<event name="lease_fd">
<description summary="shares the DRM file descriptor">
This event returns a file descriptor suitable for use with DRM-related
ioctls. The client should use drmModeGetLease to enumerate the DRM
objects which have been leased to them. The compositor guarantees it
will not use the leased DRM objects itself until it sends the finished
event. If the compositor cannot or will not grant a lease for the
requested connectors, it will not send this event, instead sending the
finished event.
The compositor will send this event at most once during this objects
lifetime.
</description>
<arg name="leased_fd" type="fd" summary="leased DRM file descriptor" />
</event>
<event name="finished">
<description summary="sent when the lease has been revoked">
The compositor uses this event to either reject a lease request, or if
it previously sent a lease_fd, to notify the client that the lease has
been revoked. If the client requires a new lease, they should destroy
this object and submit a new lease request. The compositor will send
no further events for this object after sending the finish event.
Compositors should revoke the lease when any of the leased resources
become unavailable, namely when a hot-unplug occurs or when the
compositor loses DRM master. Compositors may advertise the connector
for leasing again, if the resource is available, by sending the
connector event through the wp_drm_lease_device_v1 interface.
</description>
</event>
<request name="destroy" type="destructor">
<description summary="destroys the lease object">
The client should send this to indicate that it no longer wishes to use
this lease. The compositor should use drmModeRevokeLease on the
appropriate file descriptor, if necessary.
Upon destruction, the compositor should advertise the connector for
leasing again by sending the connector event through the
wp_drm_lease_device_v1 interface.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,6 @@
ext_blur protocol
Maintainers:
David Edmundson <davidedmundson@kde.org>
Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Xaver Hugl <xaver.hugl@kde.org>

View file

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_background_effect_v1">
<copyright>
Copyright (C) 2015 Martin Gräßlin
Copyright (C) 2015 Marco Martin
Copyright (C) 2020 Vlad Zahorodnii
Copyright (C) 2024 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="ext_background_effect_manager_v1" version="1">
<description summary="background effect factory">
This protocol provides a way to improve visuals of translucent surfaces
by applying effects like blur to the background behind them.
The capabilities are send when the global is bound, and every time they
change. Note that when the capability goes away, the corresponding effect
is no longer applied by the compositor, even if it was set before.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the background effect manager">
Informs the server that the client will no longer be using this
protocol object. Existing objects created by this object are not
affected.
</description>
</request>
<enum name="error">
<entry name="background_effect_exists" value="0"
summary="the surface already has a background effect object"/>
</enum>
<enum name="capability" bitfield="true">
<entry name="blur" value="1"
summary="the compositor supports applying blur"/>
</enum>
<event name="capabilities">
<description summary="capabilities of the compositor"/>
<arg name="flags" type="uint" enum="capability"/>
</event>
<request name="get_background_effect">
<description summary="get a background effects object">
Instantiate an interface extension for the given wl_surface to add
effects like blur for the background behind it.
If the given wl_surface already has a ext_background_effect_surface_v1
object associated, the background_effect_exists protocol error will be
raised.
</description>
<arg name="id" type="new_id" interface="ext_background_effect_surface_v1"
summary="the new ext_background_effect_surface_v1 object"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface"/>
</request>
</interface>
<interface name="ext_background_effect_surface_v1" version="1">
<description summary="background effects for a surface">
The background effect object provides a way to specify a region behind
a surface that should have background effects like blur applied.
If the wl_surface associated with the ext_background_effect_surface_v1
object has been destroyed, this object becomes inert.
</description>
<request name="destroy" type="destructor">
<description summary="release the blur object">
Informs the server that the client will no longer be using this protocol
object. The effect regions will be removed on the next commit.
</description>
</request>
<enum name="error">
<entry name="surface_destroyed" value="0"
summary="the associated surface has been destroyed"/>
</enum>
<request name="set_blur_region">
<description summary="set blur region">
This request sets the region of the surface that will have its
background blurred.
The blur region is specified in the surface-local coordinates, and
clipped by the compositor to the surface size.
The initial value for the blur region is empty. Setting the pending
blur region has copy semantics, and the wl_region object can be
destroyed immediately. A NULL wl_region removes the effect.
The blur region is double-buffered state, and will be applied on
the next wl_surface.commit.
The blur algorithm is subject to compositor policies.
If the associated surface has been destroyed, the surface_destroyed
error will be raised.
</description>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="blur region of the surface"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
data-control protocol
Maintainers:
Neal Gompa <neal@gompa.dev> (@Conan_Kudo)

View file

@ -0,0 +1,276 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_data_control_v1">
<copyright>
Copyright © 2018 Simon Ser
Copyright © 2019 Ivan Molodetskikh
Copyright © 2024 Neal Gompa
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
</copyright>
<description summary="control data devices">
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.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="ext_data_control_manager_v1" version="1">
<description summary="manager to control data devices">
This interface is a manager that allows creating per-seat data device
controls.
</description>
<request name="create_data_source">
<description summary="create a new data source">
Create a new data source.
</description>
<arg name="id" type="new_id" interface="ext_data_control_source_v1"
summary="data source to create"/>
</request>
<request name="get_data_device">
<description summary="get a data device for a seat">
Create a data device that can be used to manage a seat's selection.
</description>
<arg name="id" type="new_id" interface="ext_data_control_device_v1"/>
<arg name="seat" type="object" interface="wl_seat"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
</description>
</request>
</interface>
<interface name="ext_data_control_device_v1" version="1">
<description summary="manage a data device for a seat">
This interface allows a client to manage a seat's selection.
When the seat is destroyed, this object becomes inert.
</description>
<request name="set_selection">
<description summary="copy data to the selection">
This request asks the compositor to set the selection to the data from
the source on behalf of the client.
The given source may not be used in any further set_selection or
set_primary_selection requests. Attempting to use a previously used
source triggers the used_source protocol error.
To unset the selection, set the source to NULL.
</description>
<arg name="source" type="object" interface="ext_data_control_source_v1"
allow-null="true"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy this data device">
Destroys the data device object.
</description>
</request>
<event name="data_offer">
<description summary="introduce a new ext_data_control_offer">
The data_offer event introduces a new ext_data_control_offer object,
which will subsequently be used in either the
ext_data_control_device.selection event (for the regular clipboard
selections) or the ext_data_control_device.primary_selection event (for
the primary clipboard selections). Immediately following the
ext_data_control_device.data_offer event, the new data_offer object
will send out ext_data_control_offer.offer events to describe the MIME
types it offers.
</description>
<arg name="id" type="new_id" interface="ext_data_control_offer_v1"/>
</event>
<event name="selection">
<description summary="advertise new selection">
The selection event is sent out to notify the client of a new
ext_data_control_offer for the selection for this device. The
ext_data_control_device.data_offer and the ext_data_control_offer.offer
events are sent out immediately before this event to introduce the data
offer object. The selection event is sent to a client when a new
selection is set. The ext_data_control_offer is valid until a new
ext_data_control_offer or NULL is received. The client must destroy the
previous selection ext_data_control_offer, if any, upon receiving this
event. Regardless, the previous selection will be ignored once a new
selection ext_data_control_offer is received.
The first selection event is sent upon binding the
ext_data_control_device object.
</description>
<arg name="id" type="object" interface="ext_data_control_offer_v1"
allow-null="true"/>
</event>
<event name="finished">
<description summary="this data control is no longer valid">
This data control object is no longer valid and should be destroyed by
the client.
</description>
</event>
<event name="primary_selection">
<description summary="advertise new primary selection">
The primary_selection event is sent out to notify the client of a new
ext_data_control_offer for the primary selection for this device. The
ext_data_control_device.data_offer and the ext_data_control_offer.offer
events are sent out immediately before this event to introduce the data
offer object. The primary_selection event is sent to a client when a
new primary selection is set. The ext_data_control_offer is valid until
a new ext_data_control_offer or NULL is received. The client must
destroy the previous primary selection ext_data_control_offer, if any,
upon receiving this event. Regardless, the previous primary selection
will be ignored once a new primary selection ext_data_control_offer is
received.
If the compositor supports primary selection, the first
primary_selection event is sent upon binding the
ext_data_control_device object.
</description>
<arg name="id" type="object" interface="ext_data_control_offer_v1"
allow-null="true"/>
</event>
<request name="set_primary_selection">
<description summary="copy data to the primary selection">
This request asks the compositor to set the primary selection to the
data from the source on behalf of the client.
The given source may not be used in any further set_selection or
set_primary_selection requests. Attempting to use a previously used
source triggers the used_source protocol error.
To unset the primary selection, set the source to NULL.
The compositor will ignore this request if it does not support primary
selection.
</description>
<arg name="source" type="object" interface="ext_data_control_source_v1"
allow-null="true"/>
</request>
<enum name="error">
<entry name="used_source" value="1"
summary="source given to set_selection or set_primary_selection was already used before"/>
</enum>
</interface>
<interface name="ext_data_control_source_v1" version="1">
<description summary="offer to transfer data">
The ext_data_control_source object is the source side of a
ext_data_control_offer. It is created by the source client in a data
transfer and provides a way to describe the offered data and a way to
respond to requests to transfer the data.
</description>
<enum name="error">
<entry name="invalid_offer" value="1"
summary="offer sent after ext_data_control_device.set_selection"/>
</enum>
<request name="offer">
<description summary="add an offered MIME type">
This request adds a MIME type to the set of MIME types advertised to
targets. Can be called several times to offer multiple types.
Calling this after ext_data_control_device.set_selection is a protocol
error.
</description>
<arg name="mime_type" type="string"
summary="MIME type offered by the data source"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy this source">
Destroys the data source object.
</description>
</request>
<event name="send">
<description summary="send the data">
Request for data from the client. Send the data as the specified MIME
type over the passed file descriptor, then close it.
</description>
<arg name="mime_type" type="string" summary="MIME type for the data"/>
<arg name="fd" type="fd" summary="file descriptor for the data"/>
</event>
<event name="cancelled">
<description summary="selection was cancelled">
This data source is no longer valid. The data source has been replaced
by another data source.
The client should clean up and destroy this data source.
</description>
</event>
</interface>
<interface name="ext_data_control_offer_v1" version="1">
<description summary="offer to transfer data">
A ext_data_control_offer represents a piece of data offered for transfer
by another client (the source client). The offer describes the different
MIME types that the data can be converted to and provides the mechanism
for transferring the data directly from the source client.
</description>
<request name="receive">
<description summary="request that the data is transferred">
To transfer the offered data, the client issues this request and
indicates the MIME type it wants to receive. The transfer happens
through the passed file descriptor (typically created with the pipe
system call). The source client writes the data in the MIME type
representation requested and then closes the file descriptor.
The receiving client reads from the read end of the pipe until EOF and
then closes its end, at which point the transfer is complete.
This request may happen multiple times for different MIME types.
</description>
<arg name="mime_type" type="string"
summary="MIME type desired by receiver"/>
<arg name="fd" type="fd" summary="file descriptor for data transfer"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy this offer">
Destroys the data offer object.
</description>
</request>
<event name="offer">
<description summary="advertise offered MIME type">
Sent immediately after creating the ext_data_control_offer object.
One event per offered MIME type.
</description>
<arg name="mime_type" type="string" summary="offered MIME type"/>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Foreign toplevel list protocol
Maintainers:
i509VCB <mail@i509.me> (@i509VCB)

View file

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_foreign_toplevel_list_v1">
<copyright>
Copyright © 2018 Ilia Bozhinov
Copyright © 2020 Isaac Freund
Copyright © 2022 wb9688
Copyright © 2023 i509VCB
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
</copyright>
<description summary="list toplevels">
The purpose of this protocol is to provide protocol object handles for
toplevels, possibly originating from another client.
This protocol is intentionally minimalistic and expects additional
functionality (e.g. creating a screencopy source from a toplevel handle,
getting information about the state of the toplevel) to be implemented
in extension protocols.
The compositor may choose to restrict this protocol to a special client
launched by the compositor itself or expose it to all clients,
this is compositor policy.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="ext_foreign_toplevel_list_v1" version="1">
<description summary="list toplevels">
A toplevel is defined as a surface with a role similar to xdg_toplevel.
XWayland surfaces may be treated like toplevels in this protocol.
After a client binds the ext_foreign_toplevel_list_v1, each mapped
toplevel window will be sent using the ext_foreign_toplevel_list_v1.toplevel
event.
Clients which only care about the current state can perform a roundtrip after
binding this global.
For each instance of ext_foreign_toplevel_list_v1, the compositor must
create a new ext_foreign_toplevel_handle_v1 object for each mapped toplevel.
If a compositor implementation sends the ext_foreign_toplevel_list_v1.finished
event after the global is bound, the compositor must not send any
ext_foreign_toplevel_list_v1.toplevel events.
</description>
<event name="toplevel">
<description summary="a toplevel has been created">
This event is emitted whenever a new toplevel window is created. It is
emitted for all toplevels, regardless of the app that has created them.
All initial properties of the toplevel (identifier, title, app_id) will be sent
immediately after this event using the corresponding events for
ext_foreign_toplevel_handle_v1. The compositor will use the
ext_foreign_toplevel_handle_v1.done event to indicate when all data has
been sent.
</description>
<arg name="toplevel" type="new_id" interface="ext_foreign_toplevel_handle_v1"/>
</event>
<event name="finished">
<description summary="the compositor has finished with the toplevel manager">
This event indicates that the compositor is done sending events
to this object. The client should destroy the object.
See ext_foreign_toplevel_list_v1.destroy for more information.
The compositor must not send any more toplevel events after this event.
</description>
</event>
<request name="stop">
<description summary="stop sending events">
This request indicates that the client no longer wishes to receive
events for new toplevels.
The Wayland protocol is asynchronous, meaning the compositor may send
further toplevel events until the stop request is processed.
The client should wait for a ext_foreign_toplevel_list_v1.finished
event before destroying this object.
</description>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the ext_foreign_toplevel_list_v1 object">
This request should be called either when the client will no longer
use the ext_foreign_toplevel_list_v1 or after the finished event
has been received to allow destruction of the object.
If a client wishes to destroy this object it should send a
ext_foreign_toplevel_list_v1.stop request and wait for a ext_foreign_toplevel_list_v1.finished
event, then destroy the handles and then this object.
</description>
</request>
</interface>
<interface name="ext_foreign_toplevel_handle_v1" version="1">
<description summary="a mapped toplevel">
A ext_foreign_toplevel_handle_v1 object represents a mapped toplevel
window. A single app may have multiple mapped toplevels.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the ext_foreign_toplevel_handle_v1 object">
This request should be used when the client will no longer use the handle
or after the closed event has been received to allow destruction of the
object.
When a handle is destroyed, a new handle may not be created by the server
until the toplevel is unmapped and then remapped. Destroying a toplevel handle
is not recommended unless the client is cleaning up child objects
before destroying the ext_foreign_toplevel_list_v1 object, the toplevel
was closed or the toplevel handle will not be used in the future.
Other protocols which extend the ext_foreign_toplevel_handle_v1
interface should require destructors for extension interfaces be
called before allowing the toplevel handle to be destroyed.
</description>
</request>
<event name="closed">
<description summary="the toplevel has been closed">
The server will emit no further events on the ext_foreign_toplevel_handle_v1
after this event. Any requests received aside from the destroy request must
be ignored. Upon receiving this event, the client should destroy the handle.
Other protocols which extend the ext_foreign_toplevel_handle_v1
interface must also ignore requests other than destructors.
</description>
</event>
<event name="done">
<description summary="all information about the toplevel has been sent">
This event is sent after all changes in the toplevel state have
been sent.
This allows changes to the ext_foreign_toplevel_handle_v1 properties
to be atomically applied. Other protocols which extend the
ext_foreign_toplevel_handle_v1 interface may use this event to also
atomically apply any pending state.
This event must not be sent after the ext_foreign_toplevel_handle_v1.closed
event.
</description>
</event>
<event name="title">
<description summary="title change">
The title of the toplevel has changed.
The configured state must not be applied immediately. See
ext_foreign_toplevel_handle_v1.done for details.
</description>
<arg name="title" type="string"/>
</event>
<event name="app_id">
<description summary="app_id change">
The app id of the toplevel has changed.
The configured state must not be applied immediately. See
ext_foreign_toplevel_handle_v1.done for details.
</description>
<arg name="app_id" type="string"/>
</event>
<event name="identifier">
<description summary="a stable identifier for a toplevel">
This identifier is used to check if two or more toplevel handles belong
to the same toplevel.
The identifier is useful for command line tools or privileged clients
which may need to reference an exact toplevel across processes or
instances of the ext_foreign_toplevel_list_v1 global.
The compositor must only send this event when the handle is created.
The identifier must be unique per toplevel and it's handles. Two different
toplevels must not have the same identifier. The identifier is only valid
as long as the toplevel is mapped. If the toplevel is unmapped the identifier
must not be reused. An identifier must not be reused by the compositor to
ensure there are no races when sharing identifiers between processes.
An identifier is a string that contains up to 32 printable ASCII bytes.
An identifier must not be an empty string. It is recommended that a
compositor includes an opaque generation value in identifiers. How the
generation value is used when generating the identifier is implementation
dependent.
</description>
<arg name="identifier" type="string"/>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
idle_notify protocol
Maintainers:
Simon Ser <contact@emersion.fr> (@emersion)

View file

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_idle_notify_v1">
<copyright>
Copyright © 2015 Martin Gräßlin
Copyright © 2022 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="ext_idle_notifier_v1" version="2">
<description summary="idle notification manager">
This interface allows clients to monitor user idle status.
After binding to this global, clients can create ext_idle_notification_v1
objects to get notified when the user is idle for a given amount of time.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
Destroy the manager object. All objects created via this interface
remain valid.
</description>
</request>
<request name="get_idle_notification">
<description summary="create a notification object">
Create a new idle notification object.
The notification object has a minimum timeout duration and is tied to a
seat. The client will be notified if the seat is inactive for at least
the provided timeout. See ext_idle_notification_v1 for more details.
A zero timeout is valid and means the client wants to be notified as
soon as possible when the seat is inactive.
</description>
<arg name="id" type="new_id" interface="ext_idle_notification_v1"/>
<arg name="timeout" type="uint" summary="minimum idle timeout in msec"/>
<arg name="seat" type="object" interface="wl_seat"/>
</request>
<!-- Version 2 additions -->
<request name="get_input_idle_notification" since="2">
<description summary="create a notification object">
Create a new idle notification object to track input from the
user, such as keyboard and mouse movement. Because this object is
meant to track user input alone, it ignores idle inhibitors.
The notification object has a minimum timeout duration and is tied to a
seat. The client will be notified if the seat is inactive for at least
the provided timeout. See ext_idle_notification_v1 for more details.
A zero timeout is valid and means the client wants to be notified as
soon as possible when the seat is inactive.
</description>
<arg name="id" type="new_id" interface="ext_idle_notification_v1"/>
<arg name="timeout" type="uint" summary="minimum idle timeout in msec"/>
<arg name="seat" type="object" interface="wl_seat"/>
</request>
</interface>
<interface name="ext_idle_notification_v1" version="2">
<description summary="idle notification">
This interface is used by the compositor to send idle notification events
to clients.
Initially the notification object is not idle. The notification object
becomes idle when no user activity has happened for at least the timeout
duration, starting from the creation of the notification object. User
activity may include input events or a presence sensor, but is
compositor-specific.
How this notification responds to idle inhibitors depends on how
it was constructed. If constructed from the
get_idle_notification request, then if an idle inhibitor is
active (e.g. another client has created a zwp_idle_inhibitor_v1
on a visible surface), the compositor must not make the
notification object idle. However, if constructed from the
get_input_idle_notification request, then idle inhibitors are
ignored, and only input from the user, e.g. from a keyboard or
mouse, counts as activity.
When the notification object becomes idle, an idled event is sent. When
user activity starts again, the notification object stops being idle,
a resumed event is sent and the timeout is restarted.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the notification object">
Destroy the notification object.
</description>
</request>
<event name="idled">
<description summary="notification object is idle">
This event is sent when the notification object becomes idle.
It's a compositor protocol error to send this event twice without a
resumed event in-between.
</description>
</event>
<event name="resumed">
<description summary="notification object is no longer idle">
This event is sent when the notification object stops being idle.
It's a compositor protocol error to send this event twice without an
idled event in-between. It's a compositor protocol error to send this
event prior to any idled event.
</description>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,5 @@
Image Capture Source Protocol
Maintainers:
Andri Yngvason <andri@yngvason.is> (@andri)
Simon Ser <contact@emersion.fr> (@emersion)

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_image_capture_source_v1">
<copyright>
Copyright © 2022 Andri Yngvason
Copyright © 2024 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="opaque image capture source objects">
This protocol serves as an intermediary between capturing protocols and
potential image capture sources such as outputs and toplevels.
This protocol may be extended to support more image capture sources in the
future, thereby adding those image capture sources to other protocols that
use the image capture source object without having to modify those
protocols.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="ext_image_capture_source_v1" version="1">
<description summary="opaque image capture source object">
The image capture source object is an opaque descriptor for a capturable
resource. This resource may be any sort of entity from which an image
may be derived.
Note, because ext_image_capture_source_v1 objects are created from multiple
independent factory interfaces, the ext_image_capture_source_v1 interface is
frozen at version 1.
</description>
<request name="destroy" type="destructor">
<description summary="delete this object">
Destroys the image capture source. This request may be sent at any time
by the client.
</description>
</request>
</interface>
<interface name="ext_output_image_capture_source_manager_v1" version="1">
<description summary="image capture source manager for outputs">
A manager for creating image capture source objects for wl_output objects.
</description>
<request name="create_source">
<description summary="create source object for output">
Creates a source object for an output. Images captured from this source
will show the same content as the output. Some elements may be omitted,
such as cursors and overlays that have been marked as transparent to
capturing.
</description>
<arg name="source" type="new_id" interface="ext_image_capture_source_v1"/>
<arg name="output" type="object" interface="wl_output"/>
</request>
<request name="destroy" type="destructor">
<description summary="delete this object">
Destroys the manager. This request may be sent at any time by the client
and objects created by the manager will remain valid after its
destruction.
</description>
</request>
</interface>
<interface name="ext_foreign_toplevel_image_capture_source_manager_v1" version="1">
<description summary="image capture source manager for foreign toplevels">
A manager for creating image capture source objects for
ext_foreign_toplevel_handle_v1 objects.
</description>
<request name="create_source">
<description summary="create source object for foreign toplevel">
Creates a source object for a foreign toplevel handle. Images captured
from this source will show the same content as the toplevel.
</description>
<arg name="source" type="new_id" interface="ext_image_capture_source_v1"/>
<arg name="toplevel_handle" type="object" interface="ext_foreign_toplevel_handle_v1"/>
</request>
<request name="destroy" type="destructor">
<description summary="delete this object">
Destroys the manager. This request may be sent at any time by the client
and objects created by the manager will remain valid after its
destruction.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,5 @@
Image Copy Capture protocol
Maintainers:
Andri Yngvason <andri@yngvason.is> (@andri)
Simon Ser <contact@emersion.fr> (@emersion)

View file

@ -0,0 +1,456 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_image_copy_capture_v1">
<copyright>
Copyright © 2021-2023 Andri Yngvason
Copyright © 2024 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="image capturing into client buffers">
This protocol allows clients to ask the compositor to capture image sources
such as outputs and toplevels into user submitted buffers.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="ext_image_copy_capture_manager_v1" version="1">
<description summary="manager to inform clients and begin capturing">
This object is a manager which offers requests to start capturing from a
source.
</description>
<enum name="error">
<entry name="invalid_option" value="1" summary="invalid option flag"/>
</enum>
<enum name="options" bitfield="true">
<entry name="paint_cursors" value="1" summary="paint cursors onto captured frames"/>
</enum>
<request name="create_session">
<description summary="capture an image capture source">
Create a capturing session for an image capture source.
If the paint_cursors option is set, cursors shall be composited onto
the captured frame. The cursor must not be composited onto the frame
if this flag is not set.
If the options bitfield is invalid, the invalid_option protocol error
is sent.
</description>
<arg name="session" type="new_id" interface="ext_image_copy_capture_session_v1"/>
<arg name="source" type="object" interface="ext_image_capture_source_v1"/>
<arg name="options" type="uint" enum="options"/>
</request>
<request name="create_pointer_cursor_session">
<description summary="capture the pointer cursor of an image capture source">
Create a cursor capturing session for the pointer of an image capture
source.
</description>
<arg name="session" type="new_id" interface="ext_image_copy_capture_cursor_session_v1"/>
<arg name="source" type="object" interface="ext_image_capture_source_v1"/>
<arg name="pointer" type="object" interface="wl_pointer"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
Destroy the manager object.
Other objects created via this interface are unaffected.
</description>
</request>
</interface>
<interface name="ext_image_copy_capture_session_v1" version="1">
<description summary="image copy capture session">
This object represents an active image copy capture session.
After a capture session is created, buffer constraint events will be
emitted from the compositor to tell the client which buffer types and
formats are supported for reading from the session. The compositor may
re-send buffer constraint events whenever they change.
To advertise buffer constraints, the compositor must send in no
particular order: zero or more shm_format and dmabuf_format events, zero
or one dmabuf_device event, and exactly one buffer_size event. Then the
compositor must send a done event.
When the client has received all the buffer constraints, it can create a
buffer accordingly, attach it to the capture session using the
attach_buffer request, set the buffer damage using the damage_buffer
request and then send the capture request.
</description>
<enum name="error">
<entry name="duplicate_frame" value="1"
summary="create_frame sent before destroying previous frame"/>
</enum>
<event name="buffer_size">
<description summary="image capture source dimensions">
Provides the dimensions of the source image in buffer pixel coordinates.
The client must attach buffers that match this size.
</description>
<arg name="width" type="uint" summary="buffer width"/>
<arg name="height" type="uint" summary="buffer height"/>
</event>
<event name="shm_format">
<description summary="shm buffer format">
Provides the format that must be used for shared-memory buffers.
This event may be emitted multiple times, in which case the client may
choose any given format.
</description>
<arg name="format" type="uint" enum="wl_shm.format" summary="shm format"/>
</event>
<event name="dmabuf_device">
<description summary="dma-buf device">
This event advertises the device buffers must be allocated on for
dma-buf buffers.
In general the device is a DRM node. The DRM node type (primary vs.
render) is unspecified. Clients must not rely on the compositor sending
a particular node type. Clients cannot check two devices for equality
by comparing the dev_t value.
</description>
<arg name="device" type="array" summary="device dev_t value"/>
</event>
<event name="dmabuf_format">
<description summary="dma-buf format">
Provides the format that must be used for dma-buf buffers.
The client may choose any of the modifiers advertised in the array of
64-bit unsigned integers.
This event may be emitted multiple times, in which case the client may
choose any given format.
</description>
<arg name="format" type="uint" summary="drm format code"/>
<arg name="modifiers" type="array" summary="drm format modifiers"/>
</event>
<event name="done">
<description summary="all constraints have been sent">
This event is sent once when all buffer constraint events have been
sent.
The compositor must always end a batch of buffer constraint events with
this event, regardless of whether it sends the initial constraints or
an update.
</description>
</event>
<event name="stopped">
<description summary="session is no longer available">
This event indicates that the capture session has stopped and is no
longer available. This can happen in a number of cases, e.g. when the
underlying source is destroyed, if the user decides to end the image
capture, or if an unrecoverable runtime error has occurred.
The client should destroy the session after receiving this event.
</description>
</event>
<request name="create_frame">
<description summary="create a frame">
Create a capture frame for this session.
At most one frame object can exist for a given session at any time. If
a client sends a create_frame request before a previous frame object
has been destroyed, the duplicate_frame protocol error is raised.
</description>
<arg name="frame" type="new_id" interface="ext_image_copy_capture_frame_v1"/>
</request>
<request name="destroy" type="destructor">
<description summary="delete this object">
Destroys the session. This request can be sent at any time by the
client.
This request doesn't affect ext_image_copy_capture_frame_v1 objects created by
this object.
</description>
</request>
</interface>
<interface name="ext_image_copy_capture_frame_v1" version="1">
<description summary="image capture frame">
This object represents an image capture frame.
The client should attach a buffer, damage the buffer, and then send a
capture request.
If the capture is successful, the compositor must send the frame metadata
(transform, damage, presentation_time in any order) followed by the ready
event.
If the capture fails, the compositor must send the failed event.
</description>
<enum name="error">
<entry name="no_buffer" value="1" summary="capture sent without attach_buffer"/>
<entry name="invalid_buffer_damage" value="2" summary="invalid buffer damage"/>
<entry name="already_captured" value="3" summary="capture request has been sent"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy this object">
Destroys the frame. This request can be sent at any time by the
client.
</description>
</request>
<request name="attach_buffer">
<description summary="attach buffer to session">
Attach a buffer to the session.
The wl_buffer.release request is unused.
The new buffer replaces any previously attached buffer.
This request must not be sent after capture, or else the
already_captured protocol error is raised.
</description>
<arg name="buffer" type="object" interface="wl_buffer"/>
</request>
<request name="damage_buffer">
<description summary="damage buffer">
Apply damage to the buffer which is to be captured next. This request
may be sent multiple times to describe a region.
The client indicates the accumulated damage since this wl_buffer was
last captured. During capture, the compositor will update the buffer
with at least the union of the region passed by the client and the
region advertised by ext_image_copy_capture_frame_v1.damage.
When a wl_buffer is captured for the first time, or when the client
doesn't track damage, the client must damage the whole buffer.
This is for optimisation purposes. The compositor may use this
information to reduce copying.
These coordinates originate from the upper left corner of the buffer.
If x or y are strictly negative, or if width or height are negative or
zero, the invalid_buffer_damage protocol error is raised.
This request must not be sent after capture, or else the
already_captured protocol error is raised.
</description>
<arg name="x" type="int" summary="region x coordinate"/>
<arg name="y" type="int" summary="region y coordinate"/>
<arg name="width" type="int" summary="region width"/>
<arg name="height" type="int" summary="region height"/>
</request>
<request name="capture">
<description summary="capture a frame">
Capture a frame.
Unless this is the first successful captured frame performed in this
session, the compositor may wait an indefinite amount of time for the
source content to change before performing the copy.
This request may only be sent once, or else the already_captured
protocol error is raised. A buffer must be attached before this request
is sent, or else the no_buffer protocol error is raised.
</description>
</request>
<event name="transform">
<description summary="buffer transform">
This event is sent before the ready event and holds the transform that
the compositor has applied to the buffer contents.
</description>
<arg name="transform" type="uint" enum="wl_output.transform"/>
</event>
<event name="damage">
<description summary="buffer damaged region">
This event is sent before the ready event. It may be generated multiple
times to describe a region.
The first captured frame in a session will always carry full damage.
Subsequent frames' damaged regions describe which parts of the buffer
have changed since the last ready event.
These coordinates originate in the upper left corner of the buffer.
</description>
<arg name="x" type="int" summary="damage x coordinate"/>
<arg name="y" type="int" summary="damage y coordinate"/>
<arg name="width" type="int" summary="damage width"/>
<arg name="height" type="int" summary="damage height"/>
</event>
<event name="presentation_time">
<description summary="presentation time of the frame">
This event indicates the time at which the frame is presented to the
output in system monotonic time. This event is sent before the ready
event.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
each component being an unsigned 32-bit value. Whole seconds are in
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
and the additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999].
</description>
<arg name="tv_sec_hi" type="uint"
summary="high 32 bits of the seconds part of the timestamp"/>
<arg name="tv_sec_lo" type="uint"
summary="low 32 bits of the seconds part of the timestamp"/>
<arg name="tv_nsec" type="uint"
summary="nanoseconds part of the timestamp"/>
</event>
<event name="ready">
<description summary="frame is available for reading">
Called as soon as the frame is copied, indicating it is available
for reading.
The buffer may be re-used by the client after this event.
After receiving this event, the client must destroy the object.
</description>
</event>
<enum name="failure_reason">
<entry name="unknown" value="0">
<description summary="unknown runtime error">
An unspecified runtime error has occurred. The client may retry.
</description>
</entry>
<entry name="buffer_constraints" value="1">
<description summary="buffer constraints mismatch">
The buffer submitted by the client doesn't match the latest session
constraints. The client should re-allocate its buffers and retry.
</description>
</entry>
<entry name="stopped" value="2">
<description summary="session is no longer available">
The session has stopped. See ext_image_copy_capture_session_v1.stopped.
</description>
</entry>
</enum>
<event name="failed">
<description summary="capture failed">
This event indicates that the attempted frame copy has failed.
After receiving this event, the client must destroy the object.
</description>
<arg name="reason" type="uint" enum="failure_reason"/>
</event>
</interface>
<interface name="ext_image_copy_capture_cursor_session_v1" version="1">
<description summary="cursor capture session">
This object represents a cursor capture session. It extends the base
capture session with cursor-specific metadata.
</description>
<enum name="error">
<entry name="duplicate_session" value="1" summary="get_capture_session sent twice"/>
</enum>
<request name="destroy" type="destructor">
<description summary="delete this object">
Destroys the session. This request can be sent at any time by the
client.
This request doesn't affect ext_image_copy_capture_frame_v1 objects created by
this object.
</description>
</request>
<request name="get_capture_session">
<description summary="get image copy capturer session">
Gets the image copy capture session for this cursor session.
The session will produce frames of the cursor image. The compositor may
pause the session when the cursor leaves the captured area.
This request must not be sent more than once, or else the
duplicate_session protocol error is raised.
</description>
<arg name="session" type="new_id" interface="ext_image_copy_capture_session_v1"/>
</request>
<event name="enter">
<description summary="cursor entered captured area">
Sent when a cursor enters the captured area. It shall be generated
before the "position" and "hotspot" events when and only when a cursor
enters the area.
The cursor enters the captured area when the cursor image intersects
with the captured area. Note, this is different from e.g.
wl_pointer.enter.
</description>
</event>
<event name="leave">
<description summary="cursor left captured area">
Sent when a cursor leaves the captured area. No "position" or "hotspot"
event is generated for the cursor until the cursor enters the captured
area again.
</description>
</event>
<event name="position">
<description summary="position changed">
Cursors outside the image capture source do not get captured and no
event will be generated for them.
The given position is the position of the cursor's hotspot and it is
relative to the main buffer's top left corner in transformed buffer
pixel coordinates. The coordinates may be negative or greater than the
main buffer size.
</description>
<arg name="x" type="int" summary="position x coordinates"/>
<arg name="y" type="int" summary="position y coordinates"/>
</event>
<event name="hotspot">
<description summary="hotspot changed">
The hotspot describes the offset between the cursor image and the
position of the input device.
The given coordinates are the hotspot's offset from the origin in
buffer coordinates.
Clients should not apply the hotspot immediately: the hotspot becomes
effective when the next ext_image_copy_capture_frame_v1.ready event is received.
Compositors may delay this event until the client captures a new frame.
</description>
<arg name="x" type="int" summary="hotspot x coordinates"/>
<arg name="y" type="int" summary="hotspot y coordinates"/>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
ext session lock protocol
Maintainers:
Isaac Freund <mail@isaacfreund.com> (@ifreund)

View file

@ -0,0 +1,328 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_session_lock_v1">
<copyright>
Copyright 2021 Isaac Freund
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</copyright>
<description summary="secure session locking with arbitrary graphics">
This protocol allows for a privileged Wayland client to lock the session
and display arbitrary graphics while the session is locked.
The compositor may choose to restrict this protocol to a special client
launched by the compositor itself or expose it to all privileged clients,
this is compositor policy.
The client is responsible for performing authentication and informing the
compositor when the session should be unlocked. If the client dies while
the session is locked the session remains locked, possibly permanently
depending on compositor policy.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Warning! The protocol described in this file is currently in the
testing phase. Backward compatible changes may be added together with
the corresponding interface version bump. Backward incompatible changes
can only be done by creating a new major version of the extension.
</description>
<interface name="ext_session_lock_manager_v1" version="1">
<description summary="used to lock the session">
This interface is used to request that the session be locked.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the session lock manager object">
This informs the compositor that the session lock manager object will
no longer be used. Existing objects created through this interface
remain valid.
</description>
</request>
<request name="lock">
<description summary="attempt to lock the session">
This request creates a session lock and asks the compositor to lock the
session. The compositor will send either the ext_session_lock_v1.locked
or ext_session_lock_v1.finished event on the created object in
response to this request.
</description>
<arg name="id" type="new_id" interface="ext_session_lock_v1"/>
</request>
</interface>
<interface name="ext_session_lock_v1" version="1">
<description summary="manage lock state and create lock surfaces">
In response to the creation of this object the compositor must send
either the locked or finished event.
The locked event indicates that the session is locked. This means
that the compositor must stop rendering and providing input to normal
clients. Instead the compositor must blank all outputs with an opaque
color such that their normal content is fully hidden.
The only surfaces that should be rendered while the session is locked
are the lock surfaces created through this interface and optionally,
at the compositor's discretion, special privileged surfaces such as
input methods or portions of desktop shell UIs.
The locked event must not be sent until a new "locked" frame (either
from a session lock surface or the compositor blanking the output) has
been presented on all outputs and no security sensitive normal/unlocked
content is possibly visible.
The finished event should be sent immediately on creation of this
object if the compositor decides that the locked event will not be sent.
The compositor may wait for the client to create and render session lock
surfaces before sending the locked event to avoid displaying intermediate
blank frames. However, it must impose a reasonable time limit if
waiting and send the locked event as soon as the hard requirements
described above can be met if the time limit expires. Clients should
immediately create lock surfaces for all outputs on creation of this
object to make this possible.
This behavior of the locked event is required in order to prevent
possible race conditions with clients that wish to suspend the system
or similar after locking the session. Without these semantics, clients
triggering a suspend after receiving the locked event would race with
the first "locked" frame being presented and normal/unlocked frames
might be briefly visible as the system is resumed if the suspend
operation wins the race.
If the client dies while the session is locked, the compositor must not
unlock the session in response. It is acceptable for the session to be
permanently locked if this happens. The compositor may choose to continue
to display the lock surfaces the client had mapped before it died or
alternatively fall back to a solid color, this is compositor policy.
Compositors may also allow a secure way to recover the session, the
details of this are compositor policy. Compositors may allow a new
client to create a ext_session_lock_v1 object and take responsibility
for unlocking the session, they may even start a new lock client
instance automatically.
</description>
<enum name="error">
<entry name="invalid_destroy" value="0"
summary="attempted to destroy session lock while locked"/>
<entry name="invalid_unlock" value="1"
summary="unlock requested but locked event was never sent"/>
<entry name="role" value="2"
summary="given wl_surface already has a role"/>
<entry name="duplicate_output" value="3"
summary="given output already has a lock surface"/>
<entry name="already_constructed" value="4"
summary="given wl_surface has a buffer attached or committed"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the session lock">
This informs the compositor that the lock object will no longer be
used. Existing objects created through this interface remain valid.
After this request is made, lock surfaces created through this object
should be destroyed by the client as they will no longer be used by
the compositor.
It is a protocol error to make this request if the locked event was
sent, the unlock_and_destroy request must be used instead.
</description>
</request>
<event name="locked">
<description summary="session successfully locked">
This client is now responsible for displaying graphics while the
session is locked and deciding when to unlock the session.
The locked event must not be sent until a new "locked" frame has been
presented on all outputs and no security sensitive normal/unlocked
content is possibly visible.
If this event is sent, making the destroy request is a protocol error,
the lock object must be destroyed using the unlock_and_destroy request.
</description>
</event>
<event name="finished">
<description summary="the session lock object should be destroyed">
The compositor has decided that the session lock should be destroyed
as it will no longer be used by the compositor. Exactly when this
event is sent is compositor policy, but it must never be sent more
than once for a given session lock object.
This might be sent because there is already another ext_session_lock_v1
object held by a client, or the compositor has decided to deny the
request to lock the session for some other reason. This might also
be sent because the compositor implements some alternative, secure
way to authenticate and unlock the session.
The finished event should be sent immediately on creation of this
object if the compositor decides that the locked event will not
be sent.
If the locked event is sent on creation of this object the finished
event may still be sent at some later time in this object's
lifetime. This is compositor policy.
Upon receiving this event, the client should make either the destroy
request or the unlock_and_destroy request, depending on whether or
not the locked event was received on this object.
</description>
</event>
<request name="get_lock_surface">
<description summary="create a lock surface for a given output">
The client is expected to create lock surfaces for all outputs
currently present and any new outputs as they are advertised. These
won't be displayed by the compositor unless the lock is successful
and the locked event is sent.
Providing a wl_surface which already has a role or already has a buffer
attached or committed is a protocol error, as is attaching/committing
a buffer before the first ext_session_lock_surface_v1.configure event.
Attempting to create more than one lock surface for a given output
is a duplicate_output protocol error.
</description>
<arg name="id" type="new_id" interface="ext_session_lock_surface_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
<arg name="output" type="object" interface="wl_output"/>
</request>
<request name="unlock_and_destroy" type="destructor">
<description summary="unlock the session, destroying the object">
This request indicates that the session should be unlocked, for
example because the user has entered their password and it has been
verified by the client.
This request also informs the compositor that the lock object will
no longer be used and should be destroyed. Existing objects created
through this interface remain valid.
After this request is made, lock surfaces created through this object
should be destroyed by the client as they will no longer be used by
the compositor.
It is a protocol error to make this request if the locked event has
not been sent. In that case, the lock object must be destroyed using
the destroy request.
Note that a correct client that wishes to exit directly after unlocking
the session must use the wl_display.sync request to ensure the server
receives and processes the unlock_and_destroy request. Otherwise
there is no guarantee that the server has unlocked the session due
to the asynchronous nature of the Wayland protocol. For example,
the server might terminate the client with a protocol error before
it processes the unlock_and_destroy request.
</description>
</request>
</interface>
<interface name="ext_session_lock_surface_v1" version="1">
<description summary="a surface displayed while the session is locked">
The client may use lock surfaces to display a screensaver, render a
dialog to enter a password and unlock the session, or however else it
sees fit.
On binding this interface the compositor will immediately send the
first configure event. After making the ack_configure request in
response to this event the client should attach and commit the first
buffer. Committing the surface before acking the first configure is a
protocol error. Committing the surface with a null buffer at any time
is a protocol error.
The compositor is free to handle keyboard/pointer focus for lock
surfaces however it chooses. A reasonable way to do this would be to
give the first lock surface created keyboard focus and change keyboard
focus if the user clicks on other surfaces.
</description>
<enum name="error">
<entry name="commit_before_first_ack" value="0"
summary="surface committed before first ack_configure request"/>
<entry name="null_buffer" value="1"
summary="surface committed with a null buffer"/>
<entry name="dimensions_mismatch" value="2"
summary="failed to match ack'd width/height"/>
<entry name="invalid_serial" value="3"
summary="serial provided in ack_configure is invalid"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the lock surface object">
This informs the compositor that the lock surface object will no
longer be used.
It is recommended for a lock client to destroy lock surfaces if
their corresponding wl_output global is removed.
If a lock surface on an active output is destroyed before the
ext_session_lock_v1.unlock_and_destroy event is sent, the compositor
must fall back to rendering a solid color.
</description>
</request>
<request name="ack_configure">
<description summary="ack a configure event">
When a configure event is received, if a client commits the surface
in response to the configure event, then the client must make an
ack_configure request sometime before the commit request, passing
along the serial of the configure event.
If the client receives multiple configure events before it can
respond to one, it only has to ack the last configure event.
A client is not required to commit immediately after sending an
ack_configure request - it may even ack_configure several times
before its next surface commit.
A client may send multiple ack_configure requests before committing,
but only the last request sent before a commit indicates which
configure event the client really is responding to.
Sending an ack_configure request consumes the configure event
referenced by the given serial, as well as all older configure events
sent on this object.
It is a protocol error to issue multiple ack_configure requests
referencing the same configure event or to issue an ack_configure
request referencing a configure event older than the last configure
event acked for a given lock surface.
</description>
<arg name="serial" type="uint" summary="serial from the configure event"/>
</request>
<event name="configure">
<description summary="the client should resize its surface">
This event is sent once on binding the interface and may be sent again
at the compositor's discretion, for example if output geometry changes.
The width and height are in surface-local coordinates and are exact
requirements. Failing to match these surface dimensions in the next
commit after acking a configure is a protocol error.
</description>
<arg name="serial" type="uint" summary="serial for use in ack_configure"/>
<arg name="width" type="uint"/>
<arg name="height" type="uint"/>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Transient Seat
Maintainers:
Andri Yngvason <andri@yngvason.is> (@andri)

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_transient_seat_v1">
<copyright>
Copyright © 2020 - 2023 Andri Yngvason
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="protocol for creating temporary seats">
The transient seat protocol can be used by privileged clients to create
independent seats that will be removed from the compositor when the client
destroys its transient seat.
This protocol is intended for use with virtual input protocols such as
"virtual_keyboard_unstable_v1" or "wlr_virtual_pointer_unstable_v1", both
of which allow the user to select a seat.
The "wl_seat" global created by this protocol does not generate input events
on its own, or have any capabilities except those assigned to it by other
protocol extensions, such as the ones mentioned above.
For example, a remote desktop server can create a seat with virtual inputs
for each remote user by following these steps for each new connection:
* Create a transient seat
* Wait for the transient seat to be created
* Locate a "wl_seat" global with a matching name
* Create virtual inputs using the resulting "wl_seat" global
</description>
<interface name="ext_transient_seat_manager_v1" version="1">
<description summary="transient seat manager">
The transient seat manager creates short-lived seats.
</description>
<request name="create">
<description summary="create a transient seat">
Create a new seat that is removed when the client side transient seat
object is destroyed.
The actual seat may be removed sooner, in which case the transient seat
object shall become inert.
</description>
<arg name="seat" type="new_id" interface="ext_transient_seat_v1"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
Destroy the manager.
All objects created by the manager will remain valid until they are
destroyed themselves.
</description>
</request>
</interface>
<interface name="ext_transient_seat_v1" version="1">
<description summary="transient seat handle">
When the transient seat handle is destroyed, the seat itself will also be
destroyed.
</description>
<event name="ready">
<description summary="transient seat is ready">
This event advertises the global name for the wl_seat to be used with
wl_registry_bind.
It is sent exactly once, immediately after the transient seat is created
and the new "wl_seat" global is advertised, if and only if the creation
of the transient seat was allowed.
</description>
<arg name="global_name" type="uint"/>
</event>
<event name="denied">
<description summary="transient seat creation denied">
The event informs the client that the compositor denied its request to
create a transient seat.
It is sent exactly once, immediately after the transient seat object is
created, if and only if the creation of the transient seat was denied.
After receiving this event, the client should destroy the object.
</description>
</event>
<request name="destroy" type="destructor">
<description summary="destroy transient seat">
When the transient seat object is destroyed by the client, the
associated seat created by the compositor is also destroyed.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,5 @@
Workspace protocol
Maintainers:
Ilia Bozhinov <ammen99@gmail.com>
Victoria Brekenfeld <wayland@drakulix.de>

View file

@ -0,0 +1,422 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ext_workspace_v1">
<copyright>
Copyright © 2019 Christopher Billington
Copyright © 2020 Ilia Bozhinov
Copyright © 2022 Victoria Brekenfeld
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
</copyright>
<interface name="ext_workspace_manager_v1" version="1">
<description summary="list and control workspaces">
Workspaces, also called virtual desktops, are groups of surfaces. A
compositor with a concept of workspaces may only show some such groups of
surfaces (those of 'active' workspaces) at a time. 'Activating' a
workspace is a request for the compositor to display that workspace's
surfaces as normal, whereas the compositor may hide or otherwise
de-emphasise surfaces that are associated only with 'inactive' workspaces.
Workspaces are grouped by which sets of outputs they correspond to, and
may contain surfaces only from those outputs. In this way, it is possible
for each output to have its own set of workspaces, or for all outputs (or
any other arbitrary grouping) to share workspaces. Compositors may
optionally conceptually arrange each group of workspaces in an
N-dimensional grid.
The purpose of this protocol is to enable the creation of taskbars and
docks by providing them with a list of workspaces and their properties,
and allowing them to activate and deactivate workspaces.
After a client binds the ext_workspace_manager_v1, each workspace will be
sent via the workspace event.
</description>
<event name="workspace_group">
<description summary="a workspace group has been created">
This event is emitted whenever a new workspace group has been created.
All initial details of the workspace group (outputs) will be
sent immediately after this event via the corresponding events in
ext_workspace_group_handle_v1 and ext_workspace_handle_v1.
</description>
<arg name="workspace_group" type="new_id" interface="ext_workspace_group_handle_v1"/>
</event>
<event name="workspace">
<description summary="workspace has been created">
This event is emitted whenever a new workspace has been created.
All initial details of the workspace (name, coordinates, state) will
be sent immediately after this event via the corresponding events in
ext_workspace_handle_v1.
Workspaces start off unassigned to any workspace group.
</description>
<arg name="workspace" type="new_id" interface="ext_workspace_handle_v1"/>
</event>
<request name="commit">
<description summary="all requests about the workspaces have been sent">
The client must send this request after it has finished sending other
requests. The compositor must process a series of requests preceding a
commit request atomically.
This allows changes to the workspace properties to be seen as atomic,
even if they happen via multiple events, and even if they involve
multiple ext_workspace_handle_v1 objects, for example, deactivating one
workspace and activating another.
</description>
</request>
<event name="done">
<description summary="all information about the workspaces and workspace groups has been sent">
This event is sent after all changes in all workspaces and workspace groups have been
sent.
This allows changes to one or more ext_workspace_group_handle_v1
properties and ext_workspace_handle_v1 properties
to be seen as atomic, even if they happen via multiple events.
In particular, an output moving from one workspace group to
another sends an output_enter event and an output_leave event to the two
ext_workspace_group_handle_v1 objects in question. The compositor sends
the done event only after updating the output information in both
workspace groups.
</description>
</event>
<event name="finished" type="destructor">
<description summary="the compositor has finished with the workspace_manager">
This event indicates that the compositor is done sending events to the
ext_workspace_manager_v1. The server will destroy the object
immediately after sending this request.
</description>
</event>
<request name="stop">
<description summary="stop sending events">
Indicates the client no longer wishes to receive events for new
workspace groups. However the compositor may emit further workspace
events, until the finished event is emitted. The compositor is expected
to send the finished event eventually once the stop request has been processed.
The client must not send any requests after this one, doing so will raise a wl_display
invalid_object error.
</description>
</request>
</interface>
<interface name="ext_workspace_group_handle_v1" version="1">
<description summary="a workspace group assigned to a set of outputs">
A ext_workspace_group_handle_v1 object represents a workspace group
that is assigned a set of outputs and contains a number of workspaces.
The set of outputs assigned to the workspace group is conveyed to the client via
output_enter and output_leave events, and its workspaces are conveyed with
workspace events.
For example, a compositor which has a set of workspaces for each output may
advertise a workspace group (and its workspaces) per output, whereas a compositor
where a workspace spans all outputs may advertise a single workspace group for all
outputs.
</description>
<enum name="group_capabilities" bitfield="true">
<entry name="create_workspace" value="1" summary="create_workspace request is available"/>
</enum>
<event name="capabilities">
<description summary="compositor capabilities">
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for creating workspaces, a button
triggering the create_workspace request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for creating workspaces will ignore
create_workspace requests.
Compositors must send this event once after creation of an
ext_workspace_group_handle_v1. When the capabilities change, compositors
must send this event again.
</description>
<arg name="capabilities" type="uint" summary="capabilities" enum="group_capabilities"/>
</event>
<event name="output_enter">
<description summary="output assigned to workspace group">
This event is emitted whenever an output is assigned to the workspace
group or a new `wl_output` object is bound by the client, which was already
assigned to this workspace_group.
</description>
<arg name="output" type="object" interface="wl_output"/>
</event>
<event name="output_leave">
<description summary="output removed from workspace group">
This event is emitted whenever an output is removed from the workspace
group.
</description>
<arg name="output" type="object" interface="wl_output"/>
</event>
<event name="workspace_enter">
<description summary="workspace added to workspace group">
This event is emitted whenever a workspace is assigned to this group.
A workspace may only ever be assigned to a single group at a single point
in time, but can be re-assigned during it's lifetime.
</description>
<arg name="workspace" type="object" interface="ext_workspace_handle_v1"/>
</event>
<event name="workspace_leave">
<description summary="workspace removed from workspace group">
This event is emitted whenever a workspace is removed from this group.
</description>
<arg name="workspace" type="object" interface="ext_workspace_handle_v1"/>
</event>
<event name="removed">
<description summary="this workspace group has been removed">
This event is send when the group associated with the ext_workspace_group_handle_v1
has been removed. After sending this request the compositor will immediately consider
the object inert. Any requests will be ignored except the destroy request.
It is guaranteed there won't be any more events referencing this
ext_workspace_group_handle_v1.
The compositor must remove all workspaces belonging to a workspace group
via a workspace_leave event before removing the workspace group.
</description>
</event>
<request name="create_workspace">
<description summary="create a new workspace">
Request that the compositor create a new workspace with the given name
and assign it to this group.
There is no guarantee that the compositor will create a new workspace,
or that the created workspace will have the provided name.
</description>
<arg name="workspace" type="string"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the ext_workspace_group_handle_v1 object">
Destroys the ext_workspace_group_handle_v1 object.
This request should be send either when the client does not want to
use the workspace group object any more or after the removed event to finalize
the destruction of the object.
</description>
</request>
</interface>
<interface name="ext_workspace_handle_v1" version="1">
<description summary="a workspace handing a group of surfaces">
A ext_workspace_handle_v1 object represents a workspace that handles a
group of surfaces.
Each workspace has:
- a name, conveyed to the client with the name event
- potentially an id conveyed with the id event
- a list of states, conveyed to the client with the state event
- and optionally a set of coordinates, conveyed to the client with the
coordinates event
The client may request that the compositor activate or deactivate the workspace.
Each workspace can belong to only a single workspace group.
Depending on the compositor policy, there might be workspaces with
the same name in different workspace groups, but these workspaces are still
separate (e.g. one of them might be active while the other is not).
</description>
<event name="id">
<description summary="workspace id">
If this event is emitted, it will be send immediately after the
ext_workspace_handle_v1 is created or when an id is assigned to
a workspace (at most once during it's lifetime).
An id will never change during the lifetime of the `ext_workspace_handle_v1`
and is guaranteed to be unique during it's lifetime.
Ids are not human-readable and shouldn't be displayed, use `name` for that purpose.
Compositors are expected to only send ids for workspaces likely stable across multiple
sessions and can be used by clients to store preferences for workspaces. Workspaces without
ids should be considered temporary and any data associated with them should be deleted once
the respective object is lost.
</description>
<arg name="id" type="string"/>
</event>
<event name="name">
<description summary="workspace name changed">
This event is emitted immediately after the ext_workspace_handle_v1 is
created and whenever the name of the workspace changes.
A name is meant to be human-readable and can be displayed to a user.
Unlike the id it is neither stable nor unique.
</description>
<arg name="name" type="string"/>
</event>
<event name="coordinates">
<description summary="workspace coordinates changed">
This event is used to organize workspaces into an N-dimensional grid
within a workspace group, and if supported, is emitted immediately after
the ext_workspace_handle_v1 is created and whenever the coordinates of
the workspace change. Compositors may not send this event if they do not
conceptually arrange workspaces in this way. If compositors simply
number workspaces, without any geometric interpretation, they may send
1D coordinates, which clients should not interpret as implying any
geometry. Sending an empty array means that the compositor no longer
orders the workspace geometrically.
Coordinates have an arbitrary number of dimensions N with an uint32
position along each dimension. By convention if N > 1, the first
dimension is X, the second Y, the third Z, and so on. The compositor may
chose to utilize these events for a more novel workspace layout
convention, however. No guarantee is made about the grid being filled or
bounded; there may be a workspace at coordinate 1 and another at
coordinate 1000 and none in between. Within a workspace group, however,
workspaces must have unique coordinates of equal dimensionality.
</description>
<arg name="coordinates" type="array"/>
</event>
<enum name="state" bitfield="true">
<description summary="types of states on the workspace">
The different states that a workspace can have.
</description>
<entry name="active" value="1" summary="the workspace is active"/>
<entry name="urgent" value="2" summary="the workspace requests attention"/>
<entry name="hidden" value="4">
<description summary="the workspace is not visible">
The workspace is not visible in its workspace group, and clients
attempting to visualize the compositor workspace state should not
display such workspaces.
</description>
</entry>
</enum>
<event name="state">
<description summary="the state of the workspace changed">
This event is emitted immediately after the ext_workspace_handle_v1 is
created and each time the workspace state changes, either because of a
compositor action or because of a request in this protocol.
Missing states convey the opposite meaning, e.g. an unset active bit
means the workspace is currently inactive.
</description>
<arg name="state" type="uint" enum="state"/>
</event>
<enum name="workspace_capabilities" bitfield="true">
<entry name="activate" value="1" summary="activate request is available"/>
<entry name="deactivate" value="2" summary="deactivate request is available"/>
<entry name="remove" value="4" summary="remove request is available"/>
<entry name="assign" value="8" summary="assign request is available"/>
</enum>
<event name="capabilities">
<description summary="compositor capabilities">
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for removing workspaces, a button
triggering the remove request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for remove will ignore
remove requests.
Compositors must send this event once after creation of an
ext_workspace_handle_v1 . When the capabilities change, compositors
must send this event again.
</description>
<arg name="capabilities" type="uint" summary="capabilities" enum="workspace_capabilities"/>
</event>
<event name="removed">
<description summary="this workspace has been removed">
This event is send when the workspace associated with the ext_workspace_handle_v1
has been removed. After sending this request, the compositor will immediately consider
the object inert. Any requests will be ignored except the destroy request.
It is guaranteed there won't be any more events referencing this
ext_workspace_handle_v1.
The compositor must only remove a workspaces not currently belonging to any
workspace_group.
</description>
</event>
<request name="destroy" type="destructor">
<description summary="destroy the ext_workspace_handle_v1 object">
Destroys the ext_workspace_handle_v1 object.
This request should be made either when the client does not want to
use the workspace object any more or after the remove event to finalize
the destruction of the object.
</description>
</request>
<request name="activate">
<description summary="activate the workspace">
Request that this workspace be activated.
There is no guarantee the workspace will be actually activated, and
behaviour may be compositor-dependent. For example, activating a
workspace may or may not deactivate all other workspaces in the same
group.
</description>
</request>
<request name="deactivate">
<description summary="deactivate the workspace">
Request that this workspace be deactivated.
There is no guarantee the workspace will be actually deactivated.
</description>
</request>
<request name="assign">
<description summary="assign workspace to group">
Requests that this workspace is assigned to the given workspace group.
There is no guarantee the workspace will be assigned.
</description>
<arg name="workspace_group" type="object" interface="ext_workspace_group_handle_v1"/>
</request>
<request name="remove">
<description summary="remove the workspace">
Request that this workspace be removed.
There is no guarantee the workspace will be actually removed.
</description>
</request>
</interface>
</protocol>

4
staging/fifo/README Normal file
View file

@ -0,0 +1,4 @@
Fifo Protocol
Maintainers:
Derek Foreman <derek.foreman@collabora.com> (@derekf)

143
staging/fifo/fifo-v1.xml Normal file
View file

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="fifo_v1">
<copyright>
Copyright © 2023 Valve Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_fifo_manager_v1" version="1">
<description summary="protocol for fifo constraints">
When a Wayland compositor considers applying a content update,
it must ensure all the update's readiness constraints (fences, etc)
are met.
This protocol provides a way to use the completion of a display refresh
cycle as an additional readiness constraint.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<enum name="error">
<description summary="fatal presentation error">
These fatal protocol errors may be emitted in response to
illegal requests.
</description>
<entry name="already_exists" value="0"
summary="fifo manager already exists for surface"/>
</enum>
<request name="destroy" type="destructor">
<description summary="unbind from the manager interface">
Informs the server that the client will no longer be using
this protocol object. Existing objects created by this object
are not affected.
</description>
</request>
<request name="get_fifo">
<description summary="request fifo interface for surface">
Establish a fifo object for a surface that may be used to add
display refresh constraints to content updates.
Only one such object may exist for a surface and attempting
to create more than one will result in an already_exists
protocol error. If a surface is acted on by multiple software
components, general best practice is that only the component
performing wl_surface.attach operations should use this protocol.
</description>
<arg name="id" type="new_id" interface="wp_fifo_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="wp_fifo_v1" version="1">
<description summary="fifo interface">
A fifo object for a surface that may be used to add
display refresh constraints to content updates.
</description>
<enum name="error">
<description summary="fatal error">
These fatal protocol errors may be emitted in response to
illegal requests.
</description>
<entry name="surface_destroyed" value="0"
summary="the associated surface no longer exists"/>
</enum>
<request name="set_barrier">
<description summary="sets the start point for a fifo constraint">
When the content update containing the "set_barrier" is applied,
it sets a "fifo_barrier" condition on the surface associated with
the fifo object. The condition is cleared immediately after the
following latching deadline for non-tearing presentation.
The compositor may clear the condition early if it must do so to
ensure client forward progress assumptions.
To wait for this condition to clear, use the "wait_barrier" request.
"set_barrier" is double-buffered state, see wl_surface.commit.
Requesting set_barrier after the fifo object's surface is
destroyed will generate a "surface_destroyed" error.
</description>
</request>
<request name="wait_barrier">
<description summary="adds a fifo constraint to a content update">
Indicate that this content update is not ready while a
"fifo_barrier" condition is present on the surface.
This means that when the content update containing "set_barrier"
was made active at a latching deadline, it will be active for
at least one refresh cycle. A content update which is allowed to
tear might become active after a latching deadline if no content
update became active at the deadline.
The constraint must be ignored if the surface is a subsurface in
synchronized mode. If the surface is not being updated by the
compositor (off-screen, occluded) the compositor may ignore the
constraint. Clients must use an additional mechanism such as
frame callbacks or timestamps to ensure throttling occurs under
all conditions.
"wait_barrier" is double-buffered state, see wl_surface.commit.
Requesting "wait_barrier" after the fifo object's surface is
destroyed will generate a "surface_destroyed" error.
</description>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the fifo interface">
Informs the server that the client will no longer be using
this protocol object.
Surface state changes previously made by this protocol are
unaffected by this object's destruction.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
wp fractional scale protocol
Maintainers:
Kenny Levinsen <kl@kl.wtf> (@kennylevinsen)

View file

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="fractional_scale_v1">
<copyright>
Copyright © 2022 Kenny Levinsen
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="Protocol for requesting fractional surface scales">
This protocol allows a compositor to suggest for surfaces to render at
fractional scales.
A client can submit scaled content by utilizing wp_viewport. This is done by
creating a wp_viewport object for the surface and setting the destination
rectangle to the surface size before the scale factor is applied.
The buffer size is calculated by multiplying the surface size by the
intended scale.
The wl_surface buffer scale should remain set to 1.
If a surface has a surface-local size of 100 px by 50 px and wishes to
submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should
be used and the wp_viewport destination rectangle should be 100 px by 50 px.
For toplevel surfaces, the size is rounded halfway away from zero. The
rounding algorithm for subsurface position and size is not defined.
</description>
<interface name="wp_fractional_scale_manager_v1" version="1">
<description summary="fractional surface scale information">
A global interface for requesting surfaces to use fractional scales.
</description>
<request name="destroy" type="destructor">
<description summary="unbind the fractional surface scale interface">
Informs the server that the client will not be using this protocol
object anymore. This does not affect any other objects,
wp_fractional_scale_v1 objects included.
</description>
</request>
<enum name="error">
<entry name="fractional_scale_exists" value="0"
summary="the surface already has a fractional_scale object associated"/>
</enum>
<request name="get_fractional_scale">
<description summary="extend surface interface for scale information">
Create an add-on object for the the wl_surface to let the compositor
request fractional scales. If the given wl_surface already has a
wp_fractional_scale_v1 object associated, the fractional_scale_exists
protocol error is raised.
</description>
<arg name="id" type="new_id" interface="wp_fractional_scale_v1"
summary="the new surface scale info interface id"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface"/>
</request>
</interface>
<interface name="wp_fractional_scale_v1" version="1">
<description summary="fractional scale interface to a wl_surface">
An additional interface to a wl_surface object which allows the compositor
to inform the client of the preferred scale.
</description>
<request name="destroy" type="destructor">
<description summary="remove surface scale information for surface">
Destroy the fractional scale object. When this object is destroyed,
preferred_scale events will no longer be sent.
</description>
</request>
<event name="preferred_scale">
<description summary="notify of new preferred scale">
Notification of a new preferred scale for this surface that the
compositor suggests that the client should use.
The sent scale is the numerator of a fraction with a denominator of 120.
</description>
<arg name="scale" type="uint" summary="the new preferred scale"/>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Linux DRM syncobj protocol
Maintainers:
Simon Ser <contact@emersion.fr> (@emersion)

View file

@ -0,0 +1,261 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="linux_drm_syncobj_v1">
<copyright>
Copyright 2016 The Chromium Authors.
Copyright 2017 Intel Corporation
Copyright 2018 Collabora, Ltd
Copyright 2021 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="protocol for providing explicit synchronization">
This protocol allows clients to request explicit synchronization for
buffers. It is tied to the Linux DRM synchronization object framework.
Synchronization refers to co-ordination of pipelined operations performed
on buffers. Most GPU clients will schedule an asynchronous operation to
render to the buffer, then immediately send the buffer to the compositor
to be attached to a surface.
With implicit synchronization, ensuring that the rendering operation is
complete before the compositor displays the buffer is an implementation
detail handled by either the kernel or userspace graphics driver.
By contrast, with explicit synchronization, DRM synchronization object
timeline points mark when the asynchronous operations are complete. When
submitting a buffer, the client provides a timeline point which will be
waited on before the compositor accesses the buffer, and another timeline
point that the compositor will signal when it no longer needs to access the
buffer contents for the purposes of the surface commit.
Linux DRM synchronization objects are documented at:
https://dri.freedesktop.org/docs/drm/gpu/drm-mm.html#drm-sync-objects
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="wp_linux_drm_syncobj_manager_v1" version="1">
<description summary="global for providing explicit synchronization">
This global is a factory interface, allowing clients to request
explicit synchronization for buffers on a per-surface basis.
See wp_linux_drm_syncobj_surface_v1 for more information.
</description>
<request name="destroy" type="destructor">
<description summary="destroy explicit synchronization factory object">
Destroy this explicit synchronization factory object. Other objects
shall not be affected by this request.
</description>
</request>
<enum name="error">
<entry name="surface_exists" value="0"
summary="the surface already has a synchronization object associated"/>
<entry name="invalid_timeline" value="1"
summary="the timeline object could not be imported"/>
</enum>
<request name="get_surface">
<description summary="extend surface interface for explicit synchronization">
Instantiate an interface extension for the given wl_surface to provide
explicit synchronization.
If the given wl_surface already has an explicit synchronization object
associated, the surface_exists protocol error is raised.
Graphics APIs, like EGL or Vulkan, that manage the buffer queue and
commits of a wl_surface themselves, are likely to be using this
extension internally. If a client is using such an API for a
wl_surface, it should not directly use this extension on that surface,
to avoid raising a surface_exists protocol error.
</description>
<arg name="id" type="new_id" interface="wp_linux_drm_syncobj_surface_v1"
summary="the new synchronization surface object id"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface"/>
</request>
<request name="import_timeline">
<description summary="import a DRM syncobj timeline">
Import a DRM synchronization object timeline.
If the FD cannot be imported, the invalid_timeline error is raised.
</description>
<arg name="id" type="new_id" interface="wp_linux_drm_syncobj_timeline_v1"/>
<arg name="fd" type="fd" summary="drm_syncobj file descriptor"/>
</request>
</interface>
<interface name="wp_linux_drm_syncobj_timeline_v1" version="1">
<description summary="synchronization object timeline">
This object represents an explicit synchronization object timeline
imported by the client to the compositor.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the timeline">
Destroy the synchronization object timeline. Other objects are not
affected by this request, in particular timeline points set by
set_acquire_point and set_release_point are not unset.
</description>
</request>
</interface>
<interface name="wp_linux_drm_syncobj_surface_v1" version="1">
<description summary="per-surface explicit synchronization">
This object is an add-on interface for wl_surface to enable explicit
synchronization.
Each surface can be associated with only one object of this interface at
any time.
Explicit synchronization is guaranteed to be supported for buffers
created with any version of the linux-dmabuf protocol. Compositors are
free to support explicit synchronization for additional buffer types.
If at surface commit time the attached buffer does not support explicit
synchronization, an unsupported_buffer error is raised.
As long as the wp_linux_drm_syncobj_surface_v1 object is alive, the
compositor may ignore implicit synchronization for buffers attached and
committed to the wl_surface. The delivery of wl_buffer.release events
for buffers attached to the surface becomes undefined.
Clients must set both acquire and release points if and only if a
non-null buffer is attached in the same surface commit. See the
no_buffer, no_acquire_point and no_release_point protocol errors.
If at surface commit time the acquire and release DRM syncobj timelines
are identical, the acquire point value must be strictly less than the
release point value, or else the conflicting_points protocol error is
raised.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the surface synchronization object">
Destroy this surface synchronization object.
Any timeline point set by this object with set_acquire_point or
set_release_point since the last commit may be discarded by the
compositor. Any timeline point set by this object before the last
commit will not be affected.
</description>
</request>
<enum name="error">
<entry name="no_surface" value="1"
summary="the associated wl_surface was destroyed"/>
<entry name="unsupported_buffer" value="2"
summary="the buffer does not support explicit synchronization"/>
<entry name="no_buffer" value="3" summary="no buffer was attached"/>
<entry name="no_acquire_point" value="4"
summary="no acquire timeline point was set"/>
<entry name="no_release_point" value="5"
summary="no release timeline point was set"/>
<entry name="conflicting_points" value="6"
summary="acquire and release timeline points are in conflict"/>
</enum>
<request name="set_acquire_point">
<description summary="set the acquire timeline point">
Set the timeline point that must be signalled before the compositor may
sample from the buffer attached with wl_surface.attach.
The 64-bit unsigned value combined from point_hi and point_lo is the
point value.
The acquire point is double-buffered state, and will be applied on the
next wl_surface.commit request for the associated surface. Thus, it
applies only to the buffer that is attached to the surface at commit
time.
If an acquire point has already been attached during the same commit
cycle, the new point replaces the old one.
If the associated wl_surface was destroyed, a no_surface error is
raised.
If at surface commit time there is a pending acquire timeline point set
but no pending buffer attached, a no_buffer error is raised. If at
surface commit time there is a pending buffer attached but no pending
acquire timeline point set, the no_acquire_point protocol error is
raised.
</description>
<arg name="timeline" type="object" interface="wp_linux_drm_syncobj_timeline_v1"/>
<arg name="point_hi" type="uint" summary="high 32 bits of the point value"/>
<arg name="point_lo" type="uint" summary="low 32 bits of the point value"/>
</request>
<request name="set_release_point">
<description summary="set the release timeline point">
Set the timeline point that must be signalled by the compositor when it
has finished its usage of the buffer attached with wl_surface.attach
for the relevant commit.
Once the timeline point is signaled, and assuming the associated buffer
is not pending release from other wl_surface.commit requests, no
additional explicit or implicit synchronization with the compositor is
required to safely re-use the buffer.
Note that clients cannot rely on the release point being always
signaled after the acquire point: compositors may release buffers
without ever reading from them. In addition, the compositor may use
different presentation paths for different commits, which may have
different release behavior. As a result, the compositor may signal the
release points in a different order than the client committed them.
Because signaling a timeline point also signals every previous point,
it is generally not safe to use the same timeline object for the
release points of multiple buffers. The out-of-order signaling
described above may lead to a release point being signaled before the
compositor has finished reading. To avoid this, it is strongly
recommended that each buffer should use a separate timeline for its
release points.
The 64-bit unsigned value combined from point_hi and point_lo is the
point value.
The release point is double-buffered state, and will be applied on the
next wl_surface.commit request for the associated surface. Thus, it
applies only to the buffer that is attached to the surface at commit
time.
If a release point has already been attached during the same commit
cycle, the new point replaces the old one.
If the associated wl_surface was destroyed, a no_surface error is
raised.
If at surface commit time there is a pending release timeline point set
but no pending buffer attached, a no_buffer error is raised. If at
surface commit time there is a pending buffer attached but no pending
release timeline point set, the no_release_point protocol error is
raised.
</description>
<arg name="timeline" type="object" interface="wp_linux_drm_syncobj_timeline_v1"/>
<arg name="point_hi" type="uint" summary="high 32 bits of the point value"/>
<arg name="point_lo" type="uint" summary="low 32 bits of the point value"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,7 @@
pointer-warp protocol
Maintainers:
Neal Gompa <neal@gompa.dev> (@Conan_Kudo)
Xaver Hugl <xaver.hugl@kde.org> (@Zamundaaa)
Matthias Klumpp <matthias@tenstral.net> (@mak)
Vlad Zahorodnii <vlad.zahorodnii@kde.org> (@zzag)

View file

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="pointer_warp_v1">
<copyright>
Copyright © 2024 Neal Gompa
Copyright © 2024 Xaver Hugl
Copyright © 2024 Matthias Klumpp
Copyright © 2024 Vlad Zahorodnii
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_pointer_warp_v1" version="1">
<description summary="reposition the pointer to a location on a surface">
This global interface allows applications to request the pointer to be
moved to a position relative to a wl_surface.
Note that if the desired behavior is to constrain the pointer to an area
or lock it to a position, this protocol does not provide a reliable way
to do that. The pointer constraint and pointer lock protocols should be
used for those use cases instead.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the warp manager">
Destroy the pointer warp manager.
</description>
</request>
<request name="warp_pointer">
<description summary="reposition the pointer">
Request the compositor to move the pointer to a surface-local position.
Whether or not the compositor honors the request is implementation defined,
but it should
- honor it if the surface has pointer focus, including
when it has an implicit pointer grab
- reject it if the enter serial is incorrect
- reject it if the requested position is outside of the surface
Note that the enter serial is valid for any surface of the client,
and does not have to be from the surface the pointer is warped to.
</description>
<arg name="surface" type="object" interface="wl_surface"
summary="surface to position the pointer on"/>
<arg name="pointer" type="object" interface="wl_pointer"
summary="the pointer that should be repositioned"/>
<arg name="x" type="fixed"/>
<arg name="y" type="fixed"/>
<arg name="serial" type="uint" summary="serial number of the enter event"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
security_context protocol
Maintainers:
Simon Ser <contact@emersion.fr> (@emersion)

View file

@ -0,0 +1,18 @@
# security-context-v1 engines
This document describes how some specific engine implementations populate the
metadata in security-context-v1 and provide further metadata with out of band
mechanisms.
## [Flatpak]
* `sandbox_engine` is always set to `org.flatpak`.
* `app_id` is the Flatpak application ID (in reverse-DNS style). It is always
set.
* `instance_id` is the Flatpak instance ID of the running sandbox. It is always
set.
More metadata is stored in `$XDG_RUNTIME_DIR/.flatpak/$instance_id/info`. This
file will be readable when `wp_security_context_v1.commit` is called.
[Flatpak]: https://flatpak.org/

View file

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="security_context_v1">
<copyright>
Copyright © 2021 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_security_context_manager_v1" version="1">
<description summary="client security context manager">
This interface allows a client to register a new Wayland connection to
the compositor and attach a security context to it.
This is intended to be used by sandboxes. Sandbox engines attach a
security context to all connections coming from inside the sandbox. The
compositor can then restrict the features that the sandboxed connections
can use.
Compositors should forbid nesting multiple security contexts by not
exposing wp_security_context_manager_v1 global to clients with a security
context attached, or by sending the nested protocol error. Nested
security contexts are dangerous because they can potentially allow
privilege escalation of a sandboxed client.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<enum name="error">
<entry name="invalid_listen_fd" value="1"
summary="listening socket FD is invalid"/>
<entry name="nested" value="2"
summary="nested security contexts are forbidden"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the manager object">
Destroy the manager. This doesn't destroy objects created with the
manager.
</description>
</request>
<request name="create_listener">
<description summary="create a new security context">
Creates a new security context with a socket listening FD.
The compositor will accept new client connections on listen_fd.
listen_fd must be ready to accept new connections when this request is
sent by the client. In other words, the client must call bind(2) and
listen(2) before sending the FD.
close_fd is a FD that will signal hangup when the compositor should stop
accepting new connections on listen_fd.
The compositor must continue to accept connections on listen_fd when
the Wayland client which created the security context disconnects.
After sending this request, closing listen_fd and close_fd remains the
only valid operation on them.
</description>
<arg name="id" type="new_id" interface="wp_security_context_v1"/>
<arg name="listen_fd" type="fd" summary="listening socket FD"/>
<arg name="close_fd" type="fd" summary="FD signaling when done"/>
</request>
</interface>
<interface name="wp_security_context_v1" version="1">
<description summary="client security context">
The security context allows a client to register a new client and attach
security context metadata to the connections.
When both are set, the combination of the application ID and the sandbox
engine must uniquely identify an application. The same application ID
will be used across instances (e.g. if the application is restarted, or
if the application is started multiple times).
When both are set, the combination of the instance ID and the sandbox
engine must uniquely identify a running instance of an application.
</description>
<enum name="error">
<entry name="already_used" value="1"
summary="security context has already been committed"/>
<entry name="already_set" value="2"
summary="metadata has already been set"/>
<entry name="invalid_metadata" value="3"
summary="metadata is invalid"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the security context object">
Destroy the security context object.
</description>
</request>
<request name="set_sandbox_engine">
<description summary="set the sandbox engine">
Attach a unique sandbox engine name to the security context. The name
should follow the reverse-DNS style (e.g. "org.flatpak").
A list of well-known engines is maintained at:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
It is a protocol error to call this request twice. The already_set
error is sent in this case.
</description>
<arg name="name" type="string" summary="the sandbox engine name"/>
</request>
<request name="set_app_id">
<description summary="set the application ID">
Attach an application ID to the security context.
The application ID is an opaque, sandbox-specific identifier for an
application. See the well-known engines document for more details:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
The compositor may use the application ID to group clients belonging to
the same security context application.
Whether this request is optional or not depends on the sandbox engine used.
It is a protocol error to call this request twice. The already_set
error is sent in this case.
</description>
<arg name="app_id" type="string" summary="the application ID"/>
</request>
<request name="set_instance_id">
<description summary="set the instance ID">
Attach an instance ID to the security context.
The instance ID is an opaque, sandbox-specific identifier for a running
instance of an application. See the well-known engines document for
more details:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
Whether this request is optional or not depends on the sandbox engine used.
It is a protocol error to call this request twice. The already_set
error is sent in this case.
</description>
<arg name="instance_id" type="string" summary="the instance ID"/>
</request>
<request name="commit">
<description summary="register the security context">
Atomically register the new client and attach the security context
metadata.
If the provided metadata is inconsistent or does not match with out of
band metadata (see
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md),
the invalid_metadata error may be sent eventually.
It's a protocol error to send any request other than "destroy" after
this request. In this case, the already_used error is sent.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Single-pixel buffer protocol
Maintainers:
Simon Ser <contact@emersion.fr> (@emersion)

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="single_pixel_buffer_v1">
<copyright>
Copyright © 2022 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="single pixel buffer factory">
This protocol extension allows clients to create single-pixel buffers.
Compositors supporting this protocol extension should also support the
viewporter protocol extension. Clients may use viewporter to scale a
single-pixel buffer to a desired size.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="wp_single_pixel_buffer_manager_v1" version="1">
<description summary="global factory for single-pixel buffers">
The wp_single_pixel_buffer_manager_v1 interface is a factory for
single-pixel buffers.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
Destroy the wp_single_pixel_buffer_manager_v1 object.
The child objects created via this interface are unaffected.
</description>
</request>
<request name="create_u32_rgba_buffer">
<description summary="create a 1×1 buffer from 32-bit RGBA values">
Create a single-pixel buffer from four 32-bit RGBA values.
Unless specified in another protocol extension, the RGBA values use
pre-multiplied alpha.
The width and height of the buffer are 1.
The r, g, b and a arguments valid range is from UINT32_MIN (0)
to UINT32_MAX (0xffffffff).
These arguments should be interpreted as a percentage, i.e.
- UINT32_MIN = 0% of the given color component
- UINT32_MAX = 100% of the given color component
</description>
<arg name="id" type="new_id" interface="wl_buffer"/>
<arg name="r" type="uint" summary="value of the buffer's red channel"/>
<arg name="g" type="uint" summary="value of the buffer's green channel"/>
<arg name="b" type="uint" summary="value of the buffer's blue channel"/>
<arg name="a" type="uint" summary="value of the buffer's alpha channel"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Tearing control protocol
Maintainers:
Xaver Hugl <xaver.hugl@gmail.com> (@Zamundaaa)

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="tearing_control_v1">
<copyright>
Copyright © 2021 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_tearing_control_manager_v1" version="1">
<description summary="protocol for tearing control">
For some use cases like games or drawing tablets it can make sense to
reduce latency by accepting tearing with the use of asynchronous page
flips. This global is a factory interface, allowing clients to inform
which type of presentation the content of their surfaces is suitable for.
Graphics APIs like EGL or Vulkan, that manage the buffer queue and commits
of a wl_surface themselves, are likely to be using this extension
internally. If a client is using such an API for a wl_surface, it should
not directly use this extension on that surface, to avoid raising a
tearing_control_exists protocol error.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy tearing control factory object">
Destroy this tearing control factory object. Other objects, including
wp_tearing_control_v1 objects created by this factory, are not affected
by this request.
</description>
</request>
<enum name="error">
<entry name="tearing_control_exists" value="0"
summary="the surface already has a tearing object associated"/>
</enum>
<request name="get_tearing_control">
<description summary="extend surface interface for tearing control">
Instantiate an interface extension for the given wl_surface to request
asynchronous page flips for presentation.
If the given wl_surface already has a wp_tearing_control_v1 object
associated, the tearing_control_exists protocol error is raised.
</description>
<arg name="id" type="new_id" interface="wp_tearing_control_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="wp_tearing_control_v1" version="1">
<description summary="per-surface tearing control interface">
An additional interface to a wl_surface object, which allows the client
to hint to the compositor if the content on the surface is suitable for
presentation with tearing.
The default presentation hint is vsync. See presentation_hint for more
details.
If the associated wl_surface is destroyed, this object becomes inert and
should be destroyed.
</description>
<enum name="presentation_hint">
<description summary="presentation hint values">
This enum provides information for if submitted frames from the client
may be presented with tearing.
</description>
<entry name="vsync" value="0">
<description summary="tearing-free presentation">
The content of this surface is meant to be synchronized to the
vertical blanking period. This should not result in visible tearing
and may result in a delay before a surface commit is presented.
</description>
</entry>
<entry name="async" value="1">
<description summary="asynchronous presentation">
The content of this surface is meant to be presented with minimal
latency and tearing is acceptable.
</description>
</entry>
</enum>
<request name="set_presentation_hint">
<description summary="set presentation hint">
Set the presentation hint for the associated wl_surface. This state is
double-buffered, see wl_surface.commit.
The compositor is free to dynamically respect or ignore this hint based
on various conditions like hardware capabilities, surface state and
user preferences.
</description>
<arg name="hint" type="uint" enum="presentation_hint"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy tearing control object">
Destroy this surface tearing object and revert the presentation hint to
vsync. The change will be applied on the next wl_surface.commit.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
XDG Activation protocol
Maintainers:
Aleix Pol Gonzalez <aleixpol@kde.org> (@apol)

View file

@ -0,0 +1,63 @@
Interoperation with X11
=======================
*This document is non-normative.*
The former
`X11 Startup notification protocol <https://cgit.freedesktop.org/startup-notification/tree/doc/startup-notification.txt>`_
defines the use of the ``DESKTOP_STARTUP_ID`` environment variable to propagate
startup sequences ("activation tokens" in this protocol) between launcher and
launchee.
These startup sequence IDs are defined as a globally unique string with a
``[unique]_TIME[timestamp]`` format, where the ID as a whole is used for startup
notification and the timestamp is used for focus requests and focus stealing
prevention.
In order to observe mixed usage scenarios where Wayland and X11 clients might
be launching each other, it is possible for a compositor to manage a shared
pool of activation tokens.
Scenario 1. Wayland client spawns X11 client
--------------------------------------------
1. Wayland client requests token.
2. Wayland client spawns X11 client, sets ``$DESKTOP_STARTUP_ID`` in its
environment with the token string.
3. X11 client starts.
4. X11 client sends startup-notification ``remove`` message with the activation
``$DESKTOP_STARTUP_ID`` content.
5. Compositor receives startup notification message, matches ID with
the common pool.
6. The startup feedback is finished.
7. X11 client requests focus.
8. Compositor applies internal policies to allow/deny focus switch.
Scenario 2. X11 client spawns Wayland client
--------------------------------------------
1. X11 client builds a "globally unique" ID
2. X11 client sends startup-notification ``new`` message with the ID.
3. Compositor receives startup notification message, adds the ID to
the common pool.
4. X11 client spawns Wayland client, sets ``$DESKTOP_STARTUP_ID`` in its
environment.
5. Wayland client starts.
6. Wayland client requests surface activation with the activation token,
as received from ``$DESKTOP_STARTUP_ID``.
7. Compositor receives the request, matches ID with the common pool
8. The startup feedback is finished.
9. Compositor applies internal policies to allow/deny focus switch.
Caveats
-------
- For legacy reasons, the usage of ``$DESKTOP_STARTUP_ID`` (even if as a
fallback) should be observed in compositors and clients that are
concerned with X11 interoperation.
- Depending on the X11 startup-notification implementation in use by the
compositor, the usage of the ``_TIME[timestamp]`` suffix may be mandatory
for its correct behavior in the first scenario, the startup-notification
reference library is one such implementation. Compositors may work
this around by adding a matching suffix to the generated activation tokens.

View file

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_activation_v1">
<copyright>
Copyright © 2020 Aleix Pol Gonzalez &lt;aleixpol@kde.org&gt;
Copyright © 2020 Carlos Garnacho &lt;carlosg@gnome.org&gt;
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="Protocol for requesting activation of surfaces">
The way for a client to pass focus to another toplevel is as follows.
The client that intends to activate another toplevel uses the
xdg_activation_v1.get_activation_token request to get an activation token.
This token is then forwarded to the client, which is supposed to activate
one of its surfaces, through a separate band of communication.
One established way of doing this is through the XDG_ACTIVATION_TOKEN
environment variable of a newly launched child process. The child process
should unset the environment variable again right after reading it out in
order to avoid propagating it to other child processes.
Another established way exists for Applications implementing the D-Bus
interface org.freedesktop.Application, which should get their token under
activation-token on their platform_data.
In general activation tokens may be transferred across clients through
means not described in this protocol.
The client to be activated will then pass the token
it received to the xdg_activation_v1.activate request. The compositor can
then use this token to decide how to react to the activation request.
The token the activating client gets may be ineffective either already at
the time it receives it, for example if it was not focused, for focus
stealing prevention. The activating client will have no way to discover
the validity of the token, and may still forward it to the to be activated
client.
The created activation token may optionally get information attached to it
that can be used by the compositor to identify the application that we
intend to activate. This can for example be used to display a visual hint
about what application is being started.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="xdg_activation_v1" version="1">
<description summary="interface for activating surfaces">
A global interface used for informing the compositor about applications
being activated or started, or for applications to request to be
activated.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the xdg_activation object">
Notify the compositor that the xdg_activation object will no longer be
used.
The child objects created via this interface are unaffected and should
be destroyed separately.
</description>
</request>
<request name="get_activation_token">
<description summary="requests a token">
Creates an xdg_activation_token_v1 object that will provide
the initiating client with a unique token for this activation. This
token should be offered to the clients to be activated.
</description>
<arg name="id" type="new_id" interface="xdg_activation_token_v1"/>
</request>
<request name="activate">
<description summary="notify new interaction being available">
Requests surface activation. It's up to the compositor to display
this information as desired, for example by placing the surface above
the rest.
The compositor may know who requested this by checking the activation
token and might decide not to follow through with the activation if it's
considered unwanted.
Compositors can ignore unknown activation tokens when an invalid
token is passed.
</description>
<arg name="token" type="string" summary="the activation token of the initiating client"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the wl_surface to activate"/>
</request>
</interface>
<interface name="xdg_activation_token_v1" version="1">
<description summary="an exported activation handle">
An object for setting up a token and receiving a token handle that can
be passed as an activation token to another client.
The object is created using the xdg_activation_v1.get_activation_token
request. This object should then be populated with the app_id, surface
and serial information and committed. The compositor shall then issue a
done event with the token. In case the request's parameters are invalid,
the compositor will provide an invalid token.
</description>
<enum name="error">
<entry name="already_used" value="0"
summary="The token has already been used previously"/>
</enum>
<request name="set_serial">
<description summary="specifies the seat and serial of the activating event">
Provides information about the seat and serial event that requested the
token.
The serial can come from an input or focus event. For instance, if a
click triggers the launch of a third-party client, the launcher client
should send a set_serial request with the serial and seat from the
wl_pointer.button event.
Some compositors might refuse to activate toplevels when the token
doesn't have a valid and recent enough event serial.
Must be sent before commit. This information is optional.
</description>
<arg name="serial" type="uint"
summary="the serial of the event that triggered the activation"/>
<arg name="seat" type="object" interface="wl_seat"
summary="the wl_seat of the event"/>
</request>
<request name="set_app_id">
<description summary="specifies the application being activated">
The requesting client can specify an app_id to associate the token
being created with it.
Must be sent before commit. This information is optional.
</description>
<arg name="app_id" type="string"
summary="the application id of the client being activated."/>
</request>
<request name="set_surface">
<description summary="specifies the surface requesting activation">
This request sets the surface requesting the activation. Note, this is
different from the surface that will be activated.
Some compositors might refuse to activate toplevels when the token
doesn't have a requesting surface.
Must be sent before commit. This information is optional.
</description>
<arg name="surface" type="object" interface="wl_surface"
summary="the requesting surface"/>
</request>
<request name="commit">
<description summary="issues the token request">
Requests an activation token based on the different parameters that
have been offered through set_serial, set_surface and set_app_id.
</description>
</request>
<event name="done">
<description summary="the exported activation token">
The 'done' event contains the unique token of this activation request
and notifies that the provider is done.
</description>
<arg name="token" type="string" summary="the exported activation token"/>
</event>
<request name="destroy" type="destructor">
<description summary="destroy the xdg_activation_token_v1 object">
Notify the compositor that the xdg_activation_token_v1 object will no
longer be used. The received token stays valid.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,5 @@
Dialog windows
Maintainers:
Carlos Garnacho <carlosg@gnome.org> (@carlosg)
Jonas Ådahl <jadahl@gmail.com> (@jadahl)

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_dialog_v1">
<copyright>
Copyright © 2023 Carlos Garnacho
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="xdg_wm_dialog_v1" version="1">
<description summary="create dialogs related to other toplevels">
The xdg_wm_dialog_v1 interface is exposed as a global object allowing
to register surfaces with a xdg_toplevel role as "dialogs" relative to
another toplevel.
The compositor may let this relation influence how the surface is
placed, displayed or interacted with.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<enum name="error">
<entry name="already_used" value="0"
summary="the xdg_toplevel object has already been used to create a xdg_dialog_v1"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the dialog manager object">
Destroys the xdg_wm_dialog_v1 object. This does not affect
the xdg_dialog_v1 objects generated through it.
</description>
</request>
<request name="get_xdg_dialog">
<description summary="create a dialog object">
Creates a xdg_dialog_v1 object for the given toplevel. See the interface
description for more details.
Compositors must raise an already_used error if clients attempt to
create multiple xdg_dialog_v1 objects for the same xdg_toplevel.
</description>
<arg name="id" type="new_id" interface="xdg_dialog_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
</request>
</interface>
<interface name="xdg_dialog_v1" version="1">
<description summary="dialog object">
A xdg_dialog_v1 object is an ancillary object tied to a xdg_toplevel. Its
purpose is hinting the compositor that the toplevel is a "dialog" (e.g. a
temporary window) relative to another toplevel (see
xdg_toplevel.set_parent). If the xdg_toplevel is destroyed, the xdg_dialog_v1
becomes inert.
Through this object, the client may provide additional hints about
the purpose of the secondary toplevel. This interface has no effect
on toplevels that are not attached to a parent toplevel.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the dialog object">
Destroys the xdg_dialog_v1 object. If this object is destroyed
before the related xdg_toplevel, the compositor should unapply its
effects.
</description>
</request>
<request name="set_modal">
<description summary="mark dialog as modal">
Hints that the dialog has "modal" behavior. Modal dialogs typically
require to be fully addressed by the user (i.e. closed) before resuming
interaction with the parent toplevel, and may require a distinct
presentation.
Clients must implement the logic to filter events in the parent
toplevel on their own.
Compositors may choose any policy in event delivery to the parent
toplevel, from delivering all events unfiltered to using them for
internal consumption.
</description>
</request>
<request name="unset_modal">
<description summary="mark dialog as not modal">
Drops the hint that this dialog has "modal" behavior. See
xdg_dialog_v1.set_modal for more details.
</description>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,5 @@
system_bell protocol
Maintainers:
Jonas Ådahl <jadahl@gmail.com>
Carlos Garnacho <carlosg@gnome.org>

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_system_bell_v1">
<copyright>
Copyright © 2016, 2023 Red Hat
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="xdg_system_bell_v1" version="1">
<description summary="system bell">
This global interface enables clients to ring the system bell.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the system bell object">
Notify that the object will no longer be used.
</description>
</request>
<request name="ring">
<description summary="ring the system bell">
This requests rings the system bell on behalf of a client. How ringing
the bell is implemented is up to the compositor. It may be an audible
sound, a visual feedback of some kind, or any other thing including
nothing.
The passed surface should correspond to a toplevel like surface role,
or be null, meaning the client doesn't have a particular toplevel it
wants to associate the bell ringing with. See the xdg-shell protocol
extension for a toplevel like surface role.
</description>
<arg name="surface" type="object" interface="wl_surface"
allow-null="true" summary="associated surface"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,5 @@
xdg toplevel drag protocol
Maintainers:
David Redondo <kde@david-redondo.de> (@davidre)
Nick Yamane <nickdiego@igalia.com> (@nickdiego)

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_toplevel_drag_v1">
<copyright>
Copyright 2023 David Redondo
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="xdg_toplevel_drag_manager_v1" version="1">
<description summary="Move a window during a drag">
This protocol enhances normal drag and drop with the ability to move a
window at the same time. This allows having detachable parts of a window
that when dragged out of it become a new window and can be dragged over
an existing window to be reattached.
A typical workflow would be when the user starts dragging on top of a
detachable part of a window, the client would create a wl_data_source and
a xdg_toplevel_drag_v1 object and start the drag as normal via
wl_data_device.start_drag. Once the client determines that the detachable
window contents should be detached from the originating window, it creates
a new xdg_toplevel with these contents and issues a
xdg_toplevel_drag_v1.attach request before mapping it. From now on the new
window is moved by the compositor during the drag as if the client called
xdg_toplevel.move.
Dragging an existing window is similar. The client creates a
xdg_toplevel_drag_v1 object and attaches the existing toplevel before
starting the drag.
Clients use the existing drag and drop mechanism to detect when a window
can be docked or undocked. If the client wants to snap a window into a
parent window it should delete or unmap the dragged top-level. If the
contents should be detached again it attaches a new toplevel as described
above. If a drag operation is cancelled without being dropped, clients
should revert to the previous state, deleting any newly created windows
as appropriate. When a drag operation ends as indicated by
wl_data_source.dnd_drop_performed the dragged toplevel window's final
position is determined as if a xdg_toplevel_move operation ended.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<enum name="error">
<entry name="invalid_source" value="0"
summary="data_source already used for toplevel drag"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the xdg_toplevel_drag_manager_v1 object">
Destroy this xdg_toplevel_drag_manager_v1 object. Other objects,
including xdg_toplevel_drag_v1 objects created by this factory, are not
affected by this request.
</description>
</request>
<request name="get_xdg_toplevel_drag">
<description summary="get an xdg_toplevel_drag for a wl_data_source">
Create an xdg_toplevel_drag for a drag and drop operation that is going
to be started with data_source.
This request can only be made on sources used in drag-and-drop, so it
must be performed before wl_data_device.start_drag. Attempting to use
the source other than for drag-and-drop such as in
wl_data_device.set_selection will raise an invalid_source error.
Destroying data_source while a toplevel is attached to the
xdg_toplevel_drag is undefined.
</description>
<arg name="id" type="new_id" interface="xdg_toplevel_drag_v1"/>
<arg name="data_source" type="object" interface="wl_data_source"/>
</request>
</interface>
<interface name="xdg_toplevel_drag_v1" version="1">
<description summary="Object representing a toplevel move during a drag">
</description>
<enum name="error">
<entry name="toplevel_attached" value="0"
summary="valid toplevel already attached"/>
<entry name="ongoing_drag" value="1"
summary="drag has not ended" />
</enum>
<request name="destroy" type="destructor">
<description summary="destroy an xdg_toplevel_drag_v1 object">
Destroy this xdg_toplevel_drag_v1 object. This request must only be
called after the underlying wl_data_source drag has ended, as indicated
by the dnd_drop_performed or cancelled events. In any other case an
ongoing_drag error is raised.
</description>
</request>
<request name="attach">
<description summary="Move a toplevel with the drag operation">
Request that the window will be moved with the cursor during the drag
operation. The offset is a hint to the compositor how the toplevel
should be positioned relative to the cursor hotspot in surface local
coordinates and relative to the geometry of the toplevel being attached.
See xdg_surface.set_window_geometry. For example it might only
be used when an unmapped window is attached. The attached window
does not participate in the selection of the drag target.
If the toplevel is unmapped while it is attached, it is automatically
detached from the drag. In this case this request has to be called again
if the window should be attached after it is remapped.
This request can be called multiple times but issuing it while a
toplevel with an active role is attached raises a toplevel_attached
error.
</description>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
<arg name="x_offset" type="int" summary="dragged surface x offset"/>
<arg name="y_offset" type="int" summary="dragged surface y offset"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
xdg_toplevel_icon protocol
Maintainers:
Matthias Klumpp <matthias@tenstral.net> (@mak)

View file

@ -0,0 +1,205 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_toplevel_icon_v1">
<copyright>
Copyright © 2023-2024 Matthias Klumpp
Copyright © 2024 David Edmundson
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="protocol to assign icons to toplevels">
This protocol allows clients to set icons for their toplevel surfaces
either via the XDG icon stock (using an icon name), or from pixel data.
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.
This document adheres to RFC 2119 when using words like "must",
"should", "may", etc.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="xdg_toplevel_icon_manager_v1" version="1">
<description summary="interface to manage toplevel icons">
This interface allows clients to create toplevel window icons and set
them on toplevel windows to be displayed to the user.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the toplevel icon manager">
Destroy the toplevel icon manager.
This does not destroy objects created with the manager.
</description>
</request>
<request name="create_icon">
<description summary="create a new icon instance">
Creates a new icon object. This icon can then be attached to a
xdg_toplevel via the 'set_icon' request.
</description>
<arg name="id" type="new_id" interface="xdg_toplevel_icon_v1"/>
</request>
<request name="set_icon">
<description summary="set an icon on a toplevel window">
This request assigns the icon 'icon' to 'toplevel', or clears the
toplevel icon if 'icon' was null.
This state is double-buffered and is applied on the next
wl_surface.commit of the toplevel.
After making this call, the xdg_toplevel_icon_v1 provided as 'icon'
can be destroyed by the client without 'toplevel' losing its icon.
The xdg_toplevel_icon_v1 is immutable from this point, and any
future attempts to change it must raise the
'xdg_toplevel_icon_v1.immutable' protocol error.
The compositor must set the toplevel icon from either the pixel data
the icon provides, or by loading a stock icon using the icon name.
See the description of 'xdg_toplevel_icon_v1' for details.
If 'icon' is set to null, the icon of the respective toplevel is reset
to its default icon (usually the icon of the application, derived from
its desktop-entry file, or a placeholder icon).
If this request is passed an icon with no pixel buffers or icon name
assigned, the icon must be reset just like if 'icon' was null.
</description>
<arg name="toplevel" type="object" interface="xdg_toplevel" summary="the toplevel to act on"/>
<arg name="icon" type="object" interface="xdg_toplevel_icon_v1" allow-null="true"/>
</request>
<event name="icon_size">
<description summary="describes a supported &amp; preferred icon size">
This event indicates an icon size the compositor prefers to be
available if the client has scalable icons and can render to any size.
When the 'xdg_toplevel_icon_manager_v1' object is created, the
compositor may send one or more 'icon_size' events to describe the list
of preferred icon sizes. If the compositor has no size preference, it
may not send any 'icon_size' event, and it is up to the client to
decide a suitable icon size.
A sequence of 'icon_size' events must be finished with a 'done' event.
If the compositor has no size preferences, it must still send the
'done' event, without any preceding 'icon_size' events.
</description>
<arg name="size" type="int"
summary="the edge size of the square icon in surface-local coordinates, e.g. 64"/>
</event>
<event name="done">
<description summary="all information has been sent">
This event is sent after all 'icon_size' events have been sent.
</description>
</event>
</interface>
<interface name="xdg_toplevel_icon_v1" version="1">
<description summary="a toplevel window icon">
This interface defines a toplevel icon.
An icon can have a name, and multiple buffers.
In order to be applied, the icon must have either a name, or at least
one buffer assigned. Applying an empty icon (with no buffer or name) to
a toplevel should reset its icon to the default icon.
It is up to compositor policy whether to prefer using a buffer or loading
an icon via its name. See 'set_name' and 'add_buffer' for details.
</description>
<enum name="error">
<entry name="invalid_buffer"
summary="the provided buffer does not satisfy requirements"
value="1"/>
<entry name="immutable"
summary="the icon has already been assigned to a toplevel and must not be changed"
value="2"/>
<entry name="no_buffer"
summary="the provided buffer has been destroyed before the toplevel icon"
value="3"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the icon object">
Destroys the 'xdg_toplevel_icon_v1' object.
The icon must still remain set on every toplevel it was assigned to,
until the toplevel icon is reset explicitly.
</description>
</request>
<request name="set_name">
<description summary="set an icon name">
This request assigns an icon name to this icon.
Any previously set name is overridden.
The compositor must resolve 'icon_name' according to the lookup rules
described in the XDG icon theme specification[1] using the
environment's current icon theme.
If the compositor does not support icon names or cannot resolve
'icon_name' according to the XDG icon theme specification it must
fall back to using pixel buffer data instead.
If this request is made after the icon has been assigned to a toplevel
via 'set_icon', a 'immutable' error must be raised.
[1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
</description>
<arg name="icon_name" type="string"/>
</request>
<request name="add_buffer">
<description summary="add icon data from a pixel buffer">
This request adds pixel data supplied as wl_buffer to the icon.
The client should add pixel data for all icon sizes and scales that
it can provide, or which are explicitly requested by the compositor
via 'icon_size' events on xdg_toplevel_icon_manager_v1.
The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm
and must be a square (width and height being equal).
If any of these buffer requirements are not fulfilled, a 'invalid_buffer'
error must be raised.
If this icon instance already has a buffer of the same size and scale
from a previous 'add_buffer' request, data from the last request
overrides the preexisting pixel data.
The wl_buffer must be kept alive for as long as the xdg_toplevel_icon
it is associated with is not destroyed, otherwise a 'no_buffer' error
is raised. The buffer contents must not be modified after it was
assigned to the icon. As a result, the region of the wl_shm_pool's
backing storage used for the wl_buffer must not be modified after this
request is sent. The wl_buffer.release event is unused.
If this request is made after the icon has been assigned to a toplevel
via 'set_icon', a 'immutable' error must be raised.
</description>
<arg name="buffer" type="object" interface="wl_buffer"/>
<arg name="scale" type="int"
summary="the scaling factor of the icon, e.g. 1"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Toplevel tag protocol
Maintainers:
Xaver Hugl <xaver.hugl@kde.org>

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_toplevel_tag_v1">
<copyright>
Copyright © 2024 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="xdg_toplevel_tag_manager_v1" version="1">
<description summary="protocol for setting toplevel tags">
In order to make some window properties like position, size,
"always on top" or user defined rules for window behavior persistent, the
compositor needs some way to identify windows even after the application
has been restarted.
This protocol allows clients to make this possible by setting a tag for
toplevels.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy toplevel tag object">
Destroy this toplevel tag manager object. This request has no other
effects.
</description>
</request>
<request name="set_toplevel_tag">
<description summary="set tag">
Set a tag for a toplevel. The tag may be shown to the user in UI, so
it's preferable for it to be human readable, but it must be suitable
for configuration files and should not be translated.
Suitable tags would for example be "main window", "settings",
"e-mail composer" or similar.
The tag does not need to be unique across applications, and the client
may set the same tag for multiple windows, for example if the user has
opened the same UI twice. How the potentially resulting conflicts are
handled is compositor policy.
The client should set the tag as part of the initial commit on the
associated toplevel, but it may set it at any time afterwards as well,
for example if the purpose of the toplevel changes.
</description>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
<arg name="tag" type="string" summary="untranslated tag"/>
</request>
<request name="set_toplevel_description">
<description summary="set description">
Set a description for a toplevel. This description may be shown to the
user in UI or read by a screen reader for accessibility purposes, and
should be translated.
It is recommended to make the description the translation of the tag.
The client should set the description as part of the initial commit on
the associated toplevel, but it may set it at any time afterwards as
well, for example if the purpose of the toplevel changes.
</description>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
<arg name="description" type="string" summary="translated description"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
Xwayland shell protocol
Maintainers:
Joshua Ashton <joshua@froggi.es> (@frog)

View file

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xwayland_shell_v1">
<copyright>
Copyright © 2022 Joshua Ashton
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="Protocol for associating X11 windows to wl_surfaces">
This protocol adds a xwayland_surface role which allows an Xwayland
server to associate an X11 window to a wl_surface.
Before this protocol, this would be done via the Xwayland server
providing the wl_surface's resource id via the a client message with
the WL_SURFACE_ID atom on the X window.
This was problematic as a race could occur if the wl_surface
associated with a WL_SURFACE_ID for a window was destroyed before the
client message was processed by the compositor and another surface
(or other object) had taken its id due to recycling.
This protocol solves the problem by moving the X11 window to wl_surface
association step to the Wayland side, which means that the association
cannot happen out-of-sync with the resource lifetime of the wl_surface.
This protocol avoids duplicating the race on the other side by adding a
non-zero monotonic serial number which is entirely unique that is set on
both the wl_surface (via. xwayland_surface_v1's set_serial method) and
the X11 window (via. the `WL_SURFACE_SERIAL` client message) that can be
used to associate them, and synchronize the two timelines.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="xwayland_shell_v1" version="1">
<description summary="context object for Xwayland shell">
xwayland_shell_v1 is a singleton global object that
provides the ability to create a xwayland_surface_v1 object
for a given wl_surface.
This interface is intended to be bound by the Xwayland server.
A compositor must not allow clients other than Xwayland to
bind to this interface. A compositor should hide this global
from other clients' wl_registry.
A client the compositor does not consider to be an Xwayland
server attempting to bind this interface will result in
an implementation-defined error.
An Xwayland server that has bound this interface must not
set the `WL_SURFACE_ID` atom on a window.
</description>
<enum name="error">
<entry name="role" value="0" summary="given wl_surface has another role"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the Xwayland shell object">
Destroy the xwayland_shell_v1 object.
The child objects created via this interface are unaffected.
</description>
</request>
<request name="get_xwayland_surface">
<description summary="assign the xwayland_surface surface role">
Create an xwayland_surface_v1 interface for a given wl_surface
object and gives it the xwayland_surface role.
It is illegal to create an xwayland_surface_v1 for a wl_surface
which already has an assigned role and this will result in the
`role` protocol error.
See the documentation of xwayland_surface_v1 for more details
about what an xwayland_surface_v1 is and how it is used.
</description>
<arg name="id" type="new_id" interface="xwayland_surface_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="xwayland_surface_v1" version="1">
<description summary="interface for associating Xwayland windows to wl_surfaces">
An Xwayland surface is a surface managed by an Xwayland server.
It is used for associating surfaces to Xwayland windows.
The Xwayland server associated with actions in this interface is
determined by the Wayland client making the request.
The client must call wl_surface.commit on the corresponding wl_surface
for the xwayland_surface_v1 state to take effect.
</description>
<enum name="error">
<entry name="already_associated" value="0" summary="given wl_surface is already associated with an X11 window"/>
<entry name="invalid_serial" value="1" summary="serial was not valid"/>
</enum>
<request name="set_serial">
<description summary="associates a Xwayland window to a wl_surface">
Associates an Xwayland window to a wl_surface.
The association state is double-buffered, see wl_surface.commit.
The `serial_lo` and `serial_hi` parameters specify a non-zero
monotonic serial number which is entirely unique and provided by the
Xwayland server equal to the serial value provided by a client message
with a message type of the `WL_SURFACE_SERIAL` atom on the X11 window
for this surface to be associated to.
The serial value in the `WL_SURFACE_SERIAL` client message is specified
as having the lo-bits specified in `l[0]` and the hi-bits specified
in `l[1]`.
If the serial value provided by `serial_lo` and `serial_hi` is not
valid, the `invalid_serial` protocol error will be raised.
An X11 window may be associated with multiple surfaces throughout its
lifespan. (eg. unmapping and remapping a window).
For each wl_surface, this state must not be committed more than once,
otherwise the `already_associated` protocol error will be raised.
</description>
<arg name="serial_lo" type="uint" summary="The lower 32-bits of the serial number associated with the X11 window"/>
<arg name="serial_hi" type="uint" summary="The upper 32-bits of the serial number associated with the X11 window"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the Xwayland surface object">
Destroy the xwayland_surface_v1 object.
Any already existing associations are unaffected by this action.
</description>
</request>
</interface>
</protocol>

14
tests/build-cxx.cc.in Normal file
View file

@ -0,0 +1,14 @@
#include "@PROTOCOL_CLIENT_INCLUDE_FILE@"
#include "@PROTOCOL_SERVER_INCLUDE_FILE@"
/* This is a build-test only */
using namespace std;
int
main(int argc, char **argv)
{
(void)argc;
(void)argv;
return 0;
}

Some files were not shown because too many files have changed in this diff Show more