Commit graph

148 commits

Author SHA1 Message Date
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
Diego Viola
8fcd62b39d treewide: fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2026-03-03 02:49:30 -03: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
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
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
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
Daniel Stone
3544c6dcc4 protocols: Add GitLab contact information
This is useful to know who to ping when you want to change something.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-10-09 09:07:11 +00:00
Simon Ser
9b95f83a2f xdg-output: mark done event with deprecated-since attribute
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-05 14:35:30 +00:00
Simon Ser
df2b5e5e7b xdg-decoration: add invalid_mode error
There is no error defined for invalid mode values.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-09-03 10:27:40 +00:00
YaoBing Xiao
d1d185c61f pointer-gestures: Add punctuation to clarify gesture cycles
Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
2024-08-22 15:32:28 +08:00
Derek Foreman
c5b47dc928 various: Fix definition of double-buffered state
The strict "mailbox" model of wayland past is not how modern compositors
process commits, and many explanations of how double buffered state is
applied throughout wayland-protocols are no longer strictly accurate.

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

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

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

Signed-off-by: Bartłomiej Maryńczak <marynczakbartlomiej@gmail.com>
2024-05-03 14:16:40 +02:00
Simon Ser
72b5d90a02 tablet-v2: mark as stable
This protocol extension has not changed in a long time, is
widely supported, and no upcoming breaking changes are planned.

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

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-04-11 11:42:43 +02:00
Simon Ser
8be7ad67fa linux-explicit-synchronization-v1: add linux-drm-syncobj note
The new protocol supersedes this one.

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

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

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/180
2024-02-29 13:11:57 +01:00
Simon Ser
0c4e041f64 linux-dmabuf: require all planes to use the same modifier
The kernel enforces this. Accepting a separate modifier per-plane is
an historical artifact.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/29
2023-11-24 18:49:18 +00:00
Simon Ser
479580dbe3 xdg-decoration: remove ambiguous wording in configure event
"ask the client" isn't very clear. Let's use the word "configure"
which is more explicit: the client doesn't have a say in this.
(Note, wording in the following paragraphs is clearer and uses the
word "must".)

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

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

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

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-10-10 14:43:25 +02:00
Simon Ser
e1d61ce940 linux-dmabuf: add note about implicit sync
Make it clear that implicit sync is the expectation without another
protocol extension.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-08-14 14:32:02 +02:00
Simon Ser
18aa7b27f7 tablet-v2: fix typo in set_cursor serial description
This interface has no "enter" event. This was likely copy-pasted
from wl_pointer.set_cursor.

The event which indicates focus is proximity_in.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-05-09 11:59:35 +02:00
Vlad Zahorodnii
fefd185994 linux-dmabuf: Fix a couple of typos
There are no interfaces such as zlinux_dmabuf_params and zlinux_buffer_params.

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

Closes #106

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2023-03-30 20:47:28 +00:00
Xaver Hugl
5c274ffc90 unstable/xdg-shell v6: clarify when which errors are used
Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
2023-03-30 15:44:07 +00:00
Jonas Ådahl
94482ceaf9 xdg-output: Remove and tweak contradicting examples
The "logical size" as stated by the first paragraph corresponds to the
monitor size in the global compositor space.

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

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

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

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

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

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

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-02-12 10:16:21 +00:00
Manuel Stoeckl
4f18a5baee linux-dmabuf: fix references to tranche_formats
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
2022-11-14 11:08:21 +00:00
Peter Hutterer
c96e22a8f4 tablet: fix a copy/paste error
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-06-28 07:24:14 +10:00
Carlos Garnacho
37fa0f4a4e text-input: Reword the interpretation of serials to be more specific
Here's a long story. The serial is formerly described as:

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

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

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

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

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

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

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

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

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
2022-03-29 07:33:38 +00:00
Tadeo Kondrak
8498e4c10d linux-explicit-synchronization: Annotate destructor events
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2020-06-11 14:22:55 -06:00
Tadeo Kondrak
bbb683eb79 fullscreen-shell: Annotate destructor events
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2020-06-11 14:22:39 -06:00
Simon Ser
c2ceb5f14d linux-dmabuf: fix typo in dev_t example code
dev_t is not a struct, it's a typedef.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-01-17 14:54:49 +00:00
Simon Ser
c62be976d7 linux-dmabuf: send protocol error on invalid format/modifier
Now that compositors must send INVALID to advertise support for
implicit modifiers, we can make it a protocol error to add a
DMA-BUF plane with an unsupported format + modifier pair.

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

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

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

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

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

Essentially the same as [1].

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

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-11-10 15:01:34 +00:00
Peter Hutterer
824cea61e6 pointer-gestures: add hold gestures
Hold gestures merely denote "there are fingers on the touchpad but they are
not moving". As touchpad touches are generally fully abstracted, a client
cannot currently know when a user is interacting with the touchpad without
moving - no motion events will be sent in this case.

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

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-09-13 09:07:46 +00:00
Manuel Stoeckl
f01202f4b7 xdg-output: fix minor calculation error
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-06-07 17:10:59 +00:00
Simon Ser
b1670b4dda xdg-foreign: add error enums
The protocol states that the client must provide xdg_toplevel surfaces,
but doesn't specify protocol error values that can be sent by the
compositor.

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

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

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

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2021-04-05 07:55:14 +00:00