Commit graph

509 commits

Author SHA1 Message Date
Carlos Garnacho
ae45c6c277 Merge branch 'wip/text-input-3.2' into 'main'
text-input: update to 3.2

Closes #79

See merge request wayland/wayland-protocols!282
2025-12-19 19:38:19 +00:00
Carlos Garnacho
1b7eb33769 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>
2025-12-19 20:36:44 +01:00
Carlos Garnacho
1cbb0d25df 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>
2025-12-19 20:36:44 +01:00
David Edmundson
f83f492569 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>
2025-12-19 20:36:44 +01:00
Tadeo Kondrak
6562cf724a text-input: Add actions
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2025-12-19 20:36:44 +01:00
dcz
0dd05d436f 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
2025-12-18 18:54:23 +01:00
Tadeo Kondrak
ba4ea256d1 text-input: Synchronize set_cursor_rectangle with the wl_surface
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
2025-12-18 18:52:19 +01:00
Tadeo Kondrak
163b040461 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>
2025-12-18 18:52:19 +01:00
fujiwarat
67be8069dc 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>
2025-12-18 18:52:19 +01:00
Dorota Czaplejewicz
afffbd8bf5 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>
2025-12-18 18:52:19 +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