Compare commits

...

93 commits
1.44 ... main

Author SHA1 Message Date
Robert Ancell
e193660a38 Add missing summaries
Signed-off-by: Robert Ancell <robert.ancell@canonical.com>
2026-04-29 11:14:17 +10:00
Robert Ancell
85a2f3f265
Grammar fixes in xdg-shell.xml descriptions
Signed-off-by: Robert Ancell <robert.ancell@canonical.com>
2026-04-28 16:41:49 +12:00
Matt Turner
911ab509ed build: list protocol dependencies in the main protocol lists
Move protocol dependency information from a separate dict in
tests/meson.build into the main protocol dictionaries in meson.build.
Each protocol's value is now a dict mapping version to a list of
dependency file paths, making dependencies visible alongside the
protocol definitions.

Signed-off-by: Matt Turner <mattst88@gmail.com>
2026-04-15 17:37:57 -04:00
Xaver Hugl
cf59e7119b experimental: add xx fractional scale v2 protocol
This protocol allows client and compositor to use a different coordinate space
for communicating surface coordinates. The goal is to allow using unscaled
pixels rather than the lossy integer logical coordinate space, so all sizes
and positions on the pixel grid can be expressed correctly.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
2026-04-15 12:41:07 +00:00
Matt Turner
0f52a676b6 tests: remove --unresolved-symbols=ignore-all linker flag
Now that dependent protocol code is linked into test executables, all
cross-protocol symbols are properly resolved. The
--unresolved-symbols=ignore-all workaround is no longer needed and was
not effective with LLVM's LLD linker or on musl systems without lazy
binding.

Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48
Signed-off-by: Matt Turner <mattst88@gmail.com>
2026-04-14 11:27:10 +03:00
Matt Turner
bd521baf95 tests: link dependent protocol code into test executables
Some protocols reference interfaces defined in other protocols (e.g.,
xdg-decoration references xdg_toplevel from xdg-shell). When built in
isolation, these produce undefined symbols.

Define a dependency map and link the generated code from depended-on
protocols into each test executable, properly resolving all
cross-protocol symbol references.

Signed-off-by: Matt Turner <mattst88@gmail.com>
2026-04-14 11:27:10 +03:00
Matt Turner
916139da7a tests: split protocol loop into generation and build passes
Split the single foreach loop into two passes to allow test executables
to reference generated code from other protocols. The first pass
generates scanner outputs and records the custom_targets in
dictionaries. The second pass builds the test executables.

No functional change.

Signed-off-by: Matt Turner <mattst88@gmail.com>
2026-04-14 11:27:10 +03:00
Isaac Freund
f9566f2dc0
build: bump required wayland version for tests
The tests fail if wayland-scanner is older than 1.25.0 due to use of the
new frozen attribute.

Signed-off-by: Isaac Freund <mail@isaacfreund.com>
2026-04-09 13:44:51 +02:00
Isaac Freund
8eeadc857f ci: bump libwayland version to 1.25.0
This is required due to usage of the new frozen attribute.

Signed-off-by: Isaac Freund <mail@isaacfreund.com>
2026-04-05 17:04:05 +00:00
Isaac Freund
63b687da6d Add new frozen="true" to frozen interfaces
Signed-off-by: Isaac Freund <mail@isaacfreund.com>
2026-04-05 17:04:05 +00:00
Jonas Ådahl
02e63e74a8 build: Bump version to 1.48
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2026-04-01 13:46:29 +02:00
Simon Ser
b9f6234b34 xdg-session-management-v1: disallow adding a toplevel twice
It doesn't make sense to add a toplevel twice to the same session,
or to two separate sessions.

Signed-off-by: Simon Ser <contact@emersion.fr>
2026-04-01 12:41:10 +02:00
Simon Ser
2b190f1470 xdg-session-management-v1: add invalid_reason protocol error
Compositors need to check that the reason is a valid enum value.

Signed-off-by: Simon Ser <contact@emersion.fr>
2026-04-01 12:36:07 +02:00
Carlos Garnacho
9c488a0b10 text-input: Add preedit text hints
There seems to be some demand from input methods to be able
to style different parts of the preedit string differently.
Since the reasons to do that are many, and vary between IMs
and languages.

But even though some IMs would much want to be able to specify
colors, they lack the context to know what choice of colors
provides enough contrast and legibility embedded on foreign
UIs (e.g. accounting things like themes, accessibility, ...).

There is a proposal for a semantic closed list of pre-edit
styling options at https://github.com/ibus/ibus/wiki/Wayland-Colors,
which this commit follows, so clients and UIs have more freedom
in displaying a suitable style to pre-edit strings.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
2026-03-23 10:09:24 +01:00
Carlos Garnacho
d4f629ac84 text-input: Add show/hide_input_panel requests
These requests allow clients to explicitly declare the desired
interaction pattern with input panels (e.g. the system OSK).
This allows clients to decide a fine grained pattern to show/hide
these panels that is decouple of enable/disable requests.

This may help them enhance the experience with e.g. selecting
text, or navigating around large bodies of text without an
intrusive OSK, or implementing other UI patterns like a "show OSK"
button.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
2026-03-23 10:09:24 +01:00
David Edmundson
63cd4c3258 unstable/text-input: Add language hint from IME to clients
Some input methods such as a virtual keyboard allow a user to switch
between different languages. This is important to clients as some
languages should be rendered as RTL or change font rendering.

Signed-off-by: David Edmundson <davidedmundson@kde.org>
2026-03-23 10:09:24 +01:00
Tadeo Kondrak
1f4623f026 text-input: Add actions
In some environments it is desirable to show an input panel UI (e.g. OSK)
that is able to perform miscellaneous actions other than inserting text.
Add the framework for this, the available actions may be extended in later
versions of the protocol.

Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2026-03-23 10:07:15 +01:00
dcz
90be04e6ff text-input: Reword and clarify cursor syncing
This change makes it clear that there's an extra buffer for the value.
This explains the purpose of the complicated design.

Signed-off-by: Dorota Czaplejewicz
2026-03-23 10:07:15 +01:00
Tadeo Kondrak
e1e1ce5e6e text-input: Synchronize set_cursor_rectangle with the wl_surface
Currently, the after-effects of the set_cursor_rectangle request on
the input method UI and the client-side redraws are not guaranteed
to be atomic.

Add the requirement for compositors handling the newer version of
the protocol to make the set_cursor_rectangle request visually
effective with the same wl_surface.commit.

Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2026-03-23 10:03:11 +01:00
Tadeo Kondrak
5392d4e8b8 text-input: Add preedit_shown flag
Some clients don't show preedit text inline, so the compositor may
want to display the preedit text in a popup window instead.

Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2026-03-23 10:03:11 +01:00
fujiwarat
078f7af59b text-input: Add no Emoji input
Allow hinting input methods about if Emoji support is not useful
for special applications likes IDE, which manage or debug other
applications.

Fixes: #79

Signed-off-by: fujiwarat <takao.fujiwara1@gmail.com>
2026-03-23 10:03:11 +01:00
Dorota Czaplejewicz
d061b41fe1 text-input: Add on_screen_input_provided hint
The new hint is meant to indicate that the text input already provides an
on-screen means to enter data, and that using the system provided input
method may not be needed.

It should be used when the client presents the user with a custom on-screen
input method, like an on-screen keyboard, or perhaps a dropdown list.

The new hint is meant to address the issue when the system input method is an
on-screen keyboard. Without the hint, the input method would not know that it's
not needed, unless the client refrained from using the input method protocol
at all.

With the hint, the input method can still be enabled, while not displaying a
second on-screen keyboard. This allows for the system input method to still
provide accessibility services, as well as text completion or prediction.

Based on discussion in https://gitlab.gnome.org/GNOME/gtk/merge_requests/978

Signed-off-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
2026-03-23 10:02:16 +01:00
Mike Blumenkrantz
deddd9fe29 staging: Add xdg-session-management protocol
For a variety of cases it's desirable to have a method for negotiating
the restoration of previously-used states for a client's windows. This
helps for e.g., a compositor/client crashing (definitely not due to
bugs) or a backgrounded client deciding to temporarily destroy its
surfaces in order to conserve resources.

This protocol adds a method for managing such negotiation and is loosely
based on the Enlightenment "session recovery" protocol which has been
implemented and functional for roughly two years.

v2: Address review comments
v3: Add xdg_toplevel_session_v1.restore event. Move delete toplevel
    request to xdg_toplevel_session_v1. Remove surface argument from
    xdg_toplevel_session_v1.restored. Remove unused 'invalid_restore'
    (same intent as 'already_mapped'). Add 'invalid_session_id' error.
    Specify size limits and other documentation improvements.

Signed-off-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
2026-03-23 09:19:53 +01:00
PolyMeilex
e7bbd78978
tablet: Fix number of modes docs typo
Signed-off-by: Bartłomiej Maryńczak <marynczakbartlomiej@gmail.com>
2026-03-07 01:15:24 +01:00
Diego Viola
8fcd62b39d treewide: fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2026-03-03 02:49:30 -03:00
dcz
b1f15f8dbf xx-text-input: Add missing action.none
Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2026-02-26 13:50:16 +02:00
Ian Douglas Scott
f0b6bb7b8c pointer-gestures: Add <copyright> section
This protocol seemed to be the only one missing a copyright section.

Signed-off-by: Ian Douglas Scott <idscott@system76.com>
2026-02-19 16:31:43 +01:00
Matthias Klumpp
ee95f9899e toplevel-icon: Minor style fixes
Replaced some tabs with spaces and fixed a minor grammar issue.

Signed-off-by: Matthias Klumpp <matthias@tenstral.net>
2026-02-05 18:04:10 +00:00
dcz
00dd05f34b xx-keyboard-filter: Clarify destruction
Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2026-02-05 17:08:02 +00:00
dcz
e1b195d3d5 xx-text-input, xx-input-method: Fix sync: relax serial, relax applying changes
Synchronization is only needed for 3 things:
- to let the input method know when its update was applied not like it expected,
- especially when a byte index stopped being on bytes boundary due to extra change and a retry is needed,
- to break off events coming to an old text input after focusing a new one.

The one big change of this is relaxing the contract of the input method. The application now doesn't apply the changes exactly.

"delete_surrounding_text" is the only affected place so far, now it mentions the unexactness explicitly. The change is necessary because without strict sync, the input method can't know if it's sending messages aligned on code point boundaries.

This solves 90% of the retry problem.

Such problems all stem from text changing near the caret, where the user already has an expectation of weird interactions (multi-user typing over each other - IME garbage in, text garbage out), or the user expects something that the input method can't correct (text to emoji substitution should not result in a retry due to unexpected output, making this work with IME is the client's problem).

The other big change is keeping sync for the purpose of switching text fields.

Hopefully this is enough for everyone, and it stays more or less compatible.

Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2026-02-05 18:10:20 +02:00
dcz
de27273a78 xx-input-method: Clarify deleting selection
Signed-off-by: Dorota Czaplejewicz <gilapfco.dcz@porcupinefactory.org>
2026-02-05 18:10:20 +02:00
Matthias Klumpp
81632409f6 experimental: Add xx-zones protocol for window positioning in zones
This protocol provides a way for clients to create and add windows to
"zones".

A zone is a isolated environment with its own coordinate space where
clients can add and arrange toplevels that logically belong to each
other.
It provides means for, among other things, requesting that windows are
placed at specific coordinates within the zone coordinate space.

The protocol includes a request to retrieve the extents of the
server-side frame, so that it may be taken into consideration when
positioning server-decorated windows relative to one another.

Signed-off-by: Matthias Klumpp <matthias@tenstral.net>
2026-02-05 17:56:19 +02:00
Simon Ser
fedde2456e xdg-decoration: allow get_toplevel_decoration with a mapped toplevel
When clients create an xdg_toplevel_decoration object, they opt-in for
being self-decorated by the compositor if it decides to. Clients have no
way to prevent the compositor from potentially decorating them, if they
don't want any decorations they should destroy the
xdg_toplevel_decoration object.

Some toolkits allow toggling toplevel decorations at runtime. In this
case they need a way to transition from having no decorations at all to
a state where they can be decorated.

Allow creating an xdg_toplevel_decoration object on an already-mapped
toplevel to accomodate for this use-case.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/issues/9
2026-02-05 08:49:20 +00:00
Guido Günther
ea7ff8255e experimental: Add xx-cutouts protocol
This protocol allows compositors to send information about cut out
display areas to clients. This way compositors can describe display
notches, waterfalls and low resolution areas to clients so that these
can avoid placing important information there.

This is a copy of
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/372
adjusted for the experimental namespace.

Helps: #87

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2026-02-03 16:29:10 +01:00
Pekka Paalanen
2654a53845 staging/color-management: target_primaries unconditional
The interface description says the target_primaries event is mandatory,
but event documentation disagreed. Fix the disagreement by requiring the
event always.

This saves the compositor from figuring out whether to send the event or
not. I do not know what compositors do today, but sending the event is
definitely safe. Compositors that do not always send the event are
retroactively deemed buggy.

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

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-01-21 10:31:10 +02:00
Sebastian Wick
3dac056d83 README: Add expectations for unmerged protocol compatibility
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2026-01-16 10:34:26 +02:00
Sebastian Wick
7bc5f7355c README: Do not special case experimental protocol compatibility rules
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2026-01-16 10:34:26 +02:00
Sebastian Wick
579a70d5c4 README: Make backwards compatibility requirements more obvious
Protocols in all stages have the same rules for compatibility, just
different expectations of how often breaking changes, and thus major
protocol versions, get introduced.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2026-01-16 10:34:26 +02:00
Sebastian Wick
c3641ed4c9 README: Document each protocol phase
Instead of documenting parts of each phase in different chapters,
document all the details about a specific phase in one chapter.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2026-01-16 10:34:26 +02:00
Sebastian Wick
d070658b1e README: Refer to protocol in specific phases instead of directories
We now have a bunch of protocol phases which we can refer to. Mentioning
protocols by the implementation detail of in which directory they are is
a bit roundabout.

This change makes sure that protocol phases are used when possible and
mentions the directory structure exhaustively in a single place.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2026-01-16 10:34:26 +02:00
Sebastian Wick
e898d4bac9 README: Get rid of the protocol extension/extension terminology
We used to call extensions to core wayland `protocol extensions`. This
terminology has been dying out and we simply refer to those things as
`protocols`. In fact, the README already uses `protocol extension`,
`extension` and `protocol` interchangeably, so let's just stick to the
modern `protocol` terminology.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2026-01-16 10:34:26 +02:00
Sebastian Wick
585814fff7 README: Protocols in experimentla are in the experimental phase
Same as the previous commit. No need for duplicate names for the same
concept.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2026-01-16 10:34:26 +02:00
Sebastian Wick
1499ca7254 README: Protocols in staging are in the staging phase
There is no need for two names to refer to the same thing. Let's rename
the `testing` phase to the `staging` phase.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2026-01-16 10:34:26 +02:00
Julian Orth
a610e021fb pointer-gestures: fix versions of some interfaces
These interfaces should all have the same version as the global.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
2026-01-12 13:26:14 +01:00
Simon Ser
969ef1a36d build: use Meson pkgconfig module
This depends on:
47633330da

Signed-off-by: Simon Ser <contact@emersion.fr>
2025-12-27 12:33:31 +01:00
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
42 changed files with 4412 additions and 516 deletions

View file

@ -25,9 +25,9 @@ workflow:
.debian: .debian:
variables: variables:
FDO_DISTRIBUTION_VERSION: bookworm FDO_DISTRIBUTION_VERSION: trixie
FDO_DISTRIBUTION_PACKAGES: 'build-essential pkg-config meson git ca-certificates libffi-dev libexpat1-dev libxml2-dev' FDO_DISTRIBUTION_PACKAGES: 'build-essential pkg-config meson git ca-certificates libffi-dev libexpat1-dev libxml2-dev'
FDO_DISTRIBUTION_TAG: '2024-09-05.0' FDO_DISTRIBUTION_TAG: '2026-04-05.0'
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} ./.gitlab-ci/debian-install.sh' FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} ./.gitlab-ci/debian-install.sh'
check-commit: check-commit:

View file

@ -2,7 +2,7 @@
# Note: don't forget to bump FDO_DISTRIBUTION_TAG when editing this file! # 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 git clone --branch 1.25.0 --depth=1 https://gitlab.freedesktop.org/wayland/wayland
cd wayland/ cd wayland/
git show -s HEAD git show -s HEAD
meson build/ -Dtests=false -Ddocumentation=false meson build/ -Dtests=false -Ddocumentation=false

138
README.md
View file

@ -16,29 +16,30 @@ compositor and client developers. The governance rules are described in
## Protocol phases ## Protocol phases
Protocols in general have three phases: the development phase, the testing Protocols have three currently used phases: the experimental phase, the staging
phase, and the stable phase. phase, and the stable phase. Anything that is merged upstream is in one of
those phases, with the exception of deprecated protocols and protocols in
the legacy protocol phases.
In the development phase, a protocol may be added to wayland-protocols Backward-incompatible changes can only be introduced in a new major version of
as `experimental/`. It is actively being developed, for example by a protocol. In the experimental phase, a protocol is actively being
iterating over it in a [merge request] or planning it in an [issue]. developed and iterated upon, not trying to avoid incompatible changes.
Extensions in this phase can have backward incompatible changes. Protocols in the staging phase should try to minimize backward-incompatible
changes, and protocols in the stable phase should avoid backward-incompatible
changes.
During this phase, patches for clients and compositors are written as a test Anything that is not merged upstream can be iterated and broken freely, but
vehicle. Such patches should be merged with caution in clients and compositors, care should be taken to ensure that there are no two protocols with the same
because the protocol can still change. name and version but a different API.
During the experimental 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, 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 it enters the "staging" phase. What this means is that implementation is
the "testing" phase. At this point, the protocol is added to the `staging/` encouraged in clients and compositors where the functionality it specifies is
directory of wayland-protocols and made part of a release. What this means is wanted.
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 After a staging protocol has been sufficiently tested in the wild and
proven adequate, its maintainers and the community at large may declare it proven adequate, its maintainers and the community at large may declare it
@ -54,11 +55,10 @@ will be made to a deprecated protocol.
## Legacy protocol phases ## Legacy protocol phases
An "unstable" protocol refers to a protocol categorization policy An "unstable" protocol refers to a protocol categorization policy
previously used by wayland-protocols, where protocols initially previously used by wayland-protocols, where certain naming conventions were
placed in the `unstable/` directory had certain naming conventions were
applied, requiring a backward incompatible change to be declared "stable". applied, requiring a backward incompatible change to be declared "stable".
During this phase, protocol extension interface names were, in addition to During this phase, protocol interface names were, in addition to
the major version postfix, also prefixed with `z` to distinguish them from the major version postfix, also prefixed with `z` to distinguish them from
stable protocols. stable protocols.
@ -67,8 +67,9 @@ stable protocols.
Depending on which stage a protocol is in, the protocol is placed within Depending on which stage a protocol is in, the protocol is placed within
the toplevel directory containing the protocols with the same stage. the toplevel directory containing the protocols with the same stage.
Stable protocols are placed in the `stable/` directory, staging protocols Stable protocols are placed in the `stable/` directory, staging protocols
are placed in the `staging/` directory, and deprecated protocols are are placed in the `staging/` directory, experimental protocols are placed
placed in the `deprecated/` directory. in the `experimental/` directory, and deprecated protocols are placed in
the `deprecated/` directory.
Unstable protocols (see [Legacy protocol phases]) can be found in the Unstable protocols (see [Legacy protocol phases]) can be found in the
`unstable/` directory, but new ones should never be placed here. `unstable/` directory, but new ones should never be placed here.
@ -139,17 +140,6 @@ 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`, `foo-bar/foo-bar-v2.xml` consisting of the interface `wp_foo_bar_v2`,
corresponding to the major version 2. 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 ## Use of RFC 2119 keywords
Descriptions of all new protocols must use (in lowercase) and adhere to the Descriptions of all new protocols must use (in lowercase) and adhere to the
@ -175,26 +165,10 @@ A protocol may receive backward compatible additions and changes. This
is to be done in the general Wayland way, using `version` and `since` XML is to be done in the general Wayland way, using `version` and `since` XML
element attributes. element attributes.
## Backward incompatible protocol changes for experimental protocols ## Backward incompatible protocol changes
A protocol in the experimental phase should expect to see backward incompatible Protocols shall try to avoid backwards incompatible protocol changes during
changes at any time. the staging and stable phases.
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 Assuming a backward incompatible change is needed, the procedure for how to
do so is the following: do so is the following:
@ -207,7 +181,7 @@ do so is the following:
the interfaces to 1. the interfaces to 1.
- Remove all of the `since` attributes. - Remove all of the `since` attributes.
## Experimental Protocols: Development Recommendations ## The experimental phase
Implementations choosing to support experimental protocols must work to Implementations choosing to support experimental protocols must work to
support the latest version of the protocol at all times. It is therefore support the latest version of the protocol at all times. It is therefore
@ -217,26 +191,46 @@ have time and resources to actively develop.
A runtime option to enable features may also be useful to ensure users A runtime option to enable features may also be useful to ensure users
do not opt-in to potentially broken behavior. do not opt-in to potentially broken behavior.
There is no expectation or requirement for stability between experimental There is no expectation or requirement to avoid backwards incompatible changes
protocol versions. It is therefore strongly advised that such consumer in this phase. It is therefore strongly advised that such consumer projects add
projects add build-time compile options to enable such protocols in order build-time compile options to enable such protocols in order to avoid compile
to avoid compile errors from protocol version mismatches. errors from protocol version mismatches.
## Promoting a protocol from experimental ## The staging phase
The author of an experimental protocol can request that it be promoted at any point Protocols can enter the wayland-protocols repository in this stage, without
when it meets the requirements for `staging/`. At such time, traversing the experimental phase. The author of an experimental protocol can
the namespace prefix should be determined, and then the protocol should be request that it be promoted at any point.
renamed and merged into the appropriate directory, deleting the `experimental/`
entry.
## Declaring a protocol stable In both cases, the protocol must meet the requirements of
[GOVERNANCE section 2.3] for the staging phase.
Protocols in the staging phase must carry the following disclaimer:
```
Warning! The protocol described in this file is currently in the staging
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 protocol.
```
When a protocol gets promoted from the experimental phase, the namespace prefix
should be determined, and then the protocol should be renamed and merged into
the appropriate directory, deleting the `experimental/` entry.
## The stable phase
Once it has been concluded that a protocol been proven adequate in Once it has been concluded that a protocol been proven adequate in
production, and that it is deemed unlikely to receive any backward production, and that it is deemed unlikely to receive any backward
incompatible changes, it may be declared stable. incompatible changes, it may be declared stable.
The procedure of doing this is the following: There are other requirements for declaring a protocol stable, see
[GOVERNANCE section 2.3].
Note that the major version of the stable protocol, as well as all the
interface versions and names, must remain unchanged.
The procedure of promoting a protocol to the stable phase is the following:
- Create a new directory in the `stable/` toplevel directory with the - Create a new directory in the `stable/` toplevel directory with the
same name as the protocol directory in the `staging/` directory. same name as the protocol directory in the `staging/` directory.
@ -244,24 +238,18 @@ The procedure of doing this is the following:
decided to be declared stable into the new directory. The target name 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 should be the same name as the protocol directory plus the version and
the `.xml` suffix. the `.xml` suffix.
- Remove the disclaimer about the protocol being in the testing phase. - Remove the disclaimer about the protocol being in the staging phase.
- Update the `README` file in the staging directory and create a new - Update the `README` file in the staging directory and create a new
`README` file in the new directory. `README` file in the new directory.
- Replace the disclaimer in the protocol files left in the staging/ - Replace the disclaimer in the protocol files left in the staging/
directory with the following: directory with the following:
``` ```
Disclaimer: This protocol extension has been marked stable. This copy is Disclaimer: This protocol has been marked stable. This copy is
no longer used and only retained for backwards compatibility. The no longer used and only retained for backwards compatibility. The
canonical version can be found in the stable/ directory. 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 ## Releases
Each release of wayland-protocols finalizes the version of the protocols Each release of wayland-protocols finalizes the version of the protocols

View file

@ -0,0 +1,4 @@
xx cutouts protocol
Maintainers:
Guido Günther <agx@sigxcpu.org>

View file

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xx_cutouts_unstable_v1">
<copyright>
Copyright © 2026 Phosh.mobi e.V.
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.
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.
</copyright>
<description summary="Protocol to describe cut out surface regions">
This protocol describes the areas of a toplevel that are cut out
of the available surface area by hardware elements present in the
physical display. This allows clients to avoid placing user interface
elements in those areas.
Typical cutout areas are notches (i.e. embedding a camera) or
"waterfall" display edges. In the case of a notch the compositor
would usually supply the bounding box of the notch or an
approximation by multiple rectangles. Thus a single physical
element in the display can correspond to multiple cutout events in
the protocol.
The protocol currently supports xdg_toplevel surfaces but is meant
to be extended to other surfaces (like layer surfaces) in the
future.
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 can only be done by
creating a new major version of the extension.
</description>
<interface name="xx_cutouts_manager_v1" version="1">
<description summary="Display cutouts area manager">
This interface allows a compositor to announce support for
supplying cutout information to the client.
</description>
<enum name="error">
<entry name="invalid_role" value="0" summary="given wl_surface has incorrect role"/>
<entry name="defunct_cutouts_object" value="1"
summary="wl_surface or surface role was destroyed before the cutouts object"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the xx_cutouts_manager object">
Using this request a client can tell the server that it is not
going to use the xx_cutouts_manger object anymore.
Any objects already created through this instance are not affected.
</description>
</request>
<request name="get_cutouts">
<description summary="create a cutout notifier from a xdg toplevel">
This creates a new xx_cutouts object for the given
surface. The role of the surface must be xdg_toplevel
otherwise an invalid_role protocol error will be raised. Later
versions of this protocol might allow for other surface roles.
</description>
<arg name="id" type="new_id" interface="xx_cutouts_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="xx_cutouts_v1" version="1">
<description summary="cutout regions information">
An xx_cutouts describes the areas currently "cut out" of a
toplevel.
Each cutout event carries an id that identifies the
physical element. If the compositor describes an element by
multiple cutout events these should use the same element
id. A typical example is a curved notch that is approximated
by several cutout_box elements. Using the same element
id allows the client to identify that these belong to the
same physical object. Ids are only valid during one configure
sequence. No guarantee is given that the same id identifies
the same element in different configure sequences.
Typically compositors would only send cutout information when
the toplevel enters fullscreen or maxmized state (as specified
in the xdg_shell protocol).
The xx_cutouts_v1 object must be destroyed before its
underlying xdg_toplevel and wl_surface. Otherwise the
defunct_cutouts_object protocol error will be send.
</description>
<enum name="type">
<description summary="Cutout type">
These values indicate the type of cutout. The information is
meant to help clients to decide whether they can possibly
ignore the element.
</description>
<entry name="cutout" value="0">
<description summary="A generic cutout">
This element type can be used by the compositor if it
doesn't want to provide a more specific type.
</description>
</entry>
<entry name="notch" value="1">
<description summary="Small functional cutout area">
A functional, irregular shape on one of the device's
edges. It often contains a camera.
</description>
</entry>
<entry name="waterfall" value="2">
<description summary="A curved display edge">
A curved display edge intended to make the device appear
like not having any bezel.
</description>
</entry>
</enum>
<enum name="corner_position">
<description summary="Corner position">
The position of a corner on a surface
</description>
<entry name="top_left" value="0"/>
<entry name="top_right" value="1"/>
<entry name="bottom_right" value="2"/>
<entry name="bottom_left" value="3"/>
</enum>
<enum name="error">
<entry name="invalid_element_id" value="0"
summary="Invalid element id in a set_unhandled request"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the xx_cutouts object">
Using this request a client can tell the server that it is not
going to use the xx_cutouts object anymore.
</description>
</request>
<event name="cutout_box">
<description summary="A rectangular cutout region">
The cutout_box event describes a rectangular cutout area in
surface-local coordinates.
This can be an approximation of e.g. a circular camera notch.
</description>
<arg name="x" type="int"
summary="x coordinate of the box's top left corner"/>
<arg name="y" type="int"
summary="y coordinate of the box's top left corner"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
<arg name="type" type="uint" enum="type" summary="The type of cutout"/>
<arg name="id" type="uint" summary="An identifier identifying the physical element"/>
</event>
<event name="cutout_corner">
<description summary="A cutout corner">
The cutout_corner event describes a rounded corner in
surface-local coordinates. The area towards the screen edge is
the cutout corner part.
</description>
<arg name="position" type="uint" enum="corner_position" summary="The position of the described corner"/>
<arg name="radius" type="uint" summary="The corner's radius"/>
<arg name="id" type="uint" summary="An identifier identifying the physical element"/>
</event>
<event name="configure">
<description summary="notify cutout changes">
The configure event marks the end of a configure sequence. A
configure sequence is a set of zero or more cutout events and
the final xx_cutout.configure event.
In the case of a xdg_toplevel clients should arrange their
surface for the new cutouts, and then send an
xdg_surface.ack_configure request at some point before
committing the new surface. See xdg_surface.configure and
xdg_surface.ack_configure in the xdg_shell protocol for
details.
If the cutout sequence consists of only a configure event and
contains no cutout or corner events this indicates that the
surface isn't overlapping with any cutouts or corners.
If the client receives multiple configure events before it can
respond to one, it is free to discard all but the last event
it received.
</description>
</event>
<request name="set_unhandled">
<description summary="Notify about unhandled cutouts">
If a client doesn't handle one or more cutouts in the to be
acked sequence, it can add their element's id to the
unhandled array. The compositor might then try to reposition
the surface in a way that avoids these elements in a future
configure sequence.
The request (if used) must be sent before acking the configure
sequence. State set with this request is double-buffered. It
will get applied on the next ack_configure and stay valid
until the next configure event.
</description>
<arg name="unhandled" type="array" summary="array of unhandled element ids"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,4 @@
xx fractional scale v2 protocol
Maintainers:
Xaver Hugl <xaver.hugl@kde.org> (@Zamundaaa)

View file

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xx_fractional_scale_v2">
<copyright>
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>
<description summary="Protocol for fractional scaling">
This protocol allows compositors and clients to communicate the
coordinate space their surfaces act in.
</description>
<interface name="xx_fractional_scale_manager_v2" version="1">
<description summary="creates surface scale interfaces">
A global interface to create xx_fractional_scale_v2 interfaces.
</description>
<request name="destroy" type="destructor">
<description summary="release the global">
Informs the server that the client will not be using this protocol
object anymore. This does not affect any other objects.
</description>
</request>
<enum name="error">
<entry name="fractional_scale_exists" value="0"
summary="xx_fractional_scale_v2 for the surface already exists"/>
</enum>
<request name="get_fractional_scale">
<description summary="create an interface to enable fractional scaling">
Create an interface object for a wl_surface to communicate scale.
If the given wl_surface already has a xx_fractional_scale_v2 object
associated, the fractional_scale_exists protocol error is raised.
</description>
<arg name="id" type="new_id" interface="xx_fractional_scale_v2"
summary="the new scale interface"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface"/>
</request>
</interface>
<interface name="xx_fractional_scale_v2" version="1">
<description summary="interface for fractional scaling">
An additional interface for a wl_surface object that allows compositor and
client to communicate in a different coordinate space, in order to enable
them to accurately describe coordinates and sizes in pixels.
The two coordinate spaces in consideration are logical and pixels, where
logical coordinates describe the size content should have and pixels
describe the size of buffers.
A scale of one equals a lack of scaling, where the communicated values
define both logical coordinates and pixels.
A scale greater than one describes that for every logical coordinate,
more than one pixel is used, and a scale less than one describes that
multiple logical coordinates make up one pixel.
In mathematical terms, logical coordinates can be obtained by dividing
the provided values by the currently active scale.
The initial compositor and client coordinate scale factors are 1.
</description>
<event name="scale_factor">
<description summary="set the compositor coordinate space scale factor">
This event sets a scale factor for the associated wl_surface that
describes the coordinate system the compositor will use for events
following xx_fractional_scale_v2.scale_factor.
The scale factor is encoded in a 8.24 fixed point format.
The compositor must not send a scale of zero.
The client should re-render and commit a new buffer with the new scale
as soon as possible, in order to avoid artifacts caused by the mismatch
in compositor and client scales.
</description>
<arg name="scale_8_24" type="uint" summary="surface scale factor"/>
</event>
<request name="set_scale_factor">
<description summary="set the client coordinate space scale factor">
This request sets a scale factor for the associated wl_surface that
describes the coordinate system the client uses for requests following
xx_fractional_scale_v2.set_scale_factor.
The scale factor is encoded in a 8.24 fixed point format.
If this scale factor does not match the scale factor provided by the
compositor with xx_fractional_scale_v2.scale_factor, the compositor may
apply transformations to the wl_surface that can result in blurriness
or other artifacts.
If scale_8_24 is zero, the error invalid_scale will be raised.
</description>
<arg name="scale_8_24" type="uint" summary="surface scale factor"/>
</request>
<request name="destroy" type="destructor">
<description summary="remove the scale interface from the surface">
The wl_surface's xx_fractional_scale_v2 object is destroyed, and the
associated scale is reset to 1.
</description>
</request>
<enum name="error">
<entry name="invalid_scale" value="0"
summary="scale value is not valid"/>
</enum>
</interface>
</protocol>

View file

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

View file

@ -0,0 +1,948 @@
<?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="4">
<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>
<enum name="protocol_compat" since="4">
<description summary="protocol compatibility value">
Tells the input method client what kinds of events the text input client supports.
</description>
<entry name="text_input_v3" value="0x0" summary="zwp-text-input-v3 semantics"/>
<entry name="xx_text_input" value="0x1">
<description summary="xx-text-input semantics">
Changes the meaning of serial compared to v3.
The text input client now applies requested updates on a "best-effort" basis.
</description>
</entry>
<!-- This doesn't need disambiguating. Both protocols are pdated in lockstep, and the compositor should implement both protocols to the current version. By the experimental protocols contract, every version bump is breaking compatibility. -->
</enum>
<event name="announce_protocol_compat" since="3">
<description summary="set text input's compatibility level">
Tells the input method client what kinds of events the text input client supports.
<!-- While text input protocols and input method protocols are updated in lockstep, nobody knows what versions of either will end up on a user's computer. Old input method with new apps? New input method with old apps?
To limit the scope for now, let's assume the user always keeps the input method up to date, and uses old apps. -->
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 compositor may send this event as part of a .done chain that switches the active state from inactive to active. It must not send this event otherwise.
The initial value for version is text_input_v3.
</description>
<arg name="compat_level" type="uint" enum="protocol_compat"/>
</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 .deactivate 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 text is selected, it must be deleted.
If indices exceed the available text boundaries, they should be adjusted to fit in boundaries and deletion reattempted.
If indices do not lie on byte boundaries, then the text input client should delete at least that many bytes. In this case, the client decides the end point, but a character boundary same as when deleting using the keyboard is recommended.
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.
Serial handling with protocol_compat == xx_text_input
The serial number should be set to 0.
Serial handling with protocol_compat == text_input_v3
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
usable, 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.activate()
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 committed .deactivate 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 .configure 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 previously, 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, specifies 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="4">
<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,178 @@
<?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.
Once any of the bound objects are destroyed, the xx_keyboard_filter_v1 instance becomes disabled and it must ignore all following requests.
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,592 @@
<?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
Copyright © 2025 DorotaC
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="3">
<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 text is selected, it must be deleted.
If indices exceed the available text boundaries, they should be adjusted to fit in boundaries and deletion reattempted.
If indices do not lie on byte boundaries, then the text input client should delete at least that many bytes. In this case, the client decides the end point, but a character boundary same as when deleting using the keyboard is recommended.
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.
Serial handling starting version 2:
The argument "serial" is ignored.
Serial handling version 1:
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>
<entry name="none" value="1">
<description summary="no action">
This enum value exists only to provide a default to make double-buffering implementation easier. It should not be used explicitly.
</description>
</entry>
<!-- 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="3">
<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,4 @@
Zones protocol
Maintainers:
Matthias Klumpp <matthias@tenstral.net> (@mak)

View file

@ -0,0 +1,493 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xx_zones_v1">
<copyright>
Copyright © 2023-2026 Matthias Klumpp
Copyright © 2024-2025 Frank Praznik
Copyright © 2024 Victoria Brekenfeld
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 manage client-specific zones for explicit window placement">
This protocol provides a way for clients to create and add toplevel windows
to "zones".
A zone is an environment with its own coordinate space where clients can
add and arrange windows that logically belong and relate to each other.
It provides means for, among other things, requesting that windows are
placed at specific coordinates within the zone coordinate space.
See the description of "xx_zone_v1" for more details.
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="xx_zone_manager_v1" version="1">
<description summary="manage zones for clients">
The 'xx_zone_manager' interface defines base requests for obtaining and
managing zones for a client.
</description>
<request name="destroy" type="destructor">
<description summary="Destroy this object">
This has no effect other than to destroy the xx_zone_manager object.
</description>
</request>
<request name="get_zone_item">
<description summary="create a positionable item representing a toplevel">
Create a new positionable zone item from an 'xdg_toplevel'.
The resulting wrapper object can then be used to position the
toplevel window in a zone.
</description>
<arg name="id" type="new_id" interface="xx_zone_item_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel" summary="the toplevel window"/>
</request>
<request name="get_zone">
<description summary="join a zone or request a new one">
Create a new zone. While the zone object exists, the compositor
must consider it "used" and keep track of it.
A zone is represented by a string 'handle'.
The compositor must keep zone handles valid while any client is
referencing the corresponding zone.
The compositor may always give a client the same zone for a given
output, and remember its position and size for the client, but
clients should not rely on this behavior.
A client can request a zone to be placed on a specific
output by passing a wl_output as 'output'. If a valid output
is set, the compositor should place the zone on that output.
If NULL is passed, the compositor decides the output.
The compositor should provide the biggest reasonable zone space
for the client, governed by its own policy.
If the compositor wants to deny zone creation (e.g. on a specific
output), the returned zone must be "invalid". A zone is invalid
if it has a negative size, in which case the client is forbidden
to place items in it.
</description>
<arg name="id" type="new_id" interface="xx_zone_v1"/>
<arg name="output" type="object" interface="wl_output"
summary="the preferred output to place the zone on, or NULL"
allow-null="true"/>
</request>
<request name="get_zone_from_handle">
<description summary="join a zone via its handle">
Create a new zone object using the zone's handle.
For the returned zone, the same rules as described in
'get_zone' apply.
This request returns a reference to an existing or remembered zone
that is represented by 'handle'.
The zone may potentially have been created by a different client.
This allows cooperating clients to share the same coordinate space.
If the zone handle was invalid or unknown, a new zone must
be created and returned instead, following the rules outlined
in 'get_zone' and assuming no output preference.
Every new zone object created by this request emits its initial event
sequence, including the 'handle' event, which must return a different
handle from the one passed to this request in case the existing zone
could not be joined.
</description>
<arg name="id" type="new_id" interface="xx_zone_v1"/>
<arg name="handle" type="string" summary="the handle of a zone"/>
</request>
</interface>
<interface name="xx_zone_item_v1" version="1">
<description summary="opaque surface object that can be positioned in a zone">
The zone item object is an opaque descriptor for a positionable
element, such as a toplevel window.
It currently can only be created from an 'xdg_toplevel' via the
'get_zone_item' request on a 'xx_zone_manager'.
The lifetime of a zone item is tied to its referenced item (usually
a toplevel).
When the reference is destroyed, the compositor must send a 'closed'
event and the zone item becomes inert.
</description>
<request name="destroy" type="destructor">
<description summary="delete this object">
Destroys the zone item. This request may be sent at any time by the
client.
By destroying the object, the respective item surface remains at its
last position, but its association with its zone is lost.
This will also cause it to lose any other attached state described by
this protocol.
If the item was associated with a zone when this request is sent,
the compositor must emit 'item_left' on the respective zone, unless
it had already been emitted before a 'closed' event.
</description>
</request>
<event name="frame_extents">
<description summary="the extents of the frame bordering the item">
The 'frame_extents' event describes the current extents of the frame
bordering the item's content area.
This event is sent immediately after the item joins a zone, or if
the item frame extents have been changed by other means (e.g. toggled
by a client request, or compositor involvement). The dimensions are in
the same coordinate space as the item's zone (the surface coordinate
space).
This event must be followed by a 'position' event, even if the item's
coordinates did not change as a result of the frame extents changing.
If the item has no associated frame, the event should still be sent,
but extents must be set to zero.
This event can only be emitted if the item is currently associated
with a zone.
</description>
<arg name="top" type="int" summary="current height of the frame bordering the top of the item"/>
<arg name="bottom" type="int" summary="current height of the frame bordering the bottom of the item"/>
<arg name="left" type="int" summary="current width of the frame bordering the left of the item"/>
<arg name="right" type="int" summary="current width of the frame bordering the right of the item"/>
</event>
<request name="set_position">
<description summary="set a preferred item surface position">
Request a preferred position (x, y) for the specified item
surface to be placed at, relative to its associated zone.
This state is double-buffered and is applied on the next
wl_surface.commit of the surface represented by 'item'.
X and Y coordinates are relative to the zone this item is associated
with, and must not be larger than the dimensions set by the zone size.
They may be smaller than zero, if the item's top-left edge is to be
placed beyond the zone's top-left sides, but clients should expect the
compositor to more aggressively sanitize the coordinate values in that
case.
If a coordinate exceeds the zone's maximum bounds, the compositor must
sanitize it to more appropriate values (e.g. by clamping the values to
the maximum size).
For infinite zones, the client may pick any coordinate.
Compositors implementing this protocol should try to place an item
at the requested coordinates relative to the item's zone, unless doing
so is not allowed by compositor policy (because e.g. the user has set
custom rules for the surface represented by the respective item, the
surface overlaps with a protected shell component, session management
has loaded previous surface positions or the placement request would
send the item out of bounds).
Clients should be aware that their placement preferences might not
always be followed and must be prepared to handle the case where the
item is placed at a different position by the compositor.
Once an item has been mapped, a change to its preferred placement can
still be requested and should be applied, but must not be followed
by the compositor while the user is interacting with the affected item
surface (e.g. clicking &amp; dragging within the window, or resizing it).
After a call to this request, a 'position' event must be emitted with the
item's new actual position.
If the current item has no zone associated with it, a 'position_failed'
event must be emitted.
If the compositor did not move the item at all, not even with sanitized
values, a 'position_failed' event must be emitted as well.
</description>
<arg name="x" type="int" summary="x position relative to zone"/>
<arg name="y" type="int" summary="y position relative to zone"/>
</request>
<event name="position">
<description summary="notify about the position of an item">
This event notifies the client of the current position (x, y) of
the item relative to its zone.
Coordinates are relative to the zone this item belongs to, and only
valid within it.
Negative coordinates are possible, if the user has moved an item
surface beyond the zone's top-left boundary.
This event is sent in response to a 'set_position' request,
or if the item position has been changed by other means
(e.g. user interaction or compositor involvement).
This event can only be emitted if the item is currently associated
with a zone.
</description>
<arg name="x" type="int" summary="current x position relative to zone"/>
<arg name="y" type="int" summary="current y position relative to zone"/>
</event>
<event name="position_failed">
<description summary="a set_position request has failed">
The compositor was unable to set the position of this item entirely,
and could not even find sanitized coordinates to place the item at
instead.
This event will also be emitted if 'set_position' was called while the
item had no zone associated with it.
</description>
</event>
<event name="closed">
<description summary="the underlying surface has been destroyed">
This event indicates that the surface wrapped by this
zone item has been destroyed.
The 'xx_zone_item_v1' object becomes inert and the client should
destroy it. Any requests made on an inert zone item must be silently
ignored by the compositor, and no further events will be sent for this
item.
If the item was associated with a zone when this event is sent,
the compositor must also emit 'item_left' on the respective zone
before sending this event.
</description>
</event>
</interface>
<interface name="xx_zone_v1" version="1">
<description summary="area for a client in which it can set window positioning preferences">
An 'xx_zone' describes a display area provided by the compositor in
which a client can place windows and move them around.
A zone's area could, for example, correspond to the space usable for
placing windows on a specific output (space without panels or other
restricted elements) or it could be an area of the output the compositor
has specifically chosen for a client to place its surfaces in.
Clients should make no assumptions about how a zone is presented to the
user (e.g. compositors may visually distinguish what makes up a zone).
Items are added to a zone as 'xx_zone_item' objects.
All item surface position coordinates (x, y) are relative to the selected
zone.
They are using the 'size' of the respective zone as coordinate system,
with (0, 0) being in the top left corner.
If a zone item is moved out of the top/left boundaries of the zone by
user interaction, its coordinates must become negative, relative to the
zone's top-left coordinate origin. A client may position an item at negative
coordinates.
The compositor must ensure that any item positioned by the client is
visible and accessible to the user, and is not moved into invisible space
outside of a zone.
Positioning requests may be rejected or altered by the compositor, depending
on its policy.
The absolute position of the zone within the compositor's coordinate space
is opaque to the client and the compositor may move the entire zone without
the client noticing it. A zone may also be arbitrarily resized, in which
case the respective 'size' event must be emitted again to notify the client.
A zone is always tied to an output and does not extend beyond it.
A zone may be "invalid". An invalid zone is created with a negative
'size' and must not be used for item arrangement.
Upon creation the compositor must emit 'size' and 'handle' events for the
newly created 'xx_zone', followed by 'done'.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the xx_zone object">
Using this request a client can tell the compositor that it is not
going to use the 'xx_zone' object anymore.
The zone itself must only be destroyed if no other client
is currently referencing it, so this request may only destroy the
object reference owned by the client.
</description>
</request>
<event name="size">
<description summary="size of the zone">
The 'size' event describes the size of this zone.
It is a rectangle with its origin in the top-left corner, using
the surface coordinate space (device pixels divided by the scaling
factor of the output this zone is attached to).
If a width or height value is zero, the zone is infinite
in that direction.
If the width and height values are negative, the zone is considered
"invalid" and must not be used.
A size event declaring the zone invalid may only be emitted immediately
after the zone was created.
A zone must not become invalid at a later time by sending a negative
'size' after the zone has been established.
The 'size' event is sent immediately after creating an 'xx_zone_v1',
and whenever the size of the zone changes. A zone size can change at
any time, for any reason, for example due to output size or scaling
changes, or by compositor policy.
Upon subsequent emissions of 'size' after 'xx_zone' has already
been created, the 'done' event does not have to be sent again.
</description>
<arg name="width" type="int"
summary="zone width in logical pixels"/>
<arg name="height" type="int"
summary="zone height in logical pixels"/>
</event>
<event name="handle">
<description summary="the zone handle">
The handle event provides the unique handle of this zone.
The handle may be shared with any client, which then can use it to
join this client's zone by calling
'xx_zone_manager.get_zone_from_handle'.
This event must only be emitted once after the zone was created.
If this zone is invalid, the handle must be an empty string.
</description>
<arg name="handle" type="string" summary="the exported zone handle"/>
</event>
<event name="done">
<description summary="all information about the zone has been sent">
This event is sent after all other properties (size, handle) of an
'xx_zone' have been sent.
This allows changes to the xx_zone properties to be seen as
atomic, even if they happen via multiple events.
</description>
</event>
<enum name="error">
<entry name="invalid" summary="an invalid value has been submitted"
value="0"/>
</enum>
<request name="add_item">
<description summary="associate an item with this zone">
Make 'item' a member of this zone.
This state is double-buffered and is applied on the next
'wl_surface.commit' of the surface represented by 'item'.
This request associates an item with this zone.
If this request is called on an item that already has a zone
association with a different zone, the item must leave its old zone
(with 'item_left' being emitted on its old zone) and will instead
be associated with this zone.
Upon receiving this request and if the target zone is allowed for 'item',
a compositor must emit 'item_entered' to confirm the zone association.
It must even emit this event if the item was already associated with this
zone before.
The compositor must move the surface represented by 'item' into the
boundary of this zone upon receiving this request and accepting it
(either by extending the zone size, or by moving the item surface).
If the compositor does not allow the item to switch zone associations,
and wants it to remain in its previous zone, it must emit
'item_blocked' instead.
Compositors might want to prevent zone associations if they
perform specialized window management (e.g. autotiling) that would
make clients moving items between certain zones undesirable.
Once the 'item' is added to its zone, the compositor must first send
a 'frame_extents' event on the item, followed by an initial 'position'
event with the item's current position.
The compositor must then send 'position' events when the position
of the item in its zone is changed, for as long as the item is
associated with a zone.
If the zone is invalid, an 'invalid' error must be raised and the item
must not be associated with the invalid zone.
If the referenced item is inert (its underlying surface has been
destroyed), the request must be silently ignored.
</description>
<arg name="item" type="object" interface="xx_zone_item_v1" summary="the zone item"/>
</request>
<request name="remove_item">
<description summary="disassociate an item from this zone">
Remove 'item' as a member of this zone.
This state is double-buffered and is applied on the next
'wl_surface.commit' of the surface represented by 'item'.
This request removes the item from this zone explicitly,
making the client unable to retrieve coordinates again.
Upon receiving this request, the compositor should not change the
item surface position on screen, and must emit 'item_left' to confirm
the item's removal. It must even emit this event if the
item was never associated with this zone.
If the referenced item is inert (its underlying surface has been
destroyed), the request must be silently ignored.
</description>
<arg name="item" type="object" interface="xx_zone_item_v1" summary="the zone item"/>
</request>
<event name="item_blocked">
<description summary="an item could not be associated with this zone">
This event notifies the client that an item was prevented from
joining this zone.
It is emitted as a response to 'add_item' if the compositor did not
allow the item to join this particular zone.
</description>
<arg name="item" type="object" interface="xx_zone_item_v1" summary="the item that was prevented from joining this zone"/>
</event>
<event name="item_entered">
<description summary="notify about an item having joined this zone">
This event notifies the client of an item joining this zone.
It is emitted as a response to 'add_item' or if the compositor
automatically had the item surface (re)join an existing zone.
</description>
<arg name="item" type="object" interface="xx_zone_item_v1" summary="the item that has joined the zone"/>
</event>
<event name="item_left">
<description summary="notify about an item having left this zone">
This event notifies the client of an item leaving this zone, and
therefore the client will no longer receive updated coordinates
or frame extents for this item.
If the client still wishes to adjust the item surface coordinates, it
may associate the item with a zone again by calling 'add_item'.
This event is emitted for example if the user moved an item surface out
of a smaller zone's boundaries, or onto a different screen where the
previous zone can not expand to. It is also emitted in response to
explicitly removing an item via 'remove_item'.
</description>
<arg name="item" type="object" interface="xx_zone_item_v1" summary="the item that has left the zone"/>
</event>
</interface>
</protocol>

View file

@ -1,7 +1,7 @@
header_install_dir = get_option('includedir') / 'wayland-protocols' header_install_dir = get_option('includedir') / 'wayland-protocols'
foreach protocol_file : protocol_files foreach protocol_file : protocol_files
header_name = fs.name(protocol_file).replace('.xml', '-enum.h') header_name = fs.name(protocol_file).replace('.xml', '-enum.h')
custom_target( headers += custom_target(
header_name, header_name,
output: header_name, output: header_name,
input: '../..' / protocol_file, input: '../..' / protocol_file,

View file

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

View file

@ -35,19 +35,19 @@
More than one tablet may exist, and device-specifics matter. Tablets are More than one tablet may exist, and device-specifics matter. Tablets are
not represented by a single virtual device like wl_pointer. A client not represented by a single virtual device like wl_pointer. A client
binds to the tablet manager object which is just a proxy object. From binds to the tablet manager object which is just a proxy object. From
that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat) that, the client requests zwp_tablet_manager_v2.get_tablet_seat(wl_seat)
and that returns the actual interface that has all the tablets. With and that returns the actual interface that has all the tablets. With
this indirection, we can avoid merging wp_tablet into the actual Wayland this indirection, we can avoid merging zwp_tablet_v2 into the actual Wayland
protocol, a long-term benefit. protocol, a long-term benefit.
The wp_tablet_seat sends a "tablet added" event for each tablet The zwp_tablet_seat_v2 sends a "tablet added" event for each tablet
connected. That event is followed by descriptive events about the connected. That event is followed by descriptive events about the
hardware; currently that includes events for name, vid/pid and hardware; currently that includes events for name, vid/pid and
a wp_tablet.path event that describes a local path. This path can be a zwp_tablet_v2.path event that describes a local path. This path can be
used to uniquely identify a tablet or get more information through used to uniquely identify a tablet or get more information through
libwacom. Emulated or nested tablets can skip any of those, e.g. a libwacom. Emulated or nested tablets can skip any of those, e.g. a
virtual tablet may not have a vid/pid. The sequence of descriptive virtual tablet may not have a vid/pid. The sequence of descriptive
events is terminated by a wp_tablet.done event to signal that a client events is terminated by a zwp_tablet_v2.done event to signal that a client
may now finalize any initialization for that tablet. may now finalize any initialization for that tablet.
Events from tablets require a tool in proximity. Tools are also managed Events from tablets require a tool in proximity. Tools are also managed
@ -55,15 +55,15 @@
to the compositor. That event is followed by a number of descriptive to the compositor. That event is followed by a number of descriptive
events about the hardware; currently that includes capabilities, events about the hardware; currently that includes capabilities,
hardware id and serial number, and tool type. Similar to the tablet hardware id and serial number, and tool type. Similar to the tablet
interface, a wp_tablet_tool.done event is sent to terminate that initial interface, a zwp_tablet_tool_v2.done event is sent to terminate that initial
sequence. sequence.
Any event from a tool happens on the wp_tablet_tool interface. When the Any event from a tool happens on the zwp_tablet_tool_v2 interface. When the
tool gets into proximity of the tablet, a proximity_in event is sent on tool gets into proximity of the tablet, a proximity_in event is sent on
the wp_tablet_tool interface, listing the tablet and the surface. That the zwp_tablet_tool_v2 interface, listing the tablet and the surface. That
event is followed by a motion event with the coordinates. After that, event is followed by a motion event with the coordinates. After that,
it's the usual motion, axis, button, etc. events. The protocol's it's the usual motion, axis, button, etc. events. The protocol's
serialisation means events are grouped by wp_tablet_tool.frame events. serialisation means events are grouped by zwp_tablet_tool_v2.frame events.
Two special events (that don't exist in X) are down and up. They signal Two special events (that don't exist in X) are down and up. They signal
"tip touching the surface". For tablets without real proximity "tip touching the surface". For tablets without real proximity
@ -95,7 +95,7 @@
Since tablets work independently of the pointer controlled by the mouse, Since tablets work independently of the pointer controlled by the mouse,
the focus handling is independent too and controlled by proximity. the focus handling is independent too and controlled by proximity.
The wp_tablet_tool.set_cursor request sets a tool-specific cursor. The zwp_tablet_tool_v2.set_cursor request sets a tool-specific cursor.
This cursor surface may be the same as the mouse cursor, and it may be This cursor surface may be the same as the mouse cursor, and it may be
the same across tools but it is possible to be more fine-grained. For the same across tools but it is possible to be more fine-grained. For
example, a client may set different cursors for the pen and eraser. example, a client may set different cursors for the pen and eraser.
@ -110,12 +110,12 @@
<description summary="controller object for graphic tablet devices"> <description summary="controller object for graphic tablet devices">
An object that provides access to the graphics tablets available on this An object that provides access to the graphics tablets available on this
system. All tablets are associated with a seat, to get access to the system. All tablets are associated with a seat, to get access to the
actual tablets, use wp_tablet_manager.get_tablet_seat. actual tablets, use zwp_tablet_manager_v2.get_tablet_seat.
</description> </description>
<request name="get_tablet_seat"> <request name="get_tablet_seat">
<description summary="get the tablet seat"> <description summary="get the tablet seat">
Get the wp_tablet_seat object for the given seat. This object Get the zwp_tablet_seat_v2 object for the given seat. This object
provides access to all graphics tablets in this seat. provides access to all graphics tablets in this seat.
</description> </description>
<arg name="tablet_seat" type="new_id" interface="zwp_tablet_seat_v2"/> <arg name="tablet_seat" type="new_id" interface="zwp_tablet_seat_v2"/>
@ -124,7 +124,7 @@
<request name="destroy" type="destructor"> <request name="destroy" type="destructor">
<description summary="release the memory for the tablet manager object"> <description summary="release the memory for the tablet manager object">
Destroy the wp_tablet_manager object. Objects created from this Destroy the zwp_tablet_manager_v2 object. Objects created from this
object are unaffected and should be destroyed separately. object are unaffected and should be destroyed separately.
</description> </description>
</request> </request>
@ -134,12 +134,12 @@
<description summary="controller object for graphic tablet devices of a seat"> <description summary="controller object for graphic tablet devices of a seat">
An object that provides access to the graphics tablets available on this An object that provides access to the graphics tablets available on this
seat. After binding to this interface, the compositor sends a set of seat. After binding to this interface, the compositor sends a set of
wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events. zwp_tablet_seat_v2.tablet_added and zwp_tablet_seat_v2.tool_added events.
</description> </description>
<request name="destroy" type="destructor"> <request name="destroy" type="destructor">
<description summary="release the memory for the tablet seat object"> <description summary="release the memory for the tablet seat object">
Destroy the wp_tablet_seat object. Objects created from this Destroy the zwp_tablet_seat_v2 object. Objects created from this
object are unaffected and should be destroyed separately. object are unaffected and should be destroyed separately.
</description> </description>
</request> </request>
@ -149,7 +149,7 @@
This event is sent whenever a new tablet becomes available on this This event is sent whenever a new tablet becomes available on this
seat. This event only provides the object id of the tablet, any seat. This event only provides the object id of the tablet, any
static information about the tablet (device name, vid/pid, etc.) is static information about the tablet (device name, vid/pid, etc.) is
sent through the wp_tablet interface. sent through the zwp_tablet_v2 interface.
</description> </description>
<arg name="id" type="new_id" interface="zwp_tablet_v2" summary="the newly added graphics tablet"/> <arg name="id" type="new_id" interface="zwp_tablet_v2" summary="the newly added graphics tablet"/>
</event> </event>
@ -159,7 +159,7 @@
This event is sent whenever a tool that has not previously been used This event is sent whenever a tool that has not previously been used
with a tablet comes into use. This event only provides the object id with a tablet comes into use. This event only provides the object id
of the tool; any static information about the tool (capabilities, of the tool; any static information about the tool (capabilities,
type, etc.) is sent through the wp_tablet_tool interface. type, etc.) is sent through the zwp_tablet_tool_v2 interface.
</description> </description>
<arg name="id" type="new_id" interface="zwp_tablet_tool_v2" summary="the newly added tablet tool"/> <arg name="id" type="new_id" interface="zwp_tablet_tool_v2" summary="the newly added tablet tool"/>
</event> </event>
@ -168,13 +168,13 @@
<description summary="new pad notification"> <description summary="new pad notification">
This event is sent whenever a new pad is known to the system. Typically, This event is sent whenever a new pad is known to the system. Typically,
pads are physically attached to tablets and a pad_added event is pads are physically attached to tablets and a pad_added event is
sent immediately after the wp_tablet_seat.tablet_added. sent immediately after the zwp_tablet_seat_v2.tablet_added.
However, some standalone pad devices logically attach to tablets at However, some standalone pad devices logically attach to tablets at
runtime, and the client must wait for wp_tablet_pad.enter to know runtime, and the client must wait for zwp_tablet_pad_v2.enter to know
the tablet a pad is attached to. the tablet a pad is attached to.
This event only provides the object id of the pad. All further This event only provides the object id of the pad. All further
features (buttons, strips, rings) are sent through the wp_tablet_pad features (buttons, strips, rings) are sent through the zwp_tablet_pad_v2
interface. interface.
</description> </description>
<arg name="id" type="new_id" interface="zwp_tablet_pad_v2" summary="the newly added pad"/> <arg name="id" type="new_id" interface="zwp_tablet_pad_v2" summary="the newly added pad"/>
@ -184,24 +184,24 @@
<interface name="zwp_tablet_tool_v2" version="2"> <interface name="zwp_tablet_tool_v2" version="2">
<description summary="a physical tablet tool"> <description summary="a physical tablet tool">
An object that represents a physical tool that has been, or is An object that represents a physical tool that has been, or is
currently in use with a tablet in this seat. Each wp_tablet_tool currently in use with a tablet in this seat. Each zwp_tablet_tool_v2
object stays valid until the client destroys it; the compositor object stays valid until the client destroys it; the compositor
reuses the wp_tablet_tool object to indicate that the object's reuses the zwp_tablet_tool_v2 object to indicate that the object's
respective physical tool has come into proximity of a tablet again. respective physical tool has come into proximity of a tablet again.
A wp_tablet_tool object's relation to a physical tool depends on the A zwp_tablet_tool_v2 object's relation to a physical tool depends on the
tablet's ability to report serial numbers. If the tablet supports tablet's ability to report serial numbers. If the tablet supports
this capability, then the object represents a specific physical tool this capability, then the object represents a specific physical tool
and can be identified even when used on multiple tablets. and can be identified even when used on multiple tablets.
A tablet tool has a number of static characteristics, e.g. tool type, A tablet tool has a number of static characteristics, e.g. tool type,
hardware_serial and capabilities. These capabilities are sent in an hardware_serial and capabilities. These capabilities are sent in an
event sequence after the wp_tablet_seat.tool_added event before any event sequence after the zwp_tablet_seat_v2.tool_added event before any
actual events from this tool. This initial event sequence is actual events from this tool. This initial event sequence is
terminated by a wp_tablet_tool.done event. terminated by a zwp_tablet_tool_v2.done event.
Tablet tool events are grouped by wp_tablet_tool.frame events. Tablet tool events are grouped by zwp_tablet_tool_v2.frame events.
Any events received before a wp_tablet_tool.frame event should be Any events received before a zwp_tablet_tool_v2.frame event should be
considered part of the same hardware state change. considered part of the same hardware state change.
</description> </description>
@ -232,9 +232,9 @@
and pending input regions become undefined, and the wl_surface is and pending input regions become undefined, and the wl_surface is
unmapped. unmapped.
This request gives the surface the role of a wp_tablet_tool cursor. A This request gives the surface the role of a zwp_tablet_tool_v2 cursor. A
surface may only ever be used as the cursor surface for one surface may only ever be used as the cursor surface for one
wp_tablet_tool. If the surface already has another role or has zwp_tablet_tool_v2. If the surface already has another role or has
previously been used as cursor surface for a different tool, a previously been used as cursor surface for a different tool, a
protocol error is raised. protocol error is raised.
</description> </description>
@ -278,7 +278,7 @@
the interaction expected from this tool. the interaction expected from this tool.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_tool.done event. zwp_tablet_tool_v2.done event.
</description> </description>
<arg name="tool_type" type="uint" enum="type" summary="the physical tool type"/> <arg name="tool_type" type="uint" enum="type" summary="the physical tool type"/>
</event> </event>
@ -295,11 +295,11 @@
Otherwise, if the tool has no serial number and this event is Otherwise, if the tool has no serial number and this event is
missing, the tool is tied to the tablet it first comes into missing, the tool is tied to the tablet it first comes into
proximity with. Even if the physical tool is used on multiple proximity with. Even if the physical tool is used on multiple
tablets, separate wp_tablet_tool objects will be created, one per tablets, separate zwp_tablet_tool_v2 objects will be created, one per
tablet. tablet.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_tool.done event. zwp_tablet_tool_v2.done event.
</description> </description>
<arg name="hardware_serial_hi" type="uint" summary="the unique serial number of the tool, most significant bits"/> <arg name="hardware_serial_hi" type="uint" summary="the unique serial number of the tool, most significant bits"/>
<arg name="hardware_serial_lo" type="uint" summary="the unique serial number of the tool, least significant bits"/> <arg name="hardware_serial_lo" type="uint" summary="the unique serial number of the tool, least significant bits"/>
@ -316,7 +316,7 @@
Pen (a stylus) is 0x802. Pen (a stylus) is 0x802.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_tool.done event. zwp_tablet_tool_v2.done event.
</description> </description>
<arg name="hardware_id_hi" type="uint" summary="the hardware id, most significant bits"/> <arg name="hardware_id_hi" type="uint" summary="the hardware id, most significant bits"/>
<arg name="hardware_id_lo" type="uint" summary="the hardware id, least significant bits"/> <arg name="hardware_id_lo" type="uint" summary="the hardware id, least significant bits"/>
@ -345,7 +345,7 @@
One event is sent for each extra capability available on this tool. One event is sent for each extra capability available on this tool.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_tool.done event. zwp_tablet_tool_v2.done event.
</description> </description>
<arg name="capability" type="uint" enum="capability" summary="the capability"/> <arg name="capability" type="uint" enum="capability" summary="the capability"/>
</event> </event>
@ -362,17 +362,17 @@
<description summary="tool removed"> <description summary="tool removed">
This event is sent when the tool is removed from the system and will This event is sent when the tool is removed from the system and will
send no further events. Should the physical tool come back into send no further events. Should the physical tool come back into
proximity later, a new wp_tablet_tool object will be created. proximity later, a new zwp_tablet_tool_v2 object will be created.
It is compositor-dependent when a tool is removed. A compositor may It is compositor-dependent when a tool is removed. A compositor may
remove a tool on proximity out, tablet removal or any other reason. remove a tool on proximity out, tablet removal or any other reason.
A compositor may also keep a tool alive until shutdown. A compositor may also keep a tool alive until shutdown.
If the tool is currently in proximity, a proximity_out event will be If the tool is currently in proximity, a proximity_out event will be
sent before the removed event. See wp_tablet_tool.proximity_out for sent before the removed event. See zwp_tablet_tool_v2.proximity_out for
the handling of any buttons logically down. the handling of any buttons logically down.
When this event is received, the client must wp_tablet_tool.destroy When this event is received, the client must zwp_tablet_tool_v2.destroy
the object. the object.
</description> </description>
</event> </event>
@ -402,7 +402,7 @@
When the tablet tool leaves proximity of the tablet, button release When the tablet tool leaves proximity of the tablet, button release
events are sent for each button that was held down at the time of events are sent for each button that was held down at the time of
leaving proximity. These events are sent before the proximity_out leaving proximity. These events are sent before the proximity_out
event but within the same wp_tablet.frame. event but within the same zwp_tablet_v2.frame.
If the tool stays within proximity of the tablet, but the focus If the tool stays within proximity of the tablet, but the focus
changes from one surface to another, a button release event may not changes from one surface to another, a button release event may not
@ -418,8 +418,8 @@
If the tool is already in contact with the tablet when entering the If the tool is already in contact with the tablet when entering the
input region, the client owning said region will receive a input region, the client owning said region will receive a
wp_tablet.proximity_in event, followed by a wp_tablet.down zwp_tablet_v2.proximity_in event, followed by a zwp_tablet_v2.down
event and a wp_tablet.frame event. event and a zwp_tablet_v2.frame event.
Note that this event describes logical contact, not physical Note that this event describes logical contact, not physical
contact. On some devices, a compositor may not consider a tool in contact. On some devices, a compositor may not consider a tool in
@ -438,8 +438,8 @@
If the tablet tool moves out of the input region while in contact If the tablet tool moves out of the input region while in contact
with the surface of the tablet and the compositor does not have an with the surface of the tablet and the compositor does not have an
ongoing grab on the surface, the client owning said region will ongoing grab on the surface, the client owning said region will
receive a wp_tablet.up event, followed by a wp_tablet.proximity_out receive a zwp_tablet_v2.up event, followed by a zwp_tablet_v2.proximity_out
event and a wp_tablet.frame event. If the compositor has an ongoing event and a zwp_tablet_v2.frame event. If the compositor has an ongoing
grab on this device, this event sequence is sent whenever the grab grab on this device, this event sequence is sent whenever the grab
is dismissed in the future. is dismissed in the future.
@ -523,7 +523,7 @@
Clients should choose either value and avoid mixing degrees and Clients should choose either value and avoid mixing degrees and
clicks. The compositor may accumulate values smaller than a logical clicks. The compositor may accumulate values smaller than a logical
click and emulate click events when a certain threshold is met. click and emulate click events when a certain threshold is met.
Thus, wl_tablet_tool.wheel events with non-zero clicks values may Thus, zwp_tablet_tool_v2.wheel events with non-zero clicks values may
have different degrees values. have different degrees values.
</description> </description>
<arg name="degrees" type="fixed" summary="The wheel delta in degrees"/> <arg name="degrees" type="fixed" summary="The wheel delta in degrees"/>
@ -544,7 +544,7 @@
If a button is held down when the tool moves in or out of proximity, If a button is held down when the tool moves in or out of proximity,
button events are generated by the compositor. See button events are generated by the compositor. See
wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for zwp_tablet_tool_v2.proximity_in and zwp_tablet_tool_v2.proximity_out for
details. details.
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
@ -569,14 +569,14 @@
<interface name="zwp_tablet_v2" version="2"> <interface name="zwp_tablet_v2" version="2">
<description summary="graphics tablet device"> <description summary="graphics tablet device">
The wp_tablet interface represents one graphics tablet device. The The zwp_tablet_v2 interface represents one graphics tablet device. The
tablet interface itself does not generate events; all events are tablet interface itself does not generate events; all events are
generated by wp_tablet_tool objects when in proximity above a tablet. generated by zwp_tablet_tool_v2 objects when in proximity above a tablet.
A tablet has a number of static characteristics, e.g. device name and A tablet has a number of static characteristics, e.g. device name and
pid/vid. These capabilities are sent in an event sequence after the pid/vid. These capabilities are sent in an event sequence after the
wp_tablet_seat.tablet_added event. This initial event sequence is zwp_tablet_seat_v2.tablet_added event. This initial event sequence is
terminated by a wp_tablet.done event. terminated by a zwp_tablet_v2.done event.
</description> </description>
<request name="destroy" type="destructor"> <request name="destroy" type="destructor">
@ -592,7 +592,7 @@
If the device has no descriptive name, this event is not sent. If the device has no descriptive name, this event is not sent.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet.done event. zwp_tablet_v2.done event.
</description> </description>
<arg name="name" type="string" summary="the device name"/> <arg name="name" type="string" summary="the device name"/>
</event> </event>
@ -601,16 +601,16 @@
<description summary="tablet device vendor/product id"> <description summary="tablet device vendor/product id">
The vendor and product IDs for the tablet device. The vendor and product IDs for the tablet device.
The interpretation of the id depends on the wp_tablet.bustype. The interpretation of the id depends on the zwp_tablet_v2.bustype.
Prior to version v2 of this protocol, the id was implied to be a USB Prior to version v2 of this protocol, the id was implied to be a USB
vendor and product ID. If no wp_tablet.bustype is sent, the ID vendor and product ID. If no zwp_tablet_v2.bustype is sent, the ID
is to be interpreted as USB vendor and product ID. is to be interpreted as USB vendor and product ID.
If the device has no vendor/product ID, this event is not sent. If the device has no vendor/product ID, this event is not sent.
This can happen for virtual devices or non-USB devices, for instance. This can happen for virtual devices or non-USB devices, for instance.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet.done event. zwp_tablet_v2.done event.
</description> </description>
<arg name="vid" type="uint" summary="vendor id"/> <arg name="vid" type="uint" summary="vendor id"/>
<arg name="pid" type="uint" summary="product id"/> <arg name="pid" type="uint" summary="product id"/>
@ -619,11 +619,11 @@
<event name="path"> <event name="path">
<description summary="path to the device"> <description summary="path to the device">
A system-specific device path that indicates which device is behind A system-specific device path that indicates which device is behind
this wp_tablet. This information may be used to gather additional this zwp_tablet_v2. This information may be used to gather additional
information about the device, e.g. through libwacom. information about the device, e.g. through libwacom.
A device may have more than one device path. If so, multiple A device may have more than one device path. If so, multiple
wp_tablet.path events are sent. A device may be emulated and not zwp_tablet_v2.path events are sent. A device may be emulated and not
have a device path, and in that case this event will not be sent. have a device path, and in that case this event will not be sent.
The format of the path is unspecified, it may be a device node, a The format of the path is unspecified, it may be a device node, a
@ -631,7 +631,7 @@
identify the string provided. identify the string provided.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet.done event. zwp_tablet_v2.done event.
</description> </description>
<arg name="path" type="string" summary="path to local device"/> <arg name="path" type="string" summary="path to local device"/>
</event> </event>
@ -650,7 +650,7 @@
Sent when the tablet has been removed from the system. When a tablet Sent when the tablet has been removed from the system. When a tablet
is removed, some tools may be removed. is removed, some tools may be removed.
When this event is received, the client must wp_tablet.destroy When this event is received, the client must zwp_tablet_v2.destroy
the object. the object.
</description> </description>
</event> </event>
@ -677,7 +677,7 @@
queried, this event is not sent. queried, this event is not sent.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet.done event. zwp_tablet_v2.done event.
</description> </description>
<arg name="bustype" type="uint" enum="bustype" summary="bus type"/> <arg name="bustype" type="uint" enum="bustype" summary="bus type"/>
</event> </event>
@ -688,7 +688,7 @@
A circular interaction area, such as the touch ring on the Wacom Intuos A circular interaction area, such as the touch ring on the Wacom Intuos
Pro series tablets. Pro series tablets.
Events on a ring are logically grouped by the wl_tablet_pad_ring.frame Events on a ring are logically grouped by the zwp_tablet_pad_ring_v2.frame
event. event.
</description> </description>
@ -696,9 +696,9 @@
<description summary="set compositor feedback"> <description summary="set compositor feedback">
Request that the compositor use the provided feedback string Request that the compositor use the provided feedback string
associated with this ring. This request should be issued immediately associated with this ring. This request should be issued immediately
after a wp_tablet_pad_group.mode_switch event from the corresponding after a zwp_tablet_pad_group_v2.mode_switch event from the corresponding
group is received, or whenever the ring is mapped to a different group is received, or whenever the ring is mapped to a different
action. See wp_tablet_pad_group.mode_switch for more details. action. See zwp_tablet_pad_group_v2.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for Clients are encouraged to provide context-aware descriptions for
the actions associated with the ring; compositors may use this the actions associated with the ring; compositors may use this
@ -710,7 +710,7 @@
internationalization rules apply. internationalization rules apply.
The serial argument will be that of the last The serial argument will be that of the last
wp_tablet_pad_group.mode_switch event received for the group of this zwp_tablet_pad_group_v2.mode_switch event received for the group of this
ring. Requests providing other serials than the most recent one will be ring. Requests providing other serials than the most recent one will be
ignored. ignored.
</description> </description>
@ -739,11 +739,11 @@
Source information for ring events. Source information for ring events.
This event does not occur on its own. It is sent before a This event does not occur on its own. It is sent before a
wp_tablet_pad_ring.frame event and carries the source information zwp_tablet_pad_ring_v2.frame event and carries the source information
for all events within that frame. for all events within that frame.
The source specifies how this event was generated. If the source is The source specifies how this event was generated. If the source is
wp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event zwp_tablet_pad_ring_v2.source.finger, a zwp_tablet_pad_ring_v2.stop event
will be sent when the user lifts the finger off the device. will be sent when the user lifts the finger off the device.
This event is optional. If the source is unknown for an interaction, This event is optional. If the source is unknown for an interaction,
@ -766,13 +766,13 @@
<description summary="interaction stopped"> <description summary="interaction stopped">
Stop notification for ring events. Stop notification for ring events.
For some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop For some zwp_tablet_pad_ring_v2.source types, a zwp_tablet_pad_ring_v2.stop
event is sent to notify a client that the interaction with the ring event is sent to notify a client that the interaction with the ring
has terminated. This enables the client to implement kinetic scrolling. has terminated. This enables the client to implement kinetic scrolling.
See the wp_tablet_pad_ring.source documentation for information on See the zwp_tablet_pad_ring_v2.source documentation for information on
when this event may be generated. when this event may be generated.
Any wp_tablet_pad_ring.angle events with the same source after this Any zwp_tablet_pad_ring_v2.angle events with the same source after this
event should be considered as the start of a new interaction. event should be considered as the start of a new interaction.
</description> </description>
</event> </event>
@ -783,13 +783,13 @@
together. A client is expected to accumulate the data in all events together. A client is expected to accumulate the data in all events
within the frame before proceeding. within the frame before proceeding.
All wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong All zwp_tablet_pad_ring_v2 events before a zwp_tablet_pad_ring_v2.frame event belong
logically together. For example, on termination of a finger interaction logically together. For example, on termination of a finger interaction
on a ring the compositor will send a wp_tablet_pad_ring.source event, on a ring the compositor will send a zwp_tablet_pad_ring_v2.source event,
a wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event. a zwp_tablet_pad_ring_v2.stop event and a zwp_tablet_pad_ring_v2.frame event.
A wp_tablet_pad_ring.frame event is sent for every logical event A zwp_tablet_pad_ring_v2.frame event is sent for every logical event
group, even if the group only contains a single wp_tablet_pad_ring group, even if the group only contains a single zwp_tablet_pad_ring_v2
event. Specifically, a client may get a sequence: angle, frame, event. Specifically, a client may get a sequence: angle, frame,
angle, frame, etc. angle, frame, etc.
</description> </description>
@ -802,7 +802,7 @@
A linear interaction area, such as the strips found in Wacom Cintiq A linear interaction area, such as the strips found in Wacom Cintiq
models. models.
Events on a strip are logically grouped by the wl_tablet_pad_strip.frame Events on a strip are logically grouped by the zwp_tablet_pad_strip_v2.frame
event. event.
</description> </description>
@ -810,9 +810,9 @@
<description summary="set compositor feedback"> <description summary="set compositor feedback">
Requests the compositor to use the provided feedback string Requests the compositor to use the provided feedback string
associated with this strip. This request should be issued immediately associated with this strip. This request should be issued immediately
after a wp_tablet_pad_group.mode_switch event from the corresponding after a zwp_tablet_pad_group_v2.mode_switch event from the corresponding
group is received, or whenever the strip is mapped to a different group is received, or whenever the strip is mapped to a different
action. See wp_tablet_pad_group.mode_switch for more details. action. See zwp_tablet_pad_group_v2.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for Clients are encouraged to provide context-aware descriptions for
the actions associated with the strip, and compositors may use this the actions associated with the strip, and compositors may use this
@ -824,7 +824,7 @@
internationalization rules apply. internationalization rules apply.
The serial argument will be that of the last The serial argument will be that of the last
wp_tablet_pad_group.mode_switch event received for the group of this zwp_tablet_pad_group_v2.mode_switch event received for the group of this
strip. Requests providing other serials than the most recent one will be strip. Requests providing other serials than the most recent one will be
ignored. ignored.
</description> </description>
@ -853,11 +853,11 @@
Source information for strip events. Source information for strip events.
This event does not occur on its own. It is sent before a This event does not occur on its own. It is sent before a
wp_tablet_pad_strip.frame event and carries the source information zwp_tablet_pad_strip_v2.frame event and carries the source information
for all events within that frame. for all events within that frame.
The source specifies how this event was generated. If the source is The source specifies how this event was generated. If the source is
wp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event zwp_tablet_pad_strip_v2.source.finger, a zwp_tablet_pad_strip_v2.stop event
will be sent when the user lifts their finger off the device. will be sent when the user lifts their finger off the device.
This event is optional. If the source is unknown for an interaction, This event is optional. If the source is unknown for an interaction,
@ -881,13 +881,13 @@
<description summary="interaction stopped"> <description summary="interaction stopped">
Stop notification for strip events. Stop notification for strip events.
For some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop For some zwp_tablet_pad_strip_v2.source types, a zwp_tablet_pad_strip_v2.stop
event is sent to notify a client that the interaction with the strip event is sent to notify a client that the interaction with the strip
has terminated. This enables the client to implement kinetic has terminated. This enables the client to implement kinetic
scrolling. See the wp_tablet_pad_strip.source documentation for scrolling. See the zwp_tablet_pad_strip_v2.source documentation for
information on when this event may be generated. information on when this event may be generated.
Any wp_tablet_pad_strip.position events with the same source after this Any zwp_tablet_pad_strip_v2.position events with the same source after this
event should be considered as the start of a new interaction. event should be considered as the start of a new interaction.
</description> </description>
</event> </event>
@ -898,14 +898,14 @@
hardware strip event. A client is expected to accumulate the data hardware strip event. A client is expected to accumulate the data
in all events within the frame before proceeding. in all events within the frame before proceeding.
All wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong All zwp_tablet_pad_strip_v2 events before a zwp_tablet_pad_strip_v2.frame event belong
logically together. For example, on termination of a finger interaction logically together. For example, on termination of a finger interaction
on a strip the compositor will send a wp_tablet_pad_strip.source event, on a strip the compositor will send a zwp_tablet_pad_strip_v2.source event,
a wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame a zwp_tablet_pad_strip_v2.stop event and a zwp_tablet_pad_strip_v2.frame
event. event.
A wp_tablet_pad_strip.frame event is sent for every logical event A zwp_tablet_pad_strip_v2.frame event is sent for every logical event
group, even if the group only contains a single wp_tablet_pad_strip group, even if the group only contains a single zwp_tablet_pad_strip_v2
event. Specifically, a client may get a sequence: position, frame, event. Specifically, a client may get a sequence: position, frame,
position, frame, etc. position, frame, etc.
</description> </description>
@ -922,40 +922,40 @@
change on the fly. change on the fly.
Pad groups will announce their features during pad initialization. Between Pad groups will announce their features during pad initialization. Between
the corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the the corresponding zwp_tablet_pad_v2.group event and zwp_tablet_pad_group_v2.done, the
pad group will announce the buttons, rings and strips contained in it, pad group will announce the buttons, rings and strips contained in it,
plus the number of supported modes. plus the number of supported modes.
Modes are a mechanism to allow multiple groups of actions for every element Modes are a mechanism to allow multiple groups of actions for every element
in the pad group. The number of groups and available modes in each is in the pad group. The number of groups and available modes in each is
persistent across device plugs. The current mode is user-switchable, it persistent across device plugs. The current mode is user-switchable, it
will be announced through the wp_tablet_pad_group.mode_switch event both will be announced through the zwp_tablet_pad_group_v2.mode_switch event both
whenever it is switched, and after wp_tablet_pad.enter. whenever it is switched, and after zwp_tablet_pad_v2.enter.
The current mode logically applies to all elements in the pad group, The current mode logically applies to all elements in the pad group,
although it is at clients' discretion whether to actually perform different although it is at clients' discretion whether to actually perform different
actions, and/or issue the respective .set_feedback requests to notify the actions, and/or issue the respective .set_feedback requests to notify the
compositor. See the wp_tablet_pad_group.mode_switch event for more details. compositor. See the zwp_tablet_pad_group_v2.mode_switch event for more details.
</description> </description>
<request name="destroy" type="destructor"> <request name="destroy" type="destructor">
<description summary="destroy the pad object"> <description summary="destroy the pad object">
Destroy the wp_tablet_pad_group object. Objects created from this object Destroy the zwp_tablet_pad_group_v2 object. Objects created from this object
are unaffected and should be destroyed separately. are unaffected and should be destroyed separately.
</description> </description>
</request> </request>
<event name="buttons"> <event name="buttons">
<description summary="buttons announced"> <description summary="buttons announced">
Sent on wp_tablet_pad_group initialization to announce the available Sent on zwp_tablet_pad_group_v2 initialization to announce the available
buttons in the group. Button indices start at 0, a button may only be buttons in the group. Button indices start at 0, a button may only be
in one group at a time. in one group at a time.
This event is first sent in the initial burst of events before the This event is first sent in the initial burst of events before the
wp_tablet_pad_group.done event. zwp_tablet_pad_group_v2.done event.
Some buttons are reserved by the compositor. These buttons may not be Some buttons are reserved by the compositor. These buttons may not be
assigned to any wp_tablet_pad_group. Compositors may broadcast this assigned to any zwp_tablet_pad_group_v2. Compositors may broadcast this
event in the case of changes to the mapping of these reserved buttons. event in the case of changes to the mapping of these reserved buttons.
If the compositor happens to reserve all buttons in a group, this event If the compositor happens to reserve all buttons in a group, this event
will be sent with an empty array. will be sent with an empty array.
@ -965,39 +965,39 @@
<event name="ring"> <event name="ring">
<description summary="ring announced"> <description summary="ring announced">
Sent on wp_tablet_pad_group initialization to announce available rings. Sent on zwp_tablet_pad_group_v2 initialization to announce available rings.
One event is sent for each ring available on this pad group. One event is sent for each ring available on this pad group.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_pad_group.done event. zwp_tablet_pad_group_v2.done event.
</description> </description>
<arg name="ring" type="new_id" interface="zwp_tablet_pad_ring_v2"/> <arg name="ring" type="new_id" interface="zwp_tablet_pad_ring_v2"/>
</event> </event>
<event name="strip"> <event name="strip">
<description summary="strip announced"> <description summary="strip announced">
Sent on wp_tablet_pad initialization to announce available strips. Sent on zwp_tablet_pad_v2 initialization to announce available strips.
One event is sent for each strip available on this pad group. One event is sent for each strip available on this pad group.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_pad_group.done event. zwp_tablet_pad_group_v2.done event.
</description> </description>
<arg name="strip" type="new_id" interface="zwp_tablet_pad_strip_v2"/> <arg name="strip" type="new_id" interface="zwp_tablet_pad_strip_v2"/>
</event> </event>
<event name="modes"> <event name="modes">
<description summary="mode-switch ability announced"> <description summary="mode-switch ability announced">
Sent on wp_tablet_pad_group initialization to announce that the pad Sent on zwp_tablet_pad_group_v2 initialization to announce that the pad
group may switch between modes. A client may use a mode to store a group may switch between modes. A client may use a mode to store a
specific configuration for buttons, rings and strips and use the specific configuration for buttons, rings and strips and use the
wl_tablet_pad_group.mode_switch event to toggle between these zwp_tablet_pad_group_v2.mode_switch event to toggle between these
configurations. Mode indices start at 0. configurations. Mode indices start at 0.
Switching modes is compositor-dependent. See the Switching modes is compositor-dependent. See the
wp_tablet_pad_group.mode_switch event for more details. zwp_tablet_pad_group_v2.mode_switch event for more details.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_pad_group.done event. This event is only sent when more than zwp_tablet_pad_group_v2.done event. This event is only sent when
more than one mode is available. more than one mode is available.
</description> </description>
<arg name="modes" type="uint" summary="the number of modes"/> <arg name="modes" type="uint" summary="the number of modes"/>
@ -1029,18 +1029,18 @@
Intuos Pro, the button inside the ring may be assigned to switch Intuos Pro, the button inside the ring may be assigned to switch
between modes. between modes.
The compositor will also send this event after wp_tablet_pad.enter on The compositor will also send this event after zwp_tablet_pad_v2.enter on
each group in order to notify of the current mode. Groups that only each group in order to notify of the current mode. Groups that only
feature one mode will use mode=0 when emitting this event. feature one mode will use mode=0 when emitting this event.
If a button action in the new mode differs from the action in the If a button action in the new mode differs from the action in the
previous mode, the client should immediately issue a previous mode, the client should immediately issue a
wp_tablet_pad.set_feedback request for each changed button. zwp_tablet_pad_v2.set_feedback request for each changed button.
If a ring, strip or dial action in the new mode differs from the action If a ring, strip or dial action in the new mode differs from the action
in the previous mode, the client should immediately issue a in the previous mode, the client should immediately issue a
wp_tablet_ring.set_feedback, wp_tablet_strip.set_feedback or zwp_tablet_ring_v2.set_feedback, zwp_tablet_strip_v2.set_feedback or
wp_tablet_dial.set_feedback request for each changed ring, strip or dial. zwp_tablet_dial_v2.set_feedback request for each changed ring, strip or dial.
</description> </description>
<arg name="time" type="uint" summary="the time of the event with millisecond granularity"/> <arg name="time" type="uint" summary="the time of the event with millisecond granularity"/>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
@ -1051,11 +1051,11 @@
<event name="dial" since="2"> <event name="dial" since="2">
<description summary="dial announced"> <description summary="dial announced">
Sent on wp_tablet_pad initialization to announce available dials. Sent on zwp_tablet_pad_v2 initialization to announce available dials.
One event is sent for each dial available on this pad group. One event is sent for each dial available on this pad group.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_pad_group.done event. zwp_tablet_pad_group_v2.done event.
</description> </description>
<arg name="dial" type="new_id" interface="zwp_tablet_pad_dial_v2"/> <arg name="dial" type="new_id" interface="zwp_tablet_pad_dial_v2"/>
</event> </event>
@ -1073,14 +1073,14 @@
A pad device has a number of static characteristics, e.g. the number A pad device has a number of static characteristics, e.g. the number
of rings. These capabilities are sent in an event sequence after the of rings. These capabilities are sent in an event sequence after the
wp_tablet_seat.pad_added event before any actual events from this pad. zwp_tablet_seat_v2.pad_added event before any actual events from this pad.
This initial event sequence is terminated by a wp_tablet_pad.done This initial event sequence is terminated by a zwp_tablet_pad_v2.done
event. event.
All pad features (buttons, rings, strips and dials) are logically divided into All pad features (buttons, rings, strips and dials) are logically divided into
groups and all pads have at least one group. The available groups are groups and all pads have at least one group. The available groups are
notified through the wp_tablet_pad.group event; the compositor will notified through the zwp_tablet_pad_v2.group event; the compositor will
emit one event per group before emitting wp_tablet_pad.done. emit one event per group before emitting zwp_tablet_pad_v2.done.
Groups may have multiple modes. Modes allow clients to map multiple Groups may have multiple modes. Modes allow clients to map multiple
actions to a single pad feature. Only one mode can be active per group, actions to a single pad feature. Only one mode can be active per group,
@ -1091,9 +1091,9 @@
<description summary="set compositor feedback"> <description summary="set compositor feedback">
Requests the compositor to use the provided feedback string Requests the compositor to use the provided feedback string
associated with this button. This request should be issued immediately associated with this button. This request should be issued immediately
after a wp_tablet_pad_group.mode_switch event from the corresponding after a zwp_tablet_pad_group_v2.mode_switch event from the corresponding
group is received, or whenever a button is mapped to a different group is received, or whenever a button is mapped to a different
action. See wp_tablet_pad_group.mode_switch for more details. action. See zwp_tablet_pad_group_v2.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for Clients are encouraged to provide context-aware descriptions for
the actions associated with each button, and compositors may use the actions associated with each button, and compositors may use
@ -1102,7 +1102,7 @@
Button indices start at 0. Setting the feedback string on a button Button indices start at 0. Setting the feedback string on a button
that is reserved by the compositor (i.e. not belonging to any that is reserved by the compositor (i.e. not belonging to any
wp_tablet_pad_group) does not generate an error but the compositor zwp_tablet_pad_group_v2) does not generate an error but the compositor
is free to ignore the request. is free to ignore the request.
The provided string 'description' is a UTF-8 encoded string to be The provided string 'description' is a UTF-8 encoded string to be
@ -1110,7 +1110,7 @@
internationalization rules apply. internationalization rules apply.
The serial argument will be that of the last The serial argument will be that of the last
wp_tablet_pad_group.mode_switch event received for the group of this zwp_tablet_pad_group_v2.mode_switch event received for the group of this
button. Requests providing other serials than the most recent one will button. Requests providing other serials than the most recent one will
be ignored. be ignored.
</description> </description>
@ -1121,18 +1121,18 @@
<request name="destroy" type="destructor"> <request name="destroy" type="destructor">
<description summary="destroy the pad object"> <description summary="destroy the pad object">
Destroy the wp_tablet_pad object. Objects created from this object Destroy the zwp_tablet_pad_v2 object. Objects created from this object
are unaffected and should be destroyed separately. are unaffected and should be destroyed separately.
</description> </description>
</request> </request>
<event name="group"> <event name="group">
<description summary="group announced"> <description summary="group announced">
Sent on wp_tablet_pad initialization to announce available groups. Sent on zwp_tablet_pad_v2 initialization to announce available groups.
One event is sent for each pad group available. One event is sent for each pad group available.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_pad.done event. At least one group will be announced. zwp_tablet_pad_v2.done event. At least one group will be announced.
</description> </description>
<arg name="pad_group" type="new_id" interface="zwp_tablet_pad_group_v2"/> <arg name="pad_group" type="new_id" interface="zwp_tablet_pad_group_v2"/>
</event> </event>
@ -1140,7 +1140,7 @@
<event name="path"> <event name="path">
<description summary="path to the device"> <description summary="path to the device">
A system-specific device path that indicates which device is behind A system-specific device path that indicates which device is behind
this wp_tablet_pad. This information may be used to gather additional this zwp_tablet_pad_v2. This information may be used to gather additional
information about the device, e.g. through libwacom. information about the device, e.g. through libwacom.
The format of the path is unspecified, it may be a device node, a The format of the path is unspecified, it may be a device node, a
@ -1148,18 +1148,18 @@
identify the string provided. identify the string provided.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_pad.done event. zwp_tablet_pad_v2.done event.
</description> </description>
<arg name="path" type="string" summary="path to local device"/> <arg name="path" type="string" summary="path to local device"/>
</event> </event>
<event name="buttons"> <event name="buttons">
<description summary="buttons announced"> <description summary="buttons announced">
Sent on wp_tablet_pad initialization to announce the available Sent on zwp_tablet_pad_v2 initialization to announce the available
buttons. buttons.
This event is sent in the initial burst of events before the This event is sent in the initial burst of events before the
wp_tablet_pad.done event. This event is only sent when at least one zwp_tablet_pad_v2.done event. This event is only sent when at least one
button is available. button is available.
</description> </description>
<arg name="buttons" type="uint" summary="the number of buttons"/> <arg name="buttons" type="uint" summary="the number of buttons"/>
@ -1215,7 +1215,7 @@
is removed its pad(s) will be removed too. is removed its pad(s) will be removed too.
When this event is received, the client must destroy all rings, strips When this event is received, the client must destroy all rings, strips
and groups that were offered by this pad, and issue wp_tablet_pad.destroy and groups that were offered by this pad, and issue zwp_tablet_pad_v2.destroy
the pad itself. the pad itself.
</description> </description>
</event> </event>
@ -1225,7 +1225,7 @@
<description summary="pad dial"> <description summary="pad dial">
A rotary control, e.g. a dial or a wheel. A rotary control, e.g. a dial or a wheel.
Events on a dial are logically grouped by the wl_tablet_pad_dial.frame Events on a dial are logically grouped by the zwp_tablet_pad_dial_v2.frame
event. event.
</description> </description>
@ -1233,9 +1233,9 @@
<description summary="set compositor feedback"> <description summary="set compositor feedback">
Requests the compositor to use the provided feedback string Requests the compositor to use the provided feedback string
associated with this dial. This request should be issued immediately associated with this dial. This request should be issued immediately
after a wp_tablet_pad_group.mode_switch event from the corresponding after a zwp_tablet_pad_group_v2.mode_switch event from the corresponding
group is received, or whenever the dial is mapped to a different group is received, or whenever the dial is mapped to a different
action. See wp_tablet_pad_group.mode_switch for more details. action. See zwp_tablet_pad_group_v2.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for Clients are encouraged to provide context-aware descriptions for
the actions associated with the dial, and compositors may use this the actions associated with the dial, and compositors may use this
@ -1247,7 +1247,7 @@
internationalization rules apply. internationalization rules apply.
The serial argument will be that of the last The serial argument will be that of the last
wp_tablet_pad_group.mode_switch event received for the group of this zwp_tablet_pad_group_v2.mode_switch event received for the group of this
dial. Requests providing other serials than the most recent one will be dial. Requests providing other serials than the most recent one will be
ignored. ignored.
</description> </description>
@ -1283,11 +1283,11 @@
hardware dial event. A client is expected to accumulate the data hardware dial event. A client is expected to accumulate the data
in all events within the frame before proceeding. in all events within the frame before proceeding.
All wp_tablet_pad_dial events before a wp_tablet_pad_dial.frame event belong All zwp_tablet_pad_dial_v2 events before a zwp_tablet_pad_dial_v2.frame event belong
logically together. logically together.
A wp_tablet_pad_dial.frame event is sent for every logical event A zwp_tablet_pad_dial_v2.frame event is sent for every logical event
group, even if the group only contains a single wp_tablet_pad_dial group, even if the group only contains a single zwp_tablet_pad_dial_v2
event. Specifically, a client may get a sequence: delta, frame, event. Specifically, a client may get a sequence: delta, frame,
delta, frame, etc. delta, frame, etc.
</description> </description>

View file

@ -75,17 +75,16 @@
<request name="get_xdg_surface"> <request name="get_xdg_surface">
<description summary="create a shell surface from a surface"> <description summary="create a shell surface from a surface">
This creates an xdg_surface for the given surface. While xdg_surface
itself is not a role, the corresponding surface may only be assigned
a role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is
illegal to create an xdg_surface for a wl_surface which already has an
assigned role and this will result in a role error.
This creates an xdg_surface for the given surface. An xdg_surface is This creates an xdg_surface for the given surface. An xdg_surface is
used as basis to define a role to a given surface, such as xdg_toplevel used as basis to define a role to a given surface, such as xdg_toplevel
or xdg_popup. It also manages functionality shared between xdg_surface or xdg_popup. It also manages functionality shared between xdg_surface
based surface roles. based surface roles.
While xdg_surface itself is not a role, the corresponding surface may
only be assigned a role extending xdg_surface, such as xdg_toplevel or
xdg_popup. It is illegal to create an xdg_surface for a wl_surface which
already has anassigned role and this will result in a role error.
See the documentation of xdg_surface for more details about what an See the documentation of xdg_surface for more details about what an
xdg_surface is and how it is used. xdg_surface is and how it is used.
</description> </description>
@ -201,14 +200,14 @@
<request name="set_anchor"> <request name="set_anchor">
<description summary="set anchor rectangle anchor"> <description summary="set anchor rectangle anchor">
Defines the anchor point for the anchor rectangle. The specified anchor Defines the anchor point for the anchor rectangle. The specified anchor
is used derive an anchor point that the child surface will be is used to derive an anchor point that the child surface will be
positioned relative to. If a corner anchor is set (e.g. 'top_left' or 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; 'bottom_right'), the anchor point will be at the specified corner;
otherwise, the derived anchor point will be centered on the specified 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. edge, or in the center of the anchor rectangle if no edge is specified.
</description> </description>
<arg name="anchor" type="uint" enum="anchor" <arg name="anchor" type="uint" enum="anchor"
summary="anchor"/> summary="anchor point"/>
</request> </request>
<enum name="gravity"> <enum name="gravity">
@ -380,7 +379,7 @@
</request> </request>
<request name="set_parent_size" since="3"> <request name="set_parent_size" since="3">
<description summary=""> <description summary="set parent size">
Set the parent window geometry the compositor should use when Set the parent window geometry the compositor should use when
positioning the popup. The compositor may use this information to positioning the popup. The compositor may use this information to
determine the future state the popup should be constrained using. If determine the future state the popup should be constrained using. If
@ -505,8 +504,8 @@
xdg_popup is and how it is used. xdg_popup is and how it is used.
</description> </description>
<arg name="id" type="new_id" interface="xdg_popup"/> <arg name="id" type="new_id" interface="xdg_popup"/>
<arg name="parent" type="object" interface="xdg_surface" allow-null="true"/> <arg name="parent" type="object" interface="xdg_surface" allow-null="true" summary="parent surface for this popup"/>
<arg name="positioner" type="object" interface="xdg_positioner"/> <arg name="positioner" type="object" interface="xdg_positioner" summary="positioner for this popup"/>
</request> </request>
<request name="set_window_geometry"> <request name="set_window_geometry">
@ -514,7 +513,10 @@
The window geometry of a surface is its "visible bounds" from the The window geometry of a surface is its "visible bounds" from the
user's perspective. Client-side decorations often have invisible user's perspective. Client-side decorations often have invisible
portions like drop-shadows which should be ignored for the portions like drop-shadows which should be ignored for the
purposes of aligning, placing and constraining windows. purposes of aligning, placing and constraining windows. Note that
in some situations, compositors may clip rendering to the window
geometry, so the client should avoid putting functional elements
outside of it.
The window geometry is double-buffered state, see wl_surface.commit. The window geometry is double-buffered state, see wl_surface.commit.
@ -549,10 +551,10 @@
greater than zero. Setting an invalid size will raise an greater than zero. Setting an invalid size will raise an
invalid_size error. invalid_size error.
</description> </description>
<arg name="x" type="int"/> <arg name="x" type="int" summary="x coordinate of the top-left corner of the window inside this surface"/>
<arg name="y" type="int"/> <arg name="y" type="int" summary="y coordinate of the top-left corner of the window inside this surface"/>
<arg name="width" type="int"/> <arg name="width" type="int" summary="width of the window"/>
<arg name="height" type="int"/> <arg name="height" type="int" summary="height of the window"/>
</request> </request>
<request name="ack_configure"> <request name="ack_configure">
@ -625,7 +627,7 @@
id, and well as trigger user interactive operations such as interactive id, and well as trigger user interactive operations such as interactive
resize and move. resize and move.
A xdg_toplevel by default is responsible for providing the full intended An xdg_toplevel by default is responsible for providing the full intended
visual representation of the toplevel, which depending on the window visual representation of the toplevel, which depending on the window
state, may mean things like a title bar, window controls and drop shadow. state, may mean things like a title bar, window controls and drop shadow.
@ -681,7 +683,7 @@
descendants, and the parent must be different from the child toplevel, descendants, and the parent must be different from the child toplevel,
otherwise the invalid_parent protocol error is raised. otherwise the invalid_parent protocol error is raised.
</description> </description>
<arg name="parent" type="object" interface="xdg_toplevel" allow-null="true"/> <arg name="parent" type="object" interface="xdg_toplevel" allow-null="true" summary="parent surface for this surface"/>
</request> </request>
<request name="set_title"> <request name="set_title">
@ -694,7 +696,7 @@
The string must be encoded in UTF-8. The string must be encoded in UTF-8.
</description> </description>
<arg name="title" type="string"/> <arg name="title" type="string" summary="title of the surface"/>
</request> </request>
<request name="set_app_id"> <request name="set_app_id">
@ -723,7 +725,7 @@
[0] https://standards.freedesktop.org/desktop-entry-spec/ [0] https://standards.freedesktop.org/desktop-entry-spec/
</description> </description>
<arg name="app_id" type="string"/> <arg name="app_id" type="string" summary="application identifier surface belongs to"/>
</request> </request>
<request name="show_window_menu"> <request name="show_window_menu">
@ -936,7 +938,7 @@
</description> </description>
</entry> </entry>
<entry name="constrained_bottom" value="13" since="7"> <entry name="constrained_bottom" value="13" since="7">
<description summary="the surfaces bottom edge is tiled"> <description summary="the surfaces bottom edge is constrained">
The bottom edge of the window is currently constrained, meaning it The bottom edge of the window is currently constrained, meaning it
shouldn't attempt to resize from that edge. It can for example mean shouldn't attempt to resize from that edge. It can for example mean
it's tiled next to a monitor edge on the constrained side of the it's tiled next to a monitor edge on the constrained side of the
@ -978,11 +980,11 @@
a surface is illegal and will result in an invalid_size error. a surface is illegal and will result in an invalid_size error.
The width and height must be greater than or equal to zero. Using The width and height must be greater than or equal to zero. Using
strictly negative values for width or height will result in a strictly negative values for width or height will result in an
invalid_size error. invalid_size error.
</description> </description>
<arg name="width" type="int"/> <arg name="width" type="int" summary="maximum width of the window"/>
<arg name="height" type="int"/> <arg name="height" type="int" summary="maximum height of the window"/>
</request> </request>
<request name="set_min_size"> <request name="set_min_size">
@ -1018,11 +1020,11 @@
a surface is illegal and will result in an invalid_size error. a surface is illegal and will result in an invalid_size error.
The width and height must be greater than or equal to zero. Using The width and height must be greater than or equal to zero. Using
strictly negative values for width and height will result in a strictly negative values for width and height will result in an
invalid_size error. invalid_size error.
</description> </description>
<arg name="width" type="int"/> <arg name="width" type="int" summary="minimum width of the window"/>
<arg name="height" type="int"/> <arg name="height" type="int" summary="minimum height of the window"/>
</request> </request>
<request name="set_maximized"> <request name="set_maximized">
@ -1092,7 +1094,7 @@
If the surface doesn't cover the whole output, the compositor will If the surface doesn't cover the whole output, the compositor will
position the surface in the center of the output and compensate with position the surface in the center of the output and compensate with
with border fill covering the rest of the output. The content of the border fill covering the rest of the output. The content of the
border fill is undefined, but should be assumed to be in some way that border fill is undefined, but should be assumed to be in some way that
attempts to blend into the surrounding area (e.g. solid black). attempts to blend into the surrounding area (e.g. solid black).
@ -1101,7 +1103,7 @@
up of subsurfaces, popups or similarly coupled surfaces) are not up of subsurfaces, popups or similarly coupled surfaces) are not
visible below the fullscreened surface. visible below the fullscreened surface.
</description> </description>
<arg name="output" type="object" interface="wl_output" allow-null="true"/> <arg name="output" type="object" interface="wl_output" allow-null="true" summary="preferred output to place surface on"/>
</request> </request>
<request name="unset_fullscreen"> <request name="unset_fullscreen">
@ -1161,9 +1163,9 @@
Clients must send an ack_configure in response to this event. See Clients must send an ack_configure in response to this event. See
xdg_surface.configure and xdg_surface.ack_configure for details. xdg_surface.configure and xdg_surface.ack_configure for details.
</description> </description>
<arg name="width" type="int"/> <arg name="width" type="int" summary="suggested width of window"/>
<arg name="height" type="int"/> <arg name="height" type="int" summary="suggested height of window"/>
<arg name="states" type="array"/> <arg name="states" type="array" summary="suggested states of the window"/>
</event> </event>
<event name="close"> <event name="close">
@ -1199,8 +1201,8 @@
xdg_toplevel.configure_bounds will be sent, followed by xdg_toplevel.configure_bounds will be sent, followed by
xdg_toplevel.configure and xdg_surface.configure. xdg_toplevel.configure and xdg_surface.configure.
</description> </description>
<arg name="width" type="int"/> <arg name="width" type="int" summary="suggested maximum width of surface"/>
<arg name="height" type="int"/> <arg name="height" type="int" summary="suggested maximum height of surface"/>
</event> </event>
<!-- Version 5 additions --> <!-- Version 5 additions -->

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/

View file

@ -31,9 +31,14 @@
<description summary="color management protocol"> <description summary="color management protocol">
The aim of the color management extension is to allow clients to know The aim of the color management extension is to allow clients to know
the color properties of outputs, and to tell the compositor about the color the color properties of outputs, and to tell the compositor about the color
properties of their content on surfaces. Doing this enables a compositor properties of their content on surfaces. All surface contents must be
to perform automatic color management of content for different outputs readily intended for some display, but not necessarily for the display at
according to how content is intended to look like. hand. Doing this enables a compositor to perform automatic color management
of content for different outputs according to how content is intended to
look like.
For an introduction, see the section "Color management" in the Wayland
documentation at https://wayland.freedesktop.org/docs/html/ .
The color properties are represented as an image description object which The color properties are represented as an image description object which
is immutable after it has been created. A wl_output always has an is immutable after it has been created. A wl_output always has an
@ -43,16 +48,17 @@
description on a wl_surface to denote the color characteristics of the description on a wl_surface to denote the color characteristics of the
surface contents. surface contents.
An image description includes SDR and HDR colorimetry and encoding, HDR An image description essentially defines a display and (indirectly) its
metadata, and viewing environment parameters. An image description does viewing environment. An image description includes SDR and HDR colorimetry
not include the properties set through color-representation extension. and encoding, HDR metadata, and some parameters related to the viewing
It is expected that the color-representation extension is used in environment. An image description does not include the properties set
conjunction with the color management extension when necessary, through color-representation extension. It is expected that the
particularly with the YUV family of pixel formats. color-representation extension is used in conjunction with the
color-management extension when necessary, particularly with the YUV family
of pixel formats.
Recommendation ITU-T H.273 The normative appendix for this protocol is in the appendix.md file beside
"Coding-independent code points for video signal type identification" this XML file.
shall be referred to as simply H.273 here.
The color-and-hdr repository The color-and-hdr repository
(https://gitlab.freedesktop.org/pq/color-and-hdr) contains (https://gitlab.freedesktop.org/pq/color-and-hdr) contains
@ -71,7 +77,7 @@
only be done by creating a new major version of the extension. only be done by creating a new major version of the extension.
</description> </description>
<interface name="wp_color_manager_v1" version="1"> <interface name="wp_color_manager_v1" version="2">
<description summary="color manager singleton"> <description summary="color manager singleton">
A singleton global interface used for getting color management extensions A singleton global interface used for getting color management extensions
for wl_surface and wl_output objects, and for creating client defined for wl_surface and wl_output objects, and for creating client defined
@ -118,6 +124,14 @@
summary="ICC-absolute colorimetric"/> summary="ICC-absolute colorimetric"/>
<entry name="relative_bpc" value="4" <entry name="relative_bpc" value="4"
summary="media-relative colorimetric + black point compensation"/> summary="media-relative colorimetric + black point compensation"/>
<entry name="absolute_no_adaptation" value="5" since="2">
<description summary="ICC-absolute colorimetric without adaptation">
This rendering intent is a modified absolute rendering intent that
assumes the viewer is not adapted to the display white point, so no
chromatic adaptation between surface and display is done.
This can be useful for color proofing applications.
</description>
</entry>
</enum> </enum>
<enum name="feature"> <enum name="feature">
@ -154,13 +168,9 @@
<enum name="primaries"> <enum name="primaries">
<description summary="named color primaries"> <description summary="named color primaries">
Named color primaries used to encode well-known sets of primaries. H.273 Named color primaries used to encode well-known sets of primaries.
is the authority, when it comes to the exact values of primaries 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. A value of 0 is invalid and will never be present in the list of enums.
Descriptions do list the specifications for convenience.
</description> </description>
<entry name="srgb" value="1"> <entry name="srgb" value="1">
@ -173,7 +183,6 @@
- IEC 61966-2-4 - IEC 61966-2-4
- Society of Motion Picture and Television Engineers (SMPTE) RP 177 - Society of Motion Picture and Television Engineers (SMPTE) RP 177
(1993) Annex B (1993) Annex B
Equivalent to H.273 ColourPrimaries code point 1.
</description> </description>
</entry> </entry>
<entry name="pal_m" value="2"> <entry name="pal_m" value="2">
@ -184,7 +193,6 @@
Recommendation for transmission standards for color television Recommendation for transmission standards for color television
- United States Federal Communications Commission (2003) Title 47 Code - United States Federal Communications Commission (2003) Title 47 Code
of Federal Regulations 73.682 (a)(20) of Federal Regulations 73.682 (a)(20)
Equivalent to H.273 ColourPrimaries code point 4.
</description> </description>
</entry> </entry>
<entry name="pal" value="3"> <entry name="pal" value="3">
@ -194,7 +202,6 @@
- Rec. ITU-R BT.601-7 625 - Rec. ITU-R BT.601-7 625
- Rec. ITU-R BT.1358-0 625 (historical) - Rec. ITU-R BT.1358-0 625 (historical)
- Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
Equivalent to H.273 ColourPrimaries code point 5.
</description> </description>
</entry> </entry>
<entry name="ntsc" value="4"> <entry name="ntsc" value="4">
@ -205,13 +212,13 @@
- Rec. ITU-R BT.1700-0 NTSC - Rec. ITU-R BT.1700-0 NTSC
- SMPTE 170M (2004) - SMPTE 170M (2004)
- SMPTE 240M (1999) (historical) - SMPTE 240M (1999) (historical)
Equivalent to H.273 ColourPrimaries code point 6 and 7.
</description> </description>
</entry> </entry>
<entry name="generic_film" value="5"> <entry name="generic_film" value="5">
<description summary="Generic film with colour filters using Illuminant C"> <description summary="Generic film with colour filters using Illuminant C">
Color primaries as defined by H.273 for generic film. Color primaries as defined by Recommendation ITU-T H.273
Equivalent to H.273 ColourPrimaries code point 8. "Coding-independent code points for video signal type identification"
for "generic film".
</description> </description>
</entry> </entry>
<entry name="bt2020" value="6"> <entry name="bt2020" value="6">
@ -219,7 +226,6 @@
Color primaries as defined by Color primaries as defined by
- Rec. ITU-R BT.2020-2 - Rec. ITU-R BT.2020-2
- Rec. ITU-R BT.2100-0 - Rec. ITU-R BT.2100-0
Equivalent to H.273 ColourPrimaries code point 9.
</description> </description>
</entry> </entry>
<entry name="cie1931_xyz" value="7"> <entry name="cie1931_xyz" value="7">
@ -228,21 +234,18 @@
space by space by
- SMPTE ST 428-1 - SMPTE ST 428-1
- (CIE 1931 XYZ as in ISO 11664-1) - (CIE 1931 XYZ as in ISO 11664-1)
Equivalent to H.273 ColourPrimaries code point 10.
</description> </description>
</entry> </entry>
<entry name="dci_p3" value="8"> <entry name="dci_p3" value="8">
<description summary="Color primaries of the DCI P3 color space as defined by the SMPTE RP 431 standard"> <description summary="Color primaries of the DCI P3 color space as defined by the SMPTE RP 431 standard">
Color primaries as defined by Digital Cinema System and published in Color primaries as defined by Digital Cinema System and published in
SMPTE RP 431-2 (2011). Equivalent to H.273 ColourPrimaries code point SMPTE RP 431-2 (2011).
11.
</description> </description>
</entry> </entry>
<entry name="display_p3" value="9"> <entry name="display_p3" value="9">
<description summary="Color primaries of Display P3 variant of the DCI-P3 color space as defined by the SMPTE EG 432 standard"> <description summary="Color primaries of Display P3 variant of the DCI-P3 color space as defined by the SMPTE EG 432 standard">
Color primaries as defined by Digital Cinema System and published in Color primaries as defined by Digital Cinema System and published in
SMPTE EG 432-1 (2010). SMPTE EG 432-1 (2010).
Equivalent to H.273 ColourPrimaries code point 12.
</description> </description>
</entry> </entry>
<entry name="adobe_rgb" value="10"> <entry name="adobe_rgb" value="10">
@ -256,13 +259,11 @@
<enum name="transfer_function"> <enum name="transfer_function">
<description summary="named transfer functions"> <description summary="named transfer functions">
Named transfer functions used to represent well-known transfer Named transfer functions used to represent well-known transfer
characteristics. H.273 is the authority, when it comes to the exact characteristics of displays.
formulas 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. A value of 0 is invalid and will never be present in the list of enums.
Descriptions do list the specifications for convenience. See appendix.md for the formulae.
</description> </description>
<entry name="bt1886" value="1"> <entry name="bt1886" value="1">
@ -271,8 +272,6 @@
- Rec. ITU-R BT.601-7 525 and 625 - Rec. ITU-R BT.601-7 525 and 625
- Rec. ITU-R BT.709-6 - Rec. ITU-R BT.709-6
- Rec. ITU-R BT.2020-2 - Rec. ITU-R BT.2020-2
These recommendations are referred to by H.273 TransferCharacteristics
code points 1, 6, 14, and 15, which are all equivalent.
This TF implies these default luminances from Rec. ITU-R BT.2035: This TF implies these default luminances from Rec. ITU-R BT.2035:
- primary color volume minimum: 0.01 cd/m² - primary color volume minimum: 0.01 cd/m²
@ -289,65 +288,57 @@
- United States Federal Communications Commission (2003) Title 47 Code - United States Federal Communications Commission (2003) Title 47 Code
of Federal Regulations 73.682 (a) (20) of Federal Regulations 73.682 (a) (20)
- Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
Equivalent to H.273 TransferCharacteristics code point 4. - IEC 61966-2-1 (reference display)
</description> </description>
</entry> </entry>
<entry name="gamma28" value="3"> <entry name="gamma28" value="3">
<description summary="Assumed display gamma 2.8 transfer function"> <description summary="Assumed display gamma 2.8 transfer function">
Transfer characteristics as defined by Transfer characteristics as defined by
- Rec. ITU-R BT.470-6 System B, G (historical) - Rec. ITU-R BT.470-6 System B, G (historical)
Equivalent to H.273 TransferCharacteristics code point 5.
</description> </description>
</entry> </entry>
<entry name="st240" value="4"> <entry name="st240" value="4">
<description summary="SMPTE ST 240 transfer function"> <description summary="SMPTE ST 240 transfer function">
Transfer characteristics as defined by Transfer characteristics as defined by
- SMPTE ST 240 (1999) - SMPTE ST 240 (1999)
Equivalent to H.273 TransferCharacteristics code point 7.
</description> </description>
</entry> </entry>
<entry name="ext_linear" value="5"> <entry name="ext_linear" value="5">
<description summary="extended linear transfer function"> <description summary="extended linear transfer function">
Linear transfer function defined over all real numbers. Linear transfer function defined over all real numbers.
Normalised electrical values are equal the normalised optical values. Normalised electrical values are equal the normalised optical values.
The differences to H.273 TransferCharacteristics code point 8 are
the definition over all real numbers.
</description> </description>
</entry> </entry>
<entry name="log_100" value="6"> <entry name="log_100" value="6">
<description summary="logarithmic 100:1 transfer function"> <description summary="logarithmic 100:1 transfer function">
Logarithmic transfer characteristic (100:1 range). Logarithmic transfer characteristic (100:1 range).
Equivalent to H.273 TransferCharacteristics code point 9.
</description> </description>
</entry> </entry>
<entry name="log_316" value="7"> <entry name="log_316" value="7">
<description summary="logarithmic (100*Sqrt(10) : 1) transfer function"> <description summary="logarithmic (100*Sqrt(10) : 1) transfer function">
Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range). Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range).
Equivalent to H.273 TransferCharacteristics code point 10.
</description> </description>
</entry> </entry>
<entry name="xvycc" value="8"> <entry name="xvycc" value="8">
<description summary="IEC 61966-2-4 transfer function"> <description summary="IEC 61966-2-4 transfer function">
Transfer characteristics as defined by Transfer characteristics as defined by
- IEC 61966-2-4 - IEC 61966-2-4
Equivalent to H.273 TransferCharacteristics code point 11.
</description> </description>
</entry> </entry>
<entry name="srgb" value="9"> <entry name="srgb" value="9" deprecated-since="2">
<description summary="sRGB piece-wise transfer function"> <description summary="Deprecated (ambiguous sRGB transfer function)">
Transfer characteristics as defined by Transfer characteristics as defined by
- IEC 61966-2-1 sRGB - IEC 61966-2-1 sRGB
Equivalent to H.273 TransferCharacteristics code point 13 with
MatrixCoefficients set to 0. As a rule of thumb, use gamma22 for video, motion picture and
computer graphics, or compound_power_2_4 for ICC calibrated print
workflows.
</description> </description>
</entry> </entry>
<entry name="ext_srgb" value="10"> <entry name="ext_srgb" value="10" deprecated-since="2">
<description summary="Extended sRGB piece-wise transfer function"> <description summary="Deprecated (Extended sRGB piece-wise transfer function)">
Transfer characteristics as defined by Transfer characteristics as defined by
- IEC 61966-2-1 sYCC - IEC 61966-2-1 sYCC
Equivalent to H.273 TransferCharacteristics code point 13 with
MatrixCoefficients set to anything but 0.
</description> </description>
</entry> </entry>
<entry name="st2084_pq" value="11"> <entry name="st2084_pq" value="11">
@ -355,7 +346,6 @@
Transfer characteristics as defined by Transfer characteristics as defined by
- SMPTE ST 2084 (2014) for 10-, 12-, 14- and 16-bit systems - SMPTE ST 2084 (2014) for 10-, 12-, 14- and 16-bit systems
- Rec. ITU-R BT.2100-2 perceptual quantization (PQ) system - Rec. ITU-R BT.2100-2 perceptual quantization (PQ) system
Equivalent to H.273 TransferCharacteristics code point 16.
This TF implies these default luminances This TF implies these default luminances
- primary color volume minimum: 0.005 cd/m² - primary color volume minimum: 0.005 cd/m²
@ -373,7 +363,6 @@
<description summary="SMPTE ST 428 transfer function"> <description summary="SMPTE ST 428 transfer function">
Transfer characteristics as defined by Transfer characteristics as defined by
- SMPTE ST 428-1 (2019) - SMPTE ST 428-1 (2019)
Equivalent to H.273 TransferCharacteristics code point 17.
</description> </description>
</entry> </entry>
<entry name="hlg" value="13"> <entry name="hlg" value="13">
@ -381,7 +370,6 @@
Transfer characteristics as defined by Transfer characteristics as defined by
- ARIB STD-B67 (2015) - ARIB STD-B67 (2015)
- Rec. ITU-R BT.2100-2 hybrid log-gamma (HLG) system - Rec. ITU-R BT.2100-2 hybrid log-gamma (HLG) system
Equivalent to H.273 TransferCharacteristics code point 18.
This TF implies these default luminances This TF implies these default luminances
- primary color volume minimum: 0.005 cd/m² - primary color volume minimum: 0.005 cd/m²
@ -398,6 +386,12 @@
ARIB STD-B67 or BT.2100. ARIB STD-B67 or BT.2100.
</description> </description>
</entry> </entry>
<entry name="compound_power_2_4" value="14" since="2">
<description summary="IEC 61966-2-1 encoding function">
Encoding characteristics as defined by IEC 61966-2-1, for displays
that invert the encoding function.
</description>
</entry>
</enum> </enum>
<request name="get_output"> <request name="get_output">
@ -531,6 +525,9 @@
<description summary="supported rendering intent"> <description summary="supported rendering intent">
When this object is created, it shall immediately send this event once When this object is created, it shall immediately send this event once
for each rendering intent the compositor supports. for each rendering intent the compositor supports.
A compositor must not advertise intents that are deprecated in the
bound version of the interface.
</description> </description>
<arg name="render_intent" type="uint" enum="render_intent" <arg name="render_intent" type="uint" enum="render_intent"
@ -541,6 +538,9 @@
<description summary="supported features"> <description summary="supported features">
When this object is created, it shall immediately send this event once When this object is created, it shall immediately send this event once
for each compositor supported feature listed in the enumeration. for each compositor supported feature listed in the enumeration.
A compositor must not advertise features that are deprecated in the
bound version of the interface.
</description> </description>
<arg name="feature" type="uint" enum="feature" <arg name="feature" type="uint" enum="feature"
@ -552,6 +552,9 @@
When this object is created, it shall immediately send this event once When this object is created, it shall immediately send this event once
for each named transfer function the compositor supports with the for each named transfer function the compositor supports with the
parametric image description creator. parametric image description creator.
A compositor must not advertise transfer functions that are deprecated
in the bound version of the interface.
</description> </description>
<arg name="tf" type="uint" enum="transfer_function" <arg name="tf" type="uint" enum="transfer_function"
@ -563,6 +566,9 @@
When this object is created, it shall immediately send this event once When this object is created, it shall immediately send this event once
for each named set of primaries the compositor supports with the for each named set of primaries the compositor supports with the
parametric image description creator. parametric image description creator.
A compositor must not advertise names that are deprecated in the
bound version of the interface.
</description> </description>
<arg name="primaries" type="uint" enum="primaries" <arg name="primaries" type="uint" enum="primaries"
@ -575,9 +581,23 @@
transfer functions and named primaries have been sent. transfer functions and named primaries have been sent.
</description> </description>
</event> </event>
<request name="get_image_description" since="2">
<description summary="create an image description from a reference">
This request retrieves the image description backing a reference.
The get_information request can be used if and only if the request that
creates the reference allows it.
</description>
<arg name="image_description"
type="new_id" interface="wp_image_description_v1"/>
<arg name="reference"
type="object" interface="wp_image_description_reference_v1"/>
</request>
</interface> </interface>
<interface name="wp_color_management_output_v1" version="1"> <interface name="wp_color_management_output_v1" version="2">
<description summary="output color properties"> <description summary="output color properties">
A wp_color_management_output_v1 describes the color properties of an A wp_color_management_output_v1 describes the color properties of an
output. output.
@ -647,7 +667,7 @@
</request> </request>
</interface> </interface>
<interface name="wp_color_management_surface_v1" version="1"> <interface name="wp_color_management_surface_v1" version="2">
<description summary="color management extension to a surface"> <description summary="color management extension to a surface">
A wp_color_management_surface_v1 allows the client to set the color A wp_color_management_surface_v1 allows the client to set the color
space and HDR properties of a surface. space and HDR properties of a surface.
@ -693,18 +713,18 @@
All image descriptions which are ready (see wp_image_description_v1) All image descriptions which are ready (see wp_image_description_v1)
are allowed and must always be accepted by the compositor. are allowed and must always be accepted by the compositor.
A rendering intent provides the client's preference on how content When an image description is set on a surface, it establishes an
colors should be mapped to each output. The render_intent value must explicit link between surface pixel values and surface colorimetry.
be one advertised by the compositor with This link may be undefined for some pixel values, see the image
description creator interfaces for the conditions. Non-finite
floating-point values (NaN, Inf) always have an undefined colorimetry.
A rendering intent provides the client's preference on how surface
colorimetry should be mapped to each output. The render_intent value
must be one advertised by the compositor with
wp_color_manager_v1.render_intent event, otherwise the protocol error wp_color_manager_v1.render_intent event, otherwise the protocol error
render_intent is raised. render_intent is raised.
When an image description is set on a surface, the Transfer
Characteristics of the image description defines the valid range of
the nominal (real-valued) color channel values. The processing of
out-of-range color channel values is undefined, but compositors are
recommended to clamp the values to the valid range when possible.
By default, a surface does not have an associated image description By default, a surface does not have an associated image description
nor a rendering intent. The handling of color on such surfaces is nor a rendering intent. The handling of color on such surfaces is
compositor implementation defined. Compositors should handle such compositor implementation defined. Compositors should handle such
@ -735,7 +755,7 @@
</request> </request>
</interface> </interface>
<interface name="wp_color_management_surface_feedback_v1" version="1"> <interface name="wp_color_management_surface_feedback_v1" version="2">
<description summary="color management extension to a surface"> <description summary="color management extension to a surface">
A wp_color_management_surface_feedback_v1 allows the client to get the A wp_color_management_surface_feedback_v1 allows the client to get the
preferred image description of a surface. preferred image description of a surface.
@ -758,27 +778,14 @@
summary="attempted to use an unsupported feature"/> summary="attempted to use an unsupported feature"/>
</enum> </enum>
<event name="preferred_changed"> <event name="preferred_changed" deprecated-since="2">
<description summary="the preferred image description changed"> <description summary="the preferred image description changed (32-bit)">
The preferred image description is the one which likely has the most Starting from interface version 2, 'preferred_changed2' is sent instead
performance and/or quality benefits for the compositor if used by the of this event. See the 'preferred_changed2' event for the definition.
client for its wl_surface contents. This event is sent whenever the
compositor changes the wl_surface's preferred image description.
This event sends the identity of the new preferred state as the argument,
so clients who are aware of the image description already can reuse it.
Otherwise, if the client client wants to know what the preferred image
description is, it shall use the get_preferred request.
The preferred image description is not automatically used for anything.
It is only a hint, and clients may set any valid image description with
set_image_description, but there might be performance and color accuracy
improvements by providing the wl_surface contents in the preferred
image description. Therefore clients that can, should render according
to the preferred image description
</description> </description>
<arg name="identity" type="uint" summary="image description id number"/> <arg name="identity" type="uint"
summary="the 32-bit image description id number"/>
</event> </event>
<request name="get_preferred"> <request name="get_preferred">
@ -835,9 +842,38 @@
<arg name="image_description" <arg name="image_description"
type="new_id" interface="wp_image_description_v1"/> type="new_id" interface="wp_image_description_v1"/>
</request> </request>
<!-- Version 2 additions -->
<event name="preferred_changed2" since="2">
<description summary="the preferred image description changed">
The preferred image description is the one which likely has the most
performance and/or quality benefits for the compositor if used by the
client for its wl_surface contents. This event is sent whenever the
compositor changes the wl_surface's preferred image description.
This event sends the identity of the new preferred state as the argument,
so clients who are aware of the image description already can reuse it.
Otherwise, if the client client wants to know what the preferred image
description is, it shall use the get_preferred request.
The preferred image description is not automatically used for anything.
It is only a hint, and clients may set any valid image description with
set_image_description, but there might be performance and color accuracy
improvements by providing the wl_surface contents in the preferred
image description. Therefore clients that can, should render according
to the preferred image description
</description>
<arg name="identity_hi" type="uint"
summary="high 32 bits of the 64-bit image description id number"/>
<arg name="identity_lo" type="uint"
summary="low 32 bits of the 64-bit image description id number"/>
</event>
</interface> </interface>
<interface name="wp_image_description_creator_icc_v1" version="1"> <interface name="wp_image_description_creator_icc_v1" version="2">
<description summary="holder of image description ICC information"> <description summary="holder of image description ICC information">
This type of object is used for collecting all the information required This type of object is used for collecting all the information required
to create a wp_image_description_v1 object from an ICC file. A complete to create a wp_image_description_v1 object from an ICC file. A complete
@ -853,6 +889,10 @@
Once all properties have been set, the create request must be used to Once all properties have been set, the create request must be used to
create the image description object, destroying the creator in the create the image description object, destroying the creator in the
process. process.
The link between a pixel value (a device value in ICC) and its respective
colorimetry is defined by the details of the particular ICC profile.
Those details also determine when colorimetry becomes undefined.
</description> </description>
<enum name="error"> <enum name="error">
@ -949,7 +989,7 @@
</request> </request>
</interface> </interface>
<interface name="wp_image_description_creator_params_v1" version="1"> <interface name="wp_image_description_creator_params_v1" version="2">
<description summary="holder of image description parameters"> <description summary="holder of image description parameters">
This type of object is used for collecting all the parameters required This type of object is used for collecting all the parameters required
to create a wp_image_description_v1 object. A complete set of required to create a wp_image_description_v1 object. A complete set of required
@ -978,6 +1018,20 @@
Once all properties have been set, the create request must be used to Once all properties have been set, the create request must be used to
create the image description object, destroying the creator in the create the image description object, destroying the creator in the
process. process.
A viewer, who is viewing the display defined by the resulting image
description (the viewing environment included), is assumed to be fully
adapted to the primary color volume's white point.
Any of the following conditions will cause the colorimetry of a pixel
to become undefined:
- Values outside of the defined range of the transfer characteristic.
- Tristimulus that exceeds the target color volume.
- If extended_target_volume is not supported: tristimulus that exceeds
the primary color volume.
The closest correspondence to an image description created through this
interface is the Display class of profiles in ICC.
</description> </description>
<enum name="error"> <enum name="error">
@ -1006,14 +1060,16 @@
complete, the protocol error incomplete_set is raised. For the complete, the protocol error incomplete_set is raised. For the
definition of a complete set, see the description of this interface. definition of a complete set, see the description of this interface.
The protocol error invalid_luminance is raised if any of the following When both max_cll and max_fall are set, max_fall must be less or equal
requirements is not met: to max_cll otherwise the invalid_luminance protocol error is raised.
In version 1, these following conditions also result in the
invalid_luminance protocol error. Version 2 and later do not have this
requirement.
- When max_cll is set, it must be greater than min L and less or equal - When max_cll is set, it must be greater than min L and less or equal
to max L of the mastering luminance range. to max L of the mastering luminance range.
- When max_fall is set, it must be greater than min L and less or equal - When max_fall is set, it must be greater than min L and less or equal
to max L of the mastering luminance range. to max L of the mastering luminance range.
- When both max_cll and max_fall are set, max_fall must be less or equal
to max_cll.
If the particular combination of the parameter set is not supported If the particular combination of the parameter set is not supported
by the compositor, the resulting image description object shall by the compositor, the resulting image description object shall
@ -1039,7 +1095,7 @@
functions. functions.
When the resulting image description is attached to an image, the When the resulting image description is attached to an image, the
content should be encoded and decoded according to the industry standard content should be decoded according to the industry standard
practices for the transfer characteristic. practices for the transfer characteristic.
Only names advertised with wp_color_manager_v1 event supported_tf_named Only names advertised with wp_color_manager_v1 event supported_tf_named
@ -1061,9 +1117,6 @@
range of the curve are all finite real numbers. This curve represents range of the curve are all finite real numbers. This curve represents
the conversion from electrical to optical color channel values. the conversion from electrical to optical color channel values.
When the resulting image description is attached to an image, the
content should be encoded with the inverse of the power curve.
The curve exponent shall be multiplied by 10000 to get the argument eexp The curve exponent shall be multiplied by 10000 to get the argument eexp
value to carry the precision of 4 decimals. value to carry the precision of 4 decimals.
@ -1129,8 +1182,8 @@
<request name="set_luminances"> <request name="set_luminances">
<description summary="primary color volume luminance range and reference white"> <description summary="primary color volume luminance range and reference white">
Sets the primary color volume luminance range and the reference white Sets the primary color volume luminance range and the reference white
luminance level. These values include the minimum display emission luminance level. These values include the minimum display emission, but
and ambient flare luminances, assumed to be optically additive and have not external flare. The minimum display emission is assumed to have
the chromaticity of the primary color volume white point. the chromaticity of the primary color volume white point.
The default luminances from The default luminances from
@ -1310,13 +1363,15 @@
</request> </request>
</interface> </interface>
<interface name="wp_image_description_v1" version="1"> <interface name="wp_image_description_v1" version="2">
<description summary="Colorimetric image description"> <description summary="Colorimetric image description">
An image description carries information about the color encoding used on An image description carries information about the pixel color encoding
a surface when attached to a wl_surface via and its intended display and viewing environment. The image description is
attached to a wl_surface via
wp_color_management_surface_v1.set_image_description. A compositor can use wp_color_management_surface_v1.set_image_description. A compositor can use
this information to decode pixel values into colorimetrically meaningful this information to decode pixel values into colorimetrically meaningful
quantities. quantities, which allows the compositor to transform the surface contents
to become suitable for various displays and viewing environments.
Note, that the wp_image_description_v1 object is not ready to be used Note, that the wp_image_description_v1 object is not ready to be used
immediately after creation. The object eventually delivers either the immediately after creation. The object eventually delivers either the
@ -1385,38 +1440,22 @@
summary="ad hoc human-readable explanation"/> summary="ad hoc human-readable explanation"/>
</event> </event>
<event name="ready"> <event name="ready" deprecated-since="2">
<description summary="indication that the object is ready to be used"> <description summary="the object is ready to be used (32-bit)">
Once this event has been sent, the wp_image_description_v1 object is Starting from interface version 2, the 'ready2' event is sent instead
deemed "ready". Ready objects can be used to send requests and can be of this event.
used through other interfaces.
Every ready wp_image_description_v1 protocol object refers to an For the definition of this event, see the 'ready2' event. The
underlying image description record in the compositor. Multiple protocol difference to this event is as follows.
objects may end up referring to the same record. Clients may identify
these "copies" by comparing their id numbers: if the numbers from two
protocol objects are identical, the protocol objects refer to the same
image description record. Two different image description records
cannot have the same id number simultaneously. The id number does not
change during the lifetime of the image description record.
The id number is valid only as long as the protocol object is alive. If The id number is valid only as long as the protocol object is alive. If
all protocol objects referring to the same image description record are all protocol objects referring to the same image description record are
destroyed, the id number may be recycled for a different image destroyed, the id number may be recycled for a different image
description record. description record.
Image description id number is not a protocol object id. Zero is
reserved as an invalid id number. It shall not be possible for a client
to refer to an image description by its id number in protocol. The id
numbers might not be portable between Wayland connections. A compositor
shall not send an invalid id number.
This identity allows clients to de-duplicate image description records
and avoid get_information request if they already have the image
description information.
</description> </description>
<arg name="identity" type="uint" summary="image description id number"/> <arg name="identity" type="uint"
summary="the 32-bit image description id number"/>
</event> </event>
<request name="get_information"> <request name="get_information">
@ -1433,9 +1472,45 @@
<arg name="information" <arg name="information"
type="new_id" interface="wp_image_description_info_v1"/> type="new_id" interface="wp_image_description_info_v1"/>
</request> </request>
<!-- Version 2 additions -->
<event name="ready2" since="2">
<description summary="the object is ready to be used">
Once this event has been sent, the wp_image_description_v1 object is
deemed "ready". Ready objects can be used to send requests and can be
used through other interfaces.
Every ready wp_image_description_v1 protocol object refers to an
underlying image description record in the compositor. Multiple protocol
objects may end up referring to the same record. Clients may identify
these "copies" by comparing their id numbers: if the numbers from two
protocol objects are identical, the protocol objects refer to the same
image description record. Two different image description records
cannot have the same id number simultaneously. The id number does not
change during the lifetime of the image description record.
Image description id number is not a protocol object id. Zero is
reserved as an invalid id number. It shall not be possible for a client
to refer to an image description by its id number in protocol. The id
numbers might not be portable between Wayland connections. A compositor
shall not send an invalid id number.
Compositors must not recycle image description id numbers.
This identity allows clients to de-duplicate image description records
and avoid get_information request if they already have the image
description information.
</description>
<arg name="identity_hi" type="uint"
summary="high 32 bits of the 64-bit image description id number"/>
<arg name="identity_lo" type="uint"
summary="low 32 bits of the 64-bit image description id number"/>
</event>
</interface> </interface>
<interface name="wp_image_description_info_v1" version="1"> <interface name="wp_image_description_info_v1" version="2">
<description summary="Colorimetric image description information"> <description summary="Colorimetric image description information">
Sends all matching events describing an image description object exactly Sends all matching events describing an image description object exactly
once and finally sends the 'done' event. once and finally sends the 'done' event.
@ -1564,9 +1639,7 @@
SMPTE ST 2086 definition of HDR static metadata for mastering displays. SMPTE ST 2086 definition of HDR static metadata for mastering displays.
While primary color volume is about how color is encoded, the target While primary color volume is about how color is encoded, the target
color volume is the actually displayable color volume. If target color color volume is the actually displayable color volume.
volume is equal to the primary color volume, then this event is not
sent.
Each coordinate value is multiplied by 1 million to get the argument Each coordinate value is multiplied by 1 million to get the argument
value to carry precision of 6 decimals. value to carry precision of 6 decimals.
@ -1628,4 +1701,22 @@
summary="Maximum frame-average light level (cd/m²)"/> summary="Maximum frame-average light level (cd/m²)"/>
</event> </event>
</interface> </interface>
<interface name="wp_image_description_reference_v1" version="1" frozen="true">
<description summary="Reference to an image description">
This object is a reference to an image description. This interface is
frozen at version 1 to allow other protocols to create
wp_image_description_v1 objects.
The wp_color_manager_v1.get_image_description request can be used to
retrieve the underlying image description.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the reference">
Destroy this object. This has no effect on the referenced image
description.
</description>
</request>
</interface>
</protocol> </protocol>

View file

@ -145,6 +145,8 @@
summary="the pixel format and a set value are incompatible"/> summary="the pixel format and a set value are incompatible"/>
<entry name="inert" value="4" <entry name="inert" value="4"
summary="forbidden request on inert object"/> summary="forbidden request on inert object"/>
<entry name="chroma_location" value="5"
summary="invalid chroma location"/>
</enum> </enum>
<request name="destroy" type="destructor"> <request name="destroy" type="destructor">
@ -412,6 +414,9 @@
chroma samples, corresponding to Chroma420SampleLocType code points in chroma samples, corresponding to Chroma420SampleLocType code points in
H.273. 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 A call to wl_surface.commit verifies that the pixel format and chroma
location type in the committed surface contents are compatible, if location type in the committed surface contents are compatible, if
contents exist. The "pixel_format" protocol error is raised otherwise. contents exist. The "pixel_format" protocol error is raised otherwise.

View file

@ -71,9 +71,9 @@ inverse steps, including the transfer characteristics which are not defined by
this protocol to convert the encoding back to tristimulus values with color this protocol to convert the encoding back to tristimulus values with color
primaries which are also not defined by this protocol. primaries which are also not defined by this protocol.
Some ``MatrixCoefficients`` code points require applying formulas or infering Some ``MatrixCoefficients`` code points require applying formulas or inferring
constants from the transfer characteristics or color primaries of the image. constants from the transfer characteristics or color primaries of the image.
Compositors should not advertise support for such code points if the client Compositors should not advertise support for such code points if the client
can't communicate the transfer characteristics and color primaries to the can't communicate the transfer characteristics and color primaries to the
compositor. Communicating those when needed is left for other Wayland extensions compositor. Communicating those when needed is left for other Wayland extensions
to be used in conjunction with color-representation. to be used in conjunction with color-representation.

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

@ -201,7 +201,7 @@
The compositor must only send this event when the handle is created. 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 The identifier must be unique per toplevel and its handles. Two different
toplevels must not have the same identifier. The identifier is only valid 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 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 must not be reused. An identifier must not be reused by the compositor to

View file

@ -39,7 +39,7 @@
only be done by creating a new major version of the extension. only be done by creating a new major version of the extension.
</description> </description>
<interface name="ext_image_capture_source_v1" version="1"> <interface name="ext_image_capture_source_v1" version="1" frozen="true">
<description summary="opaque image capture source object"> <description summary="opaque image capture source object">
The image capture source object is an opaque descriptor for a capturable 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 resource. This resource may be any sort of entity from which an image

View file

@ -184,7 +184,7 @@
<description summary="workspace added to workspace group"> <description summary="workspace added to workspace group">
This event is emitted whenever a workspace is assigned to this 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 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. in time, but can be re-assigned during its lifetime.
</description> </description>
<arg name="workspace" type="object" interface="ext_workspace_handle_v1"/> <arg name="workspace" type="object" interface="ext_workspace_handle_v1"/>
</event> </event>
@ -246,7 +246,7 @@
The client may request that the compositor activate or deactivate the workspace. The client may request that the compositor activate or deactivate the workspace.
Each workspace can belong to only a single workspace group. Each workspace can belong to only a single workspace group.
Depepending on the compositor policy, there might be workspaces with Depending on the compositor policy, there might be workspaces with
the same name in different workspace groups, but these workspaces are still 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). separate (e.g. one of them might be active while the other is not).
</description> </description>
@ -255,10 +255,10 @@
<description summary="workspace id"> <description summary="workspace id">
If this event is emitted, it will be send immediately after the 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 ext_workspace_handle_v1 is created or when an id is assigned to
a workspace (at most once during it's lifetime). a workspace (at most once during its lifetime).
An id will never change during the lifetime of the `ext_workspace_handle_v1` An id will never change during the lifetime of the `ext_workspace_handle_v1`
and is guaranteed to be unique during it's lifetime. and is guaranteed to be unique during its lifetime.
Ids are not human-readable and shouldn't be displayed, use `name` for that purpose. Ids are not human-readable and shouldn't be displayed, use `name` for that purpose.

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

@ -58,6 +58,13 @@
pre-multiplied alpha. pre-multiplied alpha.
The width and height of the buffer are 1. 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> </description>
<arg name="id" type="new_id" interface="wl_buffer"/> <arg name="id" type="new_id" interface="wl_buffer"/>
<arg name="r" type="uint" summary="value of the buffer's red channel"/> <arg name="r" type="uint" summary="value of the buffer's red channel"/>

View file

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

View file

@ -0,0 +1,333 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_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 xdg_session_manager protocol declares interfaces necessary to
allow clients to restore toplevel state from previous executions. The
xdg_session_manager_v1.get_session request can be used to obtain a
xdg_session_v1 resource representing the state of a set of toplevels.
Clients may obtain the session string to use in future calls through
the xdg_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. Clients that wish to
track sessions in multiple environments may use the $XDG_CURRENT_DESKTOP
environment variable.
Toplevels are managed through the xdg_session_v1.add_toplevel and
xdg_session_v1.remove_toplevel pair of requests. Clients will explicitly
request a toplevel to be restored according to prior state through the
xdg_session_v1.restore_toplevel request before the toplevel is mapped.
Compositors may store session information up to any arbitrary level, and
apply any limits and policies to the amount of data stored and its lifetime.
Clients must account for missing sessions and partial session restoration.
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_session_manager_v1" version="1">
<description summary="manage sessions for applications">
The xdg_session_manager_v1 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.
Policies such as cache eviction are declared an implementation detail of
the compositor. Clients should account for no longer existing sessions.
</description>
<enum name="error">
<entry name="in_use" summary="a requested session is already in use"
value="1"/>
<entry name="invalid_session_id" summary="invalid session identifier"
value="2"/>
<entry name="invalid_reason" summary="invalid reason" value="3"/>
</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
application 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">
Destroy the manager object. The existing session objects will be
unaffected.
</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 an 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.
If the reason is not a valid enum entry, the 'invalid_reason' protocol
error is raised.
NULL is passed to initiate a new session. If a session_id is passed
which does not represent a valid session, the compositor treats it as if
NULL had been passed.
The session id string must be UTF-8 encoded. It is also limited by the
maximum length of wayland messages (around 4KB). The 'invalid_session_id'
protocol error will be raised if an invalid string is provided.
A client is allowed to have any number of in use sessions at the same
time.
</description>
<arg name="id" type="new_id" interface="xdg_session_v1"/>
<arg name="reason" type="uint" enum="reason"
summary="reason for session"/>
<arg name="session_id" type="string"
summary="the session to restore"
allow-null="true"/>
</request>
</interface>
<interface name="xdg_session_v1" version="1">
<description summary="A session for an application">
A xdg_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.
</description>
<enum name="error">
<entry name="name_in_use"
summary="toplevel name is already in use"
value="1"/>
<entry name="already_mapped"
summary="toplevel was already mapped when restored"
value="2"/>
<entry name="invalid_name"
summary="provided toplevel name is invalid"
value="3"/>
<entry name="already_added"
summary="toplevel already added"
value="4"/>
</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
xdg_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 to store
window specific state within the session.
The name given to the toplevel must not correspond to any previously
existing toplevel names in the session. If the name matches an already
known toplevel name in the session, a 'name_in_use' protocol error will
be raised.
The toplevel object must not be added more than once to any session
created by the client, otherwise the 'already_added' protocol error
will be raised.
This request will return a xdg_toplevel_session_v1 for later
manipulation. As this resource is created from an empty initial state,
compositors must not emit a xdg_toplevel_session_v1.restored event for
resources created through this request.
The name string must be UTF-8 encoded. It is also limited by the maximum
length of wayland messages (around 4KB). The 'invalid_name' protocol
error will be raised if an invalid string is provided.
</description>
<arg name="id" type="new_id" interface="xdg_toplevel_session_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
<arg name="name" type="string" summary="name identifying the toplevel"/>
</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.
If the toplevel name was previously granted to another xdg_toplevel,
the 'name_in_use' protocol error will be raised.
The toplevel object must not be added more than once to any session
created by the client, otherwise the 'already_added' protocol error
will be raised.
This request must be called prior to the first commit on the associated
wl_surface after creating the toplevel, otherwise an 'already_mapped'
error is raised.
As part of the initial configure sequence, if the toplevel was
successfully restored, a xdg_toplevel_session_v1.restored event is
emitted. If the toplevel name was not known in the session, this request
will be equivalent to the xdg_toplevel_session_v1.add_toplevel request,
and no such event will be emitted. See the xdg_toplevel_session_v1.restored
event for further details.
The name string must be UTF-8 encoded. It is also limited by the maximum
length of wayland messages (around 4KB). The 'invalid_name' protocol
error will be raised if an invalid string is provided.
</description>
<arg name="id" type="new_id" interface="xdg_toplevel_session_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
<arg name="name" type="string" summary="name identifying the toplevel"/>
</request>
<request name="remove_toplevel">
<description summary="remove a surface from the session">
Remove a specified surface from the session and render any related
xdg_toplevel_session_v1 object inert. The compositor should remove any
data related to the toplevel in the corresponding session from its internal
storage.
The window is specified by its name in the session. The name string
must be encoded in UTF-8, and it is limited in size by the maximum
length of wayland messages (around 4KB).
</description>
<arg name="name" type="string" summary="name identifying the toplevel"/>
</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 persistently stored and used to restore previous
sessions.
</description>
<arg name="session_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 replaced">
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="xdg_toplevel_session_v1" version="1">
<description summary="A session for an application">
A xdg_toplevel_session_v1 resource acts as a handle for the given
toplevel in the session. It allows for receiving events after a
toplevel state was restored, and has the requests to manage them.
</description>
<request name="destroy" type="destructor">
<description summary="Destroy the object">
Destroy the object. This has no effect over window management of the
associated toplevel.
</description>
</request>
<request name="rename">
<description summary="change the name of toplevel session">
Renames the toplevel session. The new name can be used in subsequent requests
to identify this session object. The state associated with this toplevel
session will be preserved.
If the xdg_session_v1 already contains a toplevel with the specified name,
the 'name_in_use' protocol error will be raised.
</description>
<arg name="name" type="string" summary="new name to identify the toplevel"/>
</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
xdg_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>
</event>
</interface>
</protocol>

View file

@ -107,7 +107,7 @@
'done' event, without any preceding 'icon_size' events. 'done' event, without any preceding 'icon_size' events.
</description> </description>
<arg name="size" type="int" <arg name="size" type="int"
summary="the edge size of the square icon in surface-local coordinates, e.g. 64"/> summary="the edge size of the square icon in surface-local coordinates, e.g. 64"/>
</event> </event>
<event name="done"> <event name="done">
@ -132,10 +132,10 @@
<enum name="error"> <enum name="error">
<entry name="invalid_buffer" <entry name="invalid_buffer"
summary="the provided buffer does not satisfy requirements" summary="the provided buffer does not satisfy requirements"
value="1"/> value="1"/>
<entry name="immutable" <entry name="immutable"
summary="the icon has already been assigned to a toplevel and must not be changed" summary="the icon has already been assigned to a toplevel and must not be changed"
value="2"/> value="2"/>
<entry name="no_buffer" <entry name="no_buffer"
summary="the provided buffer has been destroyed before the toplevel icon" summary="the provided buffer has been destroyed before the toplevel icon"
value="3"/> value="3"/>
@ -163,7 +163,7 @@
fall back to using pixel buffer data instead. fall back to using pixel buffer data instead.
If this request is made after the icon has been assigned to a toplevel If this request is made after the icon has been assigned to a toplevel
via 'set_icon', a 'immutable' error must be raised. via 'set_icon', an 'immutable' error must be raised.
[1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html [1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
</description> </description>
@ -195,11 +195,11 @@
request is sent. The wl_buffer.release event is unused. request is sent. The wl_buffer.release event is unused.
If this request is made after the icon has been assigned to a toplevel If this request is made after the icon has been assigned to a toplevel
via 'set_icon', a 'immutable' error must be raised. via 'set_icon', an 'immutable' error must be raised.
</description> </description>
<arg name="buffer" type="object" interface="wl_buffer"/> <arg name="buffer" type="object" interface="wl_buffer"/>
<arg name="scale" type="int" <arg name="scale" type="int"
summary="the scaling factor of the icon, e.g. 1"/> summary="the scaling factor of the icon, e.g. 1"/>
</request> </request>
</interface> </interface>
</protocol> </protocol>

View file

@ -7,7 +7,7 @@ libwayland = [
# Check that each protocol passes through the scanner # Check that each protocol passes through the scanner
foreach protocol_file : protocol_files foreach protocol_file : protocol_files
protocol_path = join_paths(wayland_protocols_srcdir, protocol_file) protocol_path = join_paths(meson.project_source_root(), protocol_file)
test_name = 'scan-@0@'.format(protocol_file.underscorify()) test_name = 'scan-@0@'.format(protocol_file.underscorify())
test(test_name, prog_scan_sh, test(test_name, prog_scan_sh,
args: protocol_path, args: protocol_path,
@ -22,16 +22,19 @@ endforeach
add_languages('c', 'cpp', native: false) add_languages('c', 'cpp', native: false)
replace = find_program('replace.py') replace = find_program('replace.py')
extra_linker_flags = meson.get_compiler('c').get_supported_link_arguments([ # First pass: generate scanner outputs for each protocol and record the
'-Wl,--unresolved-symbols=ignore-all', # generated custom_targets for use when building test executables.
]) protocol_code = {}
protocol_client_header = {}
protocol_server_header = {}
protocol_replace_command = {}
foreach protocol_file : protocol_files foreach protocol_file : protocol_files
xml_file = fs.name(protocol_file) xml_file = fs.name(protocol_file)
xml_components = xml_file.split('.') xml_components = xml_file.split('.')
protocol_base_file_name = xml_components[0] protocol_base_file_name = xml_components[0]
protocol_path = files(join_paths(wayland_protocols_srcdir, protocol_file)) protocol_path = files(join_paths(meson.project_source_root(), protocol_file))
client_header_path = '@0@-client.h'.format(protocol_base_file_name) client_header_path = '@0@-client.h'.format(protocol_base_file_name)
server_header_path = '@0@-server.h'.format(protocol_base_file_name) server_header_path = '@0@-server.h'.format(protocol_base_file_name)
code_path = '@0@-code.c'.format(protocol_base_file_name) code_path = '@0@-code.c'.format(protocol_base_file_name)
@ -75,7 +78,10 @@ foreach protocol_file : protocol_files
install: false, install: false,
) )
replace_command = [ protocol_code += {protocol_file: code}
protocol_client_header += {protocol_file: client_header}
protocol_server_header += {protocol_file: server_header}
protocol_replace_command += {protocol_file: [
replace, replace,
'@INPUT@', '@INPUT@',
'@OUTPUT@', '@OUTPUT@',
@ -83,7 +89,22 @@ foreach protocol_file : protocol_files
client_header.full_path(), client_header.full_path(),
'PROTOCOL_SERVER_INCLUDE_FILE', 'PROTOCOL_SERVER_INCLUDE_FILE',
server_header.full_path(), server_header.full_path(),
] ]}
endforeach
# Second pass: build test executables, linking in dependency code.
foreach protocol_file : protocol_files
client_header = protocol_client_header[protocol_file]
server_header = protocol_server_header[protocol_file]
code = protocol_code[protocol_file]
replace_command = protocol_replace_command[protocol_file]
dep_code = []
if protocol_file in protocol_deps
foreach dep : protocol_deps[protocol_file]
dep_code += [protocol_code[dep]]
endforeach
endif
# Check that header can be included by a pedantic C99 compiler # Check that header can be included by a pedantic C99 compiler
test_name = 'test-build-pedantic-@0@'.format(protocol_file.underscorify()) test_name = 'test-build-pedantic-@0@'.format(protocol_file.underscorify())
@ -100,9 +121,8 @@ foreach protocol_file : protocol_files
test_source, test_source,
client_header, client_header,
server_header, server_header,
code code,
], ] + dep_code,
link_args: extra_linker_flags,
dependencies: libwayland, dependencies: libwayland,
c_args: [ c_args: [
'-std=c99', '-std=c99',
@ -129,9 +149,8 @@ foreach protocol_file : protocol_files
test_source, test_source,
client_header, client_header,
server_header, server_header,
], ] + dep_code,
link_args: extra_linker_flags, dependencies: libwayland,
dependencies: libwayland,
cpp_args: [ cpp_args: [
'-Wall', '-Wall',
'-Werror', '-Werror',

View file

@ -1,5 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<protocol name="pointer_gestures_unstable_v1"> <protocol name="pointer_gestures_unstable_v1">
<copyright>
Copyright © 2015, 2021 Red Hat Inc.
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="zwp_pointer_gestures_v1" version="3"> <interface name="zwp_pointer_gestures_v1" version="3">
<description summary="touchpad gestures"> <description summary="touchpad gestures">
@ -61,7 +85,7 @@
</interface> </interface>
<interface name="zwp_pointer_gesture_swipe_v1" version="2"> <interface name="zwp_pointer_gesture_swipe_v1" version="3">
<description summary="a swipe gesture object"> <description summary="a swipe gesture object">
A swipe gesture object notifies a client about a multi-finger swipe A swipe gesture object notifies a client about a multi-finger swipe
gesture detected on an indirect input device such as a touchpad. gesture detected on an indirect input device such as a touchpad.
@ -124,7 +148,7 @@
</event> </event>
</interface> </interface>
<interface name="zwp_pointer_gesture_pinch_v1" version="2"> <interface name="zwp_pointer_gesture_pinch_v1" version="3">
<description summary="a pinch gesture object"> <description summary="a pinch gesture object">
A pinch gesture object notifies a client about a multi-finger pinch A pinch gesture object notifies a client about a multi-finger pinch
gesture detected on an indirect input device such as a touchpad. gesture detected on an indirect input device such as a touchpad.

View file

@ -47,7 +47,7 @@
interface version number is reset. interface version number is reset.
</description> </description>
<interface name="zwp_text_input_v3" version="1"> <interface name="zwp_text_input_v3" version="2">
<description summary="text input"> <description summary="text input">
The zwp_text_input_v3 interface represents text input and input methods The zwp_text_input_v3 interface represents text input and input methods
associated with a seat. It provides enter/leave events to follow the associated with a seat. It provides enter/leave events to follow the
@ -89,16 +89,15 @@
Requests text input on the surface previously obtained from the enter Requests text input on the surface previously obtained from the enter
event. event.
This request must be issued every time the active text input changes This request must be issued every time the focused text input changes
to a new one, including within the current surface. Use to a new one, including within the current surface. Use
zwp_text_input_v3.disable when there is no longer any input focus on zwp_text_input_v3.disable when there is no longer any input focus on
the current surface. the current surface.
Clients must not enable more than one text input on the single seat 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. 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 a text input when another text input is enabled
Requests to enable the another text input when some text input is active on the same seat must be ignored by compositor.
must be ignored by compositor.
This request resets all state associated with previous enable, disable, This request resets all state associated with previous enable, disable,
set_surrounding_text, set_text_change_cause, set_content_type, and set_surrounding_text, set_text_change_cause, set_content_type, and
@ -211,6 +210,15 @@
<entry name="sensitive_data" value="0x80" summary="typed text should not be stored"/> <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="latin" value="0x100" summary="just Latin characters should be entered"/>
<entry name="multiline" value="0x200" summary="the text input is multiline"/> <entry name="multiline" value="0x200" summary="the text input is multiline"/>
<entry
name="on_screen_input_provided" value="0x400" since="2"
summary="an on-screen way to fill in the input is already provided by the client"/>
<entry
name="no_emoji" value="0x800" since="2"
summary="prefer not offering emoji support"/>
<entry
name="preedit_shown" value="0x1000" since="2"
summary="the text input will display preedit text in place"/>
</enum> </enum>
<enum name="content_purpose"> <enum name="content_purpose">
@ -274,6 +282,19 @@
the text input does not support describing the cursor area. If the the text input does not support describing the cursor area. If the
empty values get applied, subsequent attempts to change them may have empty values get applied, subsequent attempts to change them may have
no effect. no effect.
As of version 2, the zwp_text_input_v3.commit request does not apply
values sent with this request. Instead, it stores them in a separate
"committed" area. The committed values, if still valid, get applied on
the next wl_surface.commit request on the surface with text-input focus.
Both committed and applied values get invalidated on:
- the next committed enable or disable request, or
- a change of the focused surface of the text-input (leave or enter events).
This double stage application allows the compositor to position
the input method popup in the same frame as the contents
of the text on the surface are updated.
</description> </description>
<arg name="x" type="int"/> <arg name="x" type="int"/>
<arg name="y" type="int"/> <arg name="y" type="int"/>
@ -404,8 +425,10 @@
<event name="done"> <event name="done">
<description summary="apply changes"> <description summary="apply changes">
Instruct the application to apply changes to state requested by the Instruct the application to apply changes to state requested by the
preedit_string, commit_string and delete_surrounding_text events. The preedit_string, commit_string delete_surrounding_text, and action
state relating to these events is double-buffered, and each one events.
The state relating to these events is double-buffered, and each one
modifies the pending state. This event replaces the current state with modifies the pending state. This event replaces the current state with
the pending state. the pending state.
@ -418,6 +441,7 @@
4. Calculate surrounding text to send. 4. Calculate surrounding text to send.
5. Insert new preedit text in cursor position. 5. Insert new preedit text in cursor position.
6. Place cursor inside preedit text. 6. Place cursor inside preedit text.
7. Perform the requested action.
The serial number reflects the last state of the zwp_text_input_v3 The serial number reflects the last state of the zwp_text_input_v3
object known to the compositor. The value of the serial argument must object known to the compositor. The value of the serial argument must
@ -433,9 +457,132 @@
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
</event> </event>
<!-- Version 2 additions -->
<enum name="error" since="2">
<entry name="invalid_action" value="0" summary="an invalid or duplicate action was specified"/>
</enum>
<enum name="action" since="2">
<description summary="action">
A possible action to perform on a text input.
The submit action is intended for input entries that expect some sort of
activation after user interaction, e.g. the URL entry in a browser.
</description>
<entry name="none" value="0" summary="no action"/>
<entry name="submit" value="1" summary="the action is submitted"/>
</enum>
<event name="action" since="2">
<description summary="action performed">
An action was performed on this text input.
Values set with this event are double-buffered. They must be applied
and reset to initial on the next zwp_text_input_v3.done event.
The initial value of action is none.
</description>
<arg name="action" type="uint" enum="action" summary="action performed"/>
<arg name="serial" type="uint" summary="serial number of the action event"/>
</event>
<event name="language" since="2">
<description summary="notify of language selection">
Notify the application of language used by the input method.
This event will be sent on creation if known and for all subsequent changes.
The language should be specified as an IETF BCP 47 tag.
Setting an empty string will reset any known language back to the default unknown state.
</description>
<arg name="language" type="string" summary="new language set by IME"/>
</event>
<request name="set_available_actions" since="2">
<description summary="set the available actions">
Set the actions available for this text input.
Values set with this request are double-buffered. They will get applied
on the next zwp_text_input_v3.commit request.
If the available_actions array contains the none action, or contains the
same action multiple times, the compositor must raise the invalid_action
protocol error.
Initially, no actions are available.
</description>
<arg name="available_actions" type="array" summary="available actions"/>
</request>
<request name="show_input_panel" since="2">
<description summary="show input panel">
Requests an input panel to be shown (e.g. a on-screen keyboard).
This request only hints the desired interaction pattern from the
client side, and its effect may be ignored by compositors given
other environmental factors. Repeated calls will be ignored.
</description>
</request>
<request name="hide_input_panel" since="2">
<description summary="hide input panel">
Requests an input panel to be hidden.
This request only hints the desired interaction pattern from the
client side, and its effect may be ignored by compositors given
other environmental factors. Repeated calls will be ignored.
</description>
</request>
<enum name="preedit_hint">
<description summary="preedit style hint">
Style hints for the preedit string.
</description>
<entry name="whole" value="1" summary="simple pre-edit text style, typically underlined"/>
<entry name="selection" value="2"
summary="hint for a selected piece of text, e.g. per-character navigation and composition"/>
<entry name="prediction" value="3" summary="predicted text, not typed by the user"/>
<entry name="prefix" value="4"
summary="prefixed text not being currently edited, e.g. prior to a 'selection' section"/>
<entry name="suffix" value="5"
summary="suffixed text not being currently edited, e.g. after a 'selection' section"/>
<entry name="spelling_error" value="6" summary="spelling error"/>
<entry name="compose_error" value="7"
summary="wrong composition, e.g. user input that can not be transliterated"/>
</enum>
<event name="preedit_hint" since="2">
<description summary="pre-edit">
Notify of contextual hints for the pre-edit string. This
event is always sent together with a zwp_text_input_v3.preedit_string
event.
The parameters start and end are counted in bytes relative to the
beginning of the text buffer submitted through
zwp_text_input_v3.preedit_string, and represent the substring in the
pre-edit text affected by the hint.
Multiple events may be submitted if the preedit string has different
sections. The extent of hints may overlap. The parts of the preedit
string that are not covered by any zwp_text_input_v3.preedit_hint event,
the text will be considered unhinted. This is also the case if no
preedit_hint event is sent.
Clients should provide recognizable visuals to these hints. if they are
unable to comply with this requisition, it may be preferable for them
keep the preedit_shown content hint disabled.
Values set with this event are double-buffered. They must be applied
and reset on the next zwp_text_input_v3.done event.
</description>
<arg name="start" type="uint" summary="starting point of the affected substring"/>
<arg name="end" type="uint" summary="end point of the affected substring"/>
<arg name="hint" type="uint" enum="preedit_hint" summary="hint to apply"/>
</event>
</interface> </interface>
<interface name="zwp_text_input_manager_v3" version="1"> <interface name="zwp_text_input_manager_v3" version="2">
<description summary="text input manager"> <description summary="text input manager">
A factory for text-input objects. This object is a global singleton. A factory for text-input objects. This object is a global singleton.
</description> </description>

View file

@ -23,7 +23,7 @@
DEALINGS IN THE SOFTWARE. DEALINGS IN THE SOFTWARE.
</copyright> </copyright>
<interface name="zxdg_decoration_manager_v1" version="1"> <interface name="zxdg_decoration_manager_v1" version="2">
<description summary="window decoration manager"> <description summary="window decoration manager">
This interface allows a compositor to announce support for server-side This interface allows a compositor to announce support for server-side
decorations. decorations.
@ -60,18 +60,33 @@
<description summary="create a new toplevel decoration object"> <description summary="create a new toplevel decoration object">
Create a new decoration object associated with the given toplevel. Create a new decoration object associated with the given toplevel.
Creating an xdg_toplevel_decoration from an xdg_toplevel which has a For objects of version 1, creating an xdg_toplevel_decoration from an
buffer attached or committed is a client error, and any attempts by a xdg_toplevel which has a buffer attached or committed is a client
client to attach or manipulate a buffer prior to the first error, and any attempts by a client to attach or manipulate a buffer
xdg_toplevel_decoration.configure event must also be treated as prior to the first xdg_toplevel_decoration.configure event must also be
errors. treated as errors.
For objects of version 2 or newer, creating an xdg_toplevel_decoration
from an xdg_toplevel which has a buffer attached or committed is
allowed. The initial decoration mode of the surface if a buffer is
already attached depends on whether a xdg_toplevel_decoration object
has been associated with the surface or not prior to this request.
If an xdg_toplevel_decoration was associated with the surface, then
destroyed without a surface commit, the previous decoration mode is
retained.
If no xdg_toplevel_decoration was associated with the surface prior to
this request, or if a surface commit has been performed after a previous
xdg_toplevel_decoration object associated with the surface was
destroyed, the decoration mode is assumed to be client-side.
</description> </description>
<arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/> <arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel"/> <arg name="toplevel" type="object" interface="xdg_toplevel"/>
</request> </request>
</interface> </interface>
<interface name="zxdg_toplevel_decoration_v1" version="1"> <interface name="zxdg_toplevel_decoration_v1" version="2">
<description summary="decoration object for a toplevel surface"> <description summary="decoration object for a toplevel surface">
The decoration object allows the compositor to toggle server-side window The decoration object allows the compositor to toggle server-side window
decorations for a toplevel surface. The client can request to switch to decorations for a toplevel surface. The client can request to switch to
@ -94,7 +109,8 @@
<request name="destroy" type="destructor"> <request name="destroy" type="destructor">
<description summary="destroy the decoration object"> <description summary="destroy the decoration object">
Switch back to a mode without any server-side decorations at the next Switch back to a mode without any server-side decorations at the next
commit. commit, unless a new xdg_toplevel_decoration is created for the surface
first.
</description> </description>
</request> </request>

View file

@ -1,5 +0,0 @@
pkgdatadir=@abs_top_srcdir@
Name: Wayland Protocols
Description: Wayland protocol files (not installed)
Version: @WAYLAND_PROTOCOLS_VERSION@

View file

@ -1,7 +0,0 @@
prefix=@prefix@
datarootdir=@datarootdir@
pkgdatadir=${pc_sysrootdir}${datarootdir}/@PACKAGE@
Name: Wayland Protocols
Description: Wayland protocol files
Version: @WAYLAND_PROTOCOLS_VERSION@