wayland-protocols
tablet_v2 — Wayland protocol for graphics tablets xx_zones_v1 — protocol to manage client-specific zones for explicit window placement Copyright
Copyright © 2008-2011 Kristian Høgsberg
Copyright © 2010-2011 Intel Corporation
Copyright © 2012-2013 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Version 1
core global object
The core global object. This is a special singleton object. It
is used for internal Wayland protocol features.
wl_display
request sync(
callback: new_id<wl_callback>,
)- callback — callback object for the sync request
asynchronous roundtrip
The sync request asks the server to emit the 'done' event
on the returned wl_callback object. Since requests are
handled in-order and events are delivered in-order, this can
be used as a barrier to ensure all previous requests and the
resulting events have been handled.
The object returned by this request will be destroyed by the
compositor after the callback is fired and as such the client must not
attempt to use it after that point.
The callback_data passed in the callback is undefined and should be ignored.
wl_display
request get_registry(
registry: new_id<wl_registry>,
)- registry — global registry object
get global registry object
This request creates a registry object that allows the client
to list and bind the global objects available from the
compositor.
It should be noted that the server side resources consumed in
response to a get_registry request can only be released when the
client disconnects, not when the client side proxy is destroyed.
Therefore, clients should invoke get_registry as infrequently as
possible to avoid wasting memory.
wl_display
event error(
object_id: object,
code: uint,
message: string,
)- object_id — object where the error occurred
- code — error code
- message — error description
fatal error event
The error event is sent out when a fatal (non-recoverable)
error has occurred. The object_id argument is the object
where the error occurred, most often in response to a request
to that object. The code identifies the error and is defined
by the object interface. As such, each interface defines its
own set of error codes. The message is a brief description
of the error, for (debugging) convenience.
wl_display
enum error {
invalid_object = 0,
invalid_method = 1,
no_memory = 2,
implementation = 3,
}- invalid_object — server couldn't find object
- invalid_method — method doesn't exist on the specified interface or malformed request
- no_memory — server is out of memory
- implementation — implementation error in compositor
global error values
These errors are global and can be emitted in response to any
server request.
wl_display
event delete_id(
id: uint,
)acknowledge object ID deletion
This event is used internally by the object ID management logic.
When the server stops using an object created by the client, the server
sends this event. In particular, after sending this event, the server
will no longer send any events that contain the object as the receiver
or as an argument.
When the client receives this event, it knows that it can reuse the
object ID.
Version 1
- bind — bind an object to the display
- global — announce global object
- global_remove — announce removal of global object
global registry object
The singleton global registry object. The server has a number of
global objects that are available to all clients. These objects
typically represent an actual object in the server (for example,
an input device) or they are singleton objects that provide
extension functionality.
When a client creates a registry object, the registry object
will emit a global event for each global currently in the
registry. Globals come and go as a result of device or
monitor hotplugs, reconfiguration or other events, and the
registry will send out global and global_remove events to
keep the client up to date with the changes. To mark the end
of the initial burst of events, the client can use the
wl_display.sync request immediately after calling
wl_display.get_registry.
A client can bind to a global object by using the bind
request. This creates a client-side handle that lets the object
emit events to the client and lets the client invoke requests on
the object.
wl_registry
request bind(
name: uint,
id: new_id,
)- name — unique numeric name of the object
- id — bound object
bind an object to the display
Binds a new, client-created object to the server using the
specified name as the identifier.
wl_registry
event global(
name: uint,
interface: string,
version: uint,
)- name — numeric name of the global object
- interface — interface implemented by the object
- version — interface version
announce global object
Notify the client of global objects.
The event notifies the client that a global object with
the given name is now available, and it implements the
given version of the given interface.
wl_registry
event global_remove(
name: uint,
)- name — numeric name of the global object
announce removal of global object
Notify the client of removed global objects.
This event notifies the client that the global identified
by name is no longer available. If the client bound to
the global using the bind request, the client should now
destroy that object.
The object remains valid and requests to the object will be
ignored until the client destroys it, to avoid races between
the global going away and a client sending a request to it.
This interface is frozen
callback object
Clients can handle the 'done' event to get notified when
the related request is done.
Note, because wl_callback objects are created from multiple independent
factory interfaces, the wl_callback interface is frozen at version 1.
wl_callback
event done(
callback_data: uint,
)Destructor
- callback_data — request-specific data for the callback
done event
Notify the client when the related request is done.
Version 7
Compositor Support
Version 6cage 0.3.0
hyprland 0.52.1
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
Version 5cosmic 1.0.0
gamescope 3.15.14
muffin 6.7.4
weston 15.0.1
the compositor singleton
A compositor. This object is a singleton global. The
compositor is in charge of combining the contents of multiple
surfaces into one displayable output.
wl_compositor
request release()
DestructorAvailable since version 7
destroy wl_compositor
This request destroys the wl_compositor. This has no effect on any other objects.
Version 3
a shared memory pool
The wl_shm_pool object encapsulates a piece of memory shared
between the compositor and client. Through the wl_shm_pool
object, the client can allocate shared memory wl_buffer objects.
All objects created through the same pool share the same
underlying mapped memory. Reusing the mapped memory avoids the
setup/teardown overhead and is useful when interactively resizing
a surface or for many small buffers.
wl_shm_pool
enum error {
invalid_format = 0,
invalid_stride = 1,
}Available since version 3
- invalid_format — buffer format is not known
- invalid_stride — invalid size or stride during buffer creation
wl_shm_pool error values
These errors can be emitted in response to wl_shm_pool requests.
wl_shm_pool
request create_buffer(
id: new_id<wl_buffer>,
offset: int,
width: int,
height: int,
stride: int,
format: uint<wl_shm.format>,
)- id — buffer to create
- offset — buffer byte offset within the pool
- width — buffer width, in pixels
- height — buffer height, in pixels
- stride — number of bytes from the beginning of one row to the beginning of the next row
- format — buffer pixel format
create a buffer from the pool
Create a wl_buffer object from the pool.
The buffer is created offset bytes into the pool and has
width and height as specified. The stride argument specifies
the number of bytes from the beginning of one row to the beginning
of the next. The format is the pixel format of the buffer and
must be one of those advertised through the wl_shm.format event.
A buffer will keep a reference to the pool it was created from
so it is valid to destroy the pool immediately after creating
a buffer from it.
wl_shm_pool
request destroy()
Destructor
destroy the pool
Destroy the shared memory pool.
The mmapped memory will be released when all
buffers that have been created from this pool
are gone.
wl_shm_pool
request resize(
size: int,
)- size — new size of the pool, in bytes
change the size of the pool mapping
This request will cause the server to remap the backing memory
for the pool from the file descriptor passed when the pool was
created, but using the new size. This request can only be
used to make the pool bigger.
This request only changes the amount of bytes that are mmapped
by the server and does not touch the file corresponding to the
file descriptor passed at creation time. It is the client's
responsibility to ensure that the file is at least as big as
the new pool size.
Version 3
Compositor Support
Version 2cage 0.3.0
cosmic 1.0.0
gamescope 3.15.14
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
sway 1.11
treeland 0.8.0
wayfire 0.9.0
weston 15.0.1
Version 1hyprland 0.52.1
mir 2.26
river 0.3.13
shared memory support
A singleton global object that provides support for shared
memory.
Clients can create wl_shm_pool objects using the create_pool
request.
On binding the wl_shm object one or more format events
are emitted to inform clients about the valid pixel formats
that can be used for buffers.
wl_shm
enum error {
invalid_format = 0,
invalid_stride = 1,
invalid_fd = 2,
}Available since version 3
wl_shm error values
These errors can be emitted in response to wl_shm requests.
wl_shm
enum format {
argb8888 = 0,
xrgb8888 = 1,
c8 = 0x20203843,
rgb332 = 0x38424752,
bgr233 = 0x38524742,
xrgb4444 = 0x32315258,
xbgr4444 = 0x32314258,
rgbx4444 = 0x32315852,
bgrx4444 = 0x32315842,
argb4444 = 0x32315241,
abgr4444 = 0x32314241,
rgba4444 = 0x32314152,
bgra4444 = 0x32314142,
xrgb1555 = 0x35315258,
xbgr1555 = 0x35314258,
rgbx5551 = 0x35315852,
bgrx5551 = 0x35315842,
argb1555 = 0x35315241,
abgr1555 = 0x35314241,
rgba5551 = 0x35314152,
bgra5551 = 0x35314142,
rgb565 = 0x36314752,
bgr565 = 0x36314742,
rgb888 = 0x34324752,
bgr888 = 0x34324742,
xbgr8888 = 0x34324258,
rgbx8888 = 0x34325852,
bgrx8888 = 0x34325842,
abgr8888 = 0x34324241,
rgba8888 = 0x34324152,
bgra8888 = 0x34324142,
xrgb2101010 = 0x30335258,
xbgr2101010 = 0x30334258,
rgbx1010102 = 0x30335852,
bgrx1010102 = 0x30335842,
argb2101010 = 0x30335241,
abgr2101010 = 0x30334241,
rgba1010102 = 0x30334152,
bgra1010102 = 0x30334142,
yuyv = 0x56595559,
yvyu = 0x55595659,
uyvy = 0x59565955,
vyuy = 0x59555956,
ayuv = 0x56555941,
nv12 = 0x3231564e,
nv21 = 0x3132564e,
nv16 = 0x3631564e,
nv61 = 0x3136564e,
yuv410 = 0x39565559,
yvu410 = 0x39555659,
yuv411 = 0x31315559,
yvu411 = 0x31315659,
yuv420 = 0x32315559,
yvu420 = 0x32315659,
yuv422 = 0x36315559,
yvu422 = 0x36315659,
yuv444 = 0x34325559,
yvu444 = 0x34325659,
r8 = 0x20203852,
r16 = 0x20363152,
rg88 = 0x38384752,
gr88 = 0x38385247,
rg1616 = 0x32334752,
gr1616 = 0x32335247,
xrgb16161616f = 0x48345258,
xbgr16161616f = 0x48344258,
argb16161616f = 0x48345241,
abgr16161616f = 0x48344241,
xyuv8888 = 0x56555958,
vuy888 = 0x34325556,
vuy101010 = 0x30335556,
y210 = 0x30313259,
y212 = 0x32313259,
y216 = 0x36313259,
y410 = 0x30313459,
y412 = 0x32313459,
y416 = 0x36313459,
xvyu2101010 = 0x30335658,
xvyu12_16161616 = 0x36335658,
xvyu16161616 = 0x38345658,
y0l0 = 0x304c3059,
x0l0 = 0x304c3058,
y0l2 = 0x324c3059,
x0l2 = 0x324c3058,
yuv420_8bit = 0x38305559,
yuv420_10bit = 0x30315559,
xrgb8888_a8 = 0x38415258,
xbgr8888_a8 = 0x38414258,
rgbx8888_a8 = 0x38415852,
bgrx8888_a8 = 0x38415842,
rgb888_a8 = 0x38413852,
bgr888_a8 = 0x38413842,
rgb565_a8 = 0x38413552,
bgr565_a8 = 0x38413542,
nv24 = 0x3432564e,
nv42 = 0x3234564e,
p210 = 0x30313250,
p010 = 0x30313050,
p012 = 0x32313050,
p016 = 0x36313050,
axbxgxrx106106106106 = 0x30314241,
nv15 = 0x3531564e,
q410 = 0x30313451,
q401 = 0x31303451,
xrgb16161616 = 0x38345258,
xbgr16161616 = 0x38344258,
argb16161616 = 0x38345241,
abgr16161616 = 0x38344241,
c1 = 0x20203143,
c2 = 0x20203243,
c4 = 0x20203443,
d1 = 0x20203144,
d2 = 0x20203244,
d4 = 0x20203444,
d8 = 0x20203844,
r1 = 0x20203152,
r2 = 0x20203252,
r4 = 0x20203452,
r10 = 0x20303152,
r12 = 0x20323152,
avuy8888 = 0x59555641,
xvuy8888 = 0x59555658,
p030 = 0x30333050,
rgb161616 = 0x38344752,
bgr161616 = 0x38344742,
r16f = 0x48202052,
gr1616f = 0x48205247,
bgr161616f = 0x48524742,
r32f = 0x46202052,
gr3232f = 0x46205247,
bgr323232f = 0x46524742,
abgr32323232f = 0x46384241,
nv20 = 0x3032564e,
nv30 = 0x3033564e,
s010 = 0x30313053,
s210 = 0x30313253,
s410 = 0x30313453,
s012 = 0x32313053,
s212 = 0x32313253,
s412 = 0x32313453,
s016 = 0x36313053,
s216 = 0x36313253,
s416 = 0x36313453,
xvuy2101010 = 0x30335958,
p230 = 0x30333250,
t430 = 0x30333454,
y8 = 0x59455247,
xyyy2101010 = 0x34415059,
}- argb8888 — 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
- xrgb8888 — 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian
- c8 — 8-bit color index format, [7:0] C
- rgb332 — 8-bit RGB format, [7:0] R:G:B 3:3:2
- bgr233 — 8-bit BGR format, [7:0] B:G:R 2:3:3
- xrgb4444 — 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian
- xbgr4444 — 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian
- rgbx4444 — 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian
- bgrx4444 — 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian
- argb4444 — 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian
- abgr4444 — 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian
- rgba4444 — 16-bit RGBA format, [15:0] R:G:B:A 4:4:4:4 little endian
- bgra4444 — 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian
- xrgb1555 — 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian
- xbgr1555 — 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian
- rgbx5551 — 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian
- bgrx5551 — 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian
- argb1555 — 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian
- abgr1555 — 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian
- rgba5551 — 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian
- bgra5551 — 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian
- rgb565 — 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian
- bgr565 — 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian
- rgb888 — 24-bit RGB format, [23:0] R:G:B little endian
- bgr888 — 24-bit BGR format, [23:0] B:G:R little endian
- xbgr8888 — 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian
- rgbx8888 — 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian
- bgrx8888 — 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian
- abgr8888 — 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian
- rgba8888 — 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian
- bgra8888 — 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian
- xrgb2101010 — 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian
- xbgr2101010 — 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian
- rgbx1010102 — 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian
- bgrx1010102 — 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian
- argb2101010 — 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian
- abgr2101010 — 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian
- rgba1010102 — 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian
- bgra1010102 — 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian
- yuyv — packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
- yvyu — packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian
- uyvy — packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian
- vyuy — packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian
- ayuv — packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian
- nv12 — 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane
- nv21 — 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane
- nv16 — 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane
- nv61 — 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane
- yuv410 — 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes
- yvu410 — 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes
- yuv411 — 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes
- yvu411 — 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes
- yuv420 — 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes
- yvu420 — 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes
- yuv422 — 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes
- yvu422 — 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes
- yuv444 — 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes
- yvu444 — 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes
- r8 — [7:0] R
- r16 — [15:0] R little endian
- rg88 — [15:0] R:G 8:8 little endian
- gr88 — [15:0] G:R 8:8 little endian
- rg1616 — [31:0] R:G 16:16 little endian
- gr1616 — [31:0] G:R 16:16 little endian
- xrgb16161616f — [63:0] x:R:G:B 16:16:16:16 little endian
- xbgr16161616f — [63:0] x:B:G:R 16:16:16:16 little endian
- argb16161616f — [63:0] A:R:G:B 16:16:16:16 little endian
- abgr16161616f — [63:0] A:B:G:R 16:16:16:16 little endian
- xyuv8888 — [31:0] X:Y:Cb:Cr 8:8:8:8 little endian
- vuy888 — [23:0] Cr:Cb:Y 8:8:8 little endian
- vuy101010 — Y followed by U then V, 10:10:10. Non-linear modifier only
- y210 — [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels
- y212 — [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels
- y216 — [63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels
- y410 — [31:0] A:Cr:Y:Cb 2:10:10:10 little endian
- y412 — [63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian
- y416 — [63:0] A:Cr:Y:Cb 16:16:16:16 little endian
- xvyu2101010 — [31:0] X:Cr:Y:Cb 2:10:10:10 little endian
- xvyu12_16161616 — [63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian
- xvyu16161616 — [63:0] X:Cr:Y:Cb 16:16:16:16 little endian
- y0l0 — [63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian
- x0l0 — [63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian
- y0l2 — [63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian
- x0l2 — [63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian
- nv24 — non-subsampled Cr:Cb plane
- nv42 — non-subsampled Cb:Cr plane
- p210 — 2x1 subsampled Cr:Cb plane, 10 bit per channel
- p010 — 2x2 subsampled Cr:Cb plane 10 bits per channel
- p012 — 2x2 subsampled Cr:Cb plane 12 bits per channel
- p016 — 2x2 subsampled Cr:Cb plane 16 bits per channel
- axbxgxrx106106106106 — [63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian
- nv15 — 2x2 subsampled Cr:Cb plane
- xrgb16161616 — [63:0] x:R:G:B 16:16:16:16 little endian
- xbgr16161616 — [63:0] x:B:G:R 16:16:16:16 little endian
- argb16161616 — [63:0] A:R:G:B 16:16:16:16 little endian
- abgr16161616 — [63:0] A:B:G:R 16:16:16:16 little endian
- c1 — [7:0] C0:C1:C2:C3:C4:C5:C6:C7 1:1:1:1:1:1:1:1 eight pixels/byte
- c2 — [7:0] C0:C1:C2:C3 2:2:2:2 four pixels/byte
- c4 — [7:0] C0:C1 4:4 two pixels/byte
- d1 — [7:0] D0:D1:D2:D3:D4:D5:D6:D7 1:1:1:1:1:1:1:1 eight pixels/byte
- d2 — [7:0] D0:D1:D2:D3 2:2:2:2 four pixels/byte
- d4 — [7:0] D0:D1 4:4 two pixels/byte
- d8 — [7:0] D
- r1 — [7:0] R0:R1:R2:R3:R4:R5:R6:R7 1:1:1:1:1:1:1:1 eight pixels/byte
- r2 — [7:0] R0:R1:R2:R3 2:2:2:2 four pixels/byte
- r4 — [7:0] R0:R1 4:4 two pixels/byte
- r10 — [15:0] x:R 6:10 little endian
- r12 — [15:0] x:R 4:12 little endian
- avuy8888 — [31:0] A:Cr:Cb:Y 8:8:8:8 little endian
- xvuy8888 — [31:0] X:Cr:Cb:Y 8:8:8:8 little endian
- p030 — 2x2 subsampled Cr:Cb plane 10 bits per channel packed
- rgb161616 — [47:0] R:G:B 16:16:16 little endian
- bgr161616 — [47:0] B:G:R 16:16:16 little endian
- r16f — [15:0] R 16 little endian
- gr1616f — [31:0] G:R 16:16 little endian
- bgr161616f — [47:0] B:G:R 16:16:16 little endian
- r32f — [31:0] R 32 little endian
- gr3232f — [63:0] G:R 32:32 little endian
- bgr323232f — [95:0] B:G:R 32:32:32 little endian
- abgr32323232f — [127:0] A:B:G:R 32:32:32:32 little endian
- nv20 — 2x1 subsampled Cr:Cb plane
- nv30 — non-subsampled Cr:Cb plane
- s010 — 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel
- s210 — 2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel
- s410 — non-subsampled Cb (1) and Cr (2) planes 10 bits per channel
- s012 — 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel
- s212 — 2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel
- s412 — non-subsampled Cb (1) and Cr (2) planes 12 bits per channel
- s016 — 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel
- s216 — 2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel
- s416 — non-subsampled Cb (1) and Cr (2) planes 16 bits per channel
- xvuy2101010 — [31:0] x:Cr:Cb:Y 2:10:10:10 little endian
- p230 — 2x1 subsampled Cr:Cb plane 10 bits per channel packed
- y8 — 8-bit Y-only
- xyyy2101010 — [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian
pixel formats
This describes the memory layout of an individual pixel.
All renderers should support argb8888 and xrgb8888 but any other
formats are optional and may not be supported by the particular
renderer in use.
The drm format codes match the macros defined in drm_fourcc.h, except
argb8888 and xrgb8888. The formats actually supported by the compositor
will be reported by the format event. See drm_fourcc.h for more detailed
format descriptions.
For all wl_shm formats and unless specified in another protocol
extension, pre-multiplied alpha is used for pixel values.
wl_shm
request create_pool(
id: new_id<wl_shm_pool>,
fd: fd,
size: int,
)- id — pool to create
- fd — file descriptor for the pool
- size — pool size, in bytes
create a shm pool
Create a new wl_shm_pool object.
The pool can be used to create shared memory based buffer
objects. The server will mmap size bytes of the passed file
descriptor, to use as backing memory for the pool.
wl_shm
event format(
format: uint<format>,
)- format — buffer pixel format
pixel format description
Informs the client about a valid pixel format that
can be used for buffers. Known formats include
argb8888 and xrgb8888.
Extensions to drm_fourcc.h (or the format enum) do not require
increasing the wl_shm version; as a result, clients may receive format
codes which were not in the list at the time the client was made.
wl_shm
request release()
DestructorAvailable since version 2
release the shm object
Using this request a client can tell the server that it is not going to
use the shm object anymore.
Objects created via this interface remain unaffected.
This interface is frozen
content for a wl_surface
A buffer provides the content for a wl_surface. Buffers are
created through factory interfaces such as wl_shm, wp_linux_buffer_params
(from the linux-dmabuf protocol extension) or similar. It has a width and
a height and can be attached to a wl_surface, but the mechanism by which a
client provides and updates the contents is defined by the buffer factory
interface.
Color channels are assumed to be electrical rather than optical (in other
words, encoded with a transfer function) unless otherwise specified. If
the buffer uses a format that has an alpha channel, the alpha channel is
assumed to be premultiplied into the electrical color channel values
(after transfer function encoding) unless otherwise specified.
Note, because wl_buffer objects are created from multiple independent
factory interfaces, the wl_buffer interface is frozen at version 1.
wl_buffer
request destroy()
Destructor
destroy a buffer
Destroy a buffer. If and how you need to release the backing
storage is defined by the buffer factory interface.
For possible side-effects to a surface, see wl_surface.attach.
wl_buffer
event release()
compositor releases buffer
Sent when this wl_buffer is no longer used by the compositor.
For more information on when release events may or may not be sent,
and what consequences it has, please see the description of
wl_surface.attach.
If a client receives a release event before the frame callback
requested in the same wl_surface.commit that attaches this
wl_buffer to a surface, then the client is immediately free to
reuse the buffer and its backing storage, and does not need a
second buffer for the next surface content update. Typically
this is possible, when the compositor maintains a copy of the
wl_surface contents, e.g. as a GL texture. This is an important
optimization for GL(ES) compositors with wl_shm clients.
Version 4
- error
- accept — accept one of the offered mime types
- receive — request that the data is transferred
- destroy — destroy data offer
- offer — advertise offered mime type
- finish — the offer will no longer be used
- set_actions — set the available/preferred drag-and-drop actions
- source_actions — notify the source-side available actions
- action — notify the selected action
offer to transfer data
A wl_data_offer represents a piece of data offered for transfer
by another client (the source client). It is used by the
copy-and-paste and drag-and-drop mechanisms. The offer
describes the different mime types that the data can be
converted to and provides the mechanism for transferring the
data directly from the source client.
wl_data_offer
enum error {
invalid_finish = 0,
invalid_action_mask = 1,
invalid_action = 2,
invalid_offer = 3,
}- invalid_finish — finish request was called untimely
- invalid_action_mask — action mask contains invalid values
- invalid_action — action argument has an invalid value
- invalid_offer — offer doesn't accept this request
wl_data_offer
request accept(
serial: uint,
mime_type: nullable string,
)- serial — serial number of the accept request
- mime_type — mime type accepted by the client
accept one of the offered mime types
Indicate that the client can accept the given mime type, or
NULL for not accepted.
For objects of version 2 or older, this request is used by the
client to give feedback whether the client can receive the given
mime type, or NULL if none is accepted; the feedback does not
determine whether the drag-and-drop operation succeeds or not.
For objects of version 3 or newer, this request determines the
final result of the drag-and-drop operation. If the end result
is that no mime types were accepted, the drag-and-drop operation
will be cancelled and the corresponding drag source will receive
wl_data_source.cancelled. Clients may still use this event in
conjunction with wl_data_source.action for feedback.
wl_data_offer
request receive(
mime_type: string,
fd: fd,
)- mime_type — mime type desired by receiver
- fd — file descriptor for data transfer
request that the data is transferred
To transfer the offered data, the client issues this request
and indicates the mime type it wants to receive. The transfer
happens through the passed file descriptor (typically created
with the pipe system call). The source client writes the data
in the mime type representation requested and then closes the
file descriptor.
The receiving client reads from the read end of the pipe until
EOF and then closes its end, at which point the transfer is
complete.
This request may happen multiple times for different mime types,
both before and after wl_data_device.drop. Drag-and-drop destination
clients may preemptively fetch data or examine it more closely to
determine acceptance.
wl_data_offer
event offer(
mime_type: string,
)- mime_type — offered mime type
advertise offered mime type
Sent immediately after creating the wl_data_offer object. One
event per offered mime type.
wl_data_offer
request finish()
Available since version 3
the offer will no longer be used
Notifies the compositor that the drag destination successfully
finished the drag-and-drop operation.
Upon receiving this request, the compositor will emit
wl_data_source.dnd_finished on the drag source client.
It is a client error to perform other requests than
wl_data_offer.destroy after this one. It is also an error to perform
this request after a NULL mime type has been set in
wl_data_offer.accept or no action was received through
wl_data_offer.action.
If wl_data_offer.finish request is received for a non drag and drop
operation, the invalid_finish protocol error is raised.
wl_data_offer
request set_actions(
dnd_actions: uint<wl_data_device_manager.dnd_action>,
preferred_action: uint<wl_data_device_manager.dnd_action>,
)Available since version 3
- dnd_actions — actions supported by the destination client
- preferred_action — action preferred by the destination client
set the available/preferred drag-and-drop actions
Sets the actions that the destination side client supports for
this operation. This request may trigger the emission of
wl_data_source.action and wl_data_offer.action events if the compositor
needs to change the selected action.
This request can be called multiple times throughout the
drag-and-drop operation, typically in response to wl_data_device.enter
or wl_data_device.motion events.
This request determines the final result of the drag-and-drop
operation. If the end result is that no action is accepted,
the drag source will receive wl_data_source.cancelled.
The dnd_actions argument must contain only values expressed in the
wl_data_device_manager.dnd_actions enum, and the preferred_action
argument must only contain one of those values set, otherwise it
will result in a protocol error.
While managing an "ask" action, the destination drag-and-drop client
may perform further wl_data_offer.receive requests, and is expected
to perform one last wl_data_offer.set_actions request with a preferred
action other than "ask" (and optionally wl_data_offer.accept) before
requesting wl_data_offer.finish, in order to convey the action selected
by the user. If the preferred action is not in the
wl_data_offer.source_actions mask, an error will be raised.
If the "ask" action is dismissed (e.g. user cancellation), the client
is expected to perform wl_data_offer.destroy right away.
This request can only be made on drag-and-drop offers, a protocol error
will be raised otherwise.
wl_data_offer
event action(
dnd_action: uint<wl_data_device_manager.dnd_action>,
)Available since version 3
- dnd_action — action selected by the compositor
notify the selected action
This event indicates the action selected by the compositor after
matching the source/destination side actions. Only one action (or
none) will be offered here.
This event can be emitted multiple times during the drag-and-drop
operation in response to destination side action changes through
wl_data_offer.set_actions.
This event will no longer be emitted after wl_data_device.drop
happened on the drag-and-drop destination, the client must
honor the last action received, or the last preferred one set
through wl_data_offer.set_actions when handling an "ask" action.
Compositors may also change the selected action on the fly, mainly
in response to keyboard modifier changes during the drag-and-drop
operation.
The most recent action received is always the valid one. Prior to
receiving wl_data_device.drop, the chosen action may change (e.g.
due to keyboard modifiers being pressed). At the time of receiving
wl_data_device.drop the drag-and-drop destination must honor the
last action received.
Action changes may still happen after wl_data_device.drop,
especially on "ask" actions, where the drag-and-drop destination
may choose another action afterwards. Action changes happening
at this stage are always the result of inter-client negotiation, the
compositor shall no longer be able to induce a different action.
Upon "ask" actions, it is expected that the drag-and-drop destination
may potentially choose a different action and/or mime type,
based on wl_data_offer.source_actions and finally chosen by the
user (e.g. popping up a menu with the available options). The
final wl_data_offer.set_actions and wl_data_offer.accept requests
must happen before the call to wl_data_offer.finish.
Version 4
offer to transfer data
The wl_data_source object is the source side of a wl_data_offer.
It is created by the source client in a data transfer and
provides a way to describe the offered data and a way to respond
to requests to transfer the data.
wl_data_source
enum error {
invalid_action_mask = 0,
invalid_source = 1,
}- invalid_action_mask — action mask contains invalid values
- invalid_source — source doesn't accept this request
wl_data_source
request offer(
mime_type: string,
)- mime_type — mime type offered by the data source
add an offered mime type
This request adds a mime type to the set of mime types
advertised to targets. Can be called several times to offer
multiple types.
wl_data_source
event target(
mime_type: nullable string,
)- mime_type — mime type accepted by the target
a target accepts an offered mime type
Sent when a target accepts pointer_focus or motion events. If
a target does not accept any of the offered types, type is NULL.
Used for feedback during drag-and-drop.
wl_data_source
event send(
mime_type: string,
fd: fd,
)- mime_type — mime type for the data
- fd — file descriptor for the data
send the data
Request for data from the client. Send the data as the
specified mime type over the passed file descriptor, then
close it.
wl_data_source
event cancelled()
selection was cancelled
This data source is no longer valid. There are several reasons why
this could happen:
The data source has been replaced by another data source.
The drag-and-drop operation was performed, but the drop destination
did not accept any of the mime types offered through
wl_data_source.target.
The drag-and-drop operation was performed, but the drop destination
did not select any of the actions present in the mask offered through
wl_data_source.action.
The drag-and-drop operation was performed but didn't happen over a
surface.
The compositor cancelled the drag-and-drop operation (e.g. compositor
dependent timeouts to avoid stale drag-and-drop transfers).
The client should clean up and destroy this data source.
For objects of version 2 or older, wl_data_source.cancelled will
only be emitted if the data source was replaced by another data
source.
wl_data_source
request set_actions(
dnd_actions: uint<wl_data_device_manager.dnd_action>,
)Available since version 3
- dnd_actions — actions supported by the data source
set the available drag-and-drop actions
Sets the actions that the source side client supports for this
operation. This request may trigger wl_data_source.action and
wl_data_offer.action events if the compositor needs to change the
selected action.
The dnd_actions argument must contain only values expressed in the
wl_data_device_manager.dnd_actions enum, otherwise it will result
in a protocol error.
This request must be made once only, and can only be made on sources
used in drag-and-drop, so it must be performed before
wl_data_device.start_drag. Attempting to use the source other than
for drag-and-drop will raise a protocol error.
wl_data_source
event dnd_drop_performed()
Available since version 3
the drag-and-drop operation physically finished
The user performed the drop action. This event does not indicate
acceptance, wl_data_source.cancelled may still be emitted afterwards
if the drop destination does not accept any mime type.
However, this event might not be received if the compositor cancelled
the drag-and-drop operation before this event could happen.
Note that the data_source may still be used in the future and should
not be destroyed here.
wl_data_source
event dnd_finished()
Available since version 3
the drag-and-drop operation concluded
The drop destination finished interoperating with this data
source, so the client is now free to destroy this data source and
free all associated data.
If the action used to perform the operation was "move", the
source can now delete the transferred data.
wl_data_source
event action(
dnd_action: uint<wl_data_device_manager.dnd_action>,
)Available since version 3
- dnd_action — action selected by the compositor
notify the selected action
This event indicates the action selected by the compositor after
matching the source/destination side actions. Only one action (or
none) will be offered here.
This event can be emitted multiple times during the drag-and-drop
operation, mainly in response to destination side changes through
wl_data_offer.set_actions, and as the data device enters/leaves
surfaces.
It is only possible to receive this event after
wl_data_source.dnd_drop_performed if the drag-and-drop operation
ended in an "ask" action, in which case the final wl_data_source.action
event will happen immediately before wl_data_source.dnd_finished.
Compositors may also change the selected action on the fly, mainly
in response to keyboard modifier changes during the drag-and-drop
operation.
The most recent action received is always the valid one. The chosen
action may change alongside negotiation (e.g. an "ask" action can turn
into a "move" operation), so the effects of the final action must
always be applied in wl_data_source.dnd_finished.
Clients can trigger cursor surface changes from this point, so
they reflect the current action.
Version 4
wl_data_device
enum error {
role = 0,
used_source = 1,
}- role — given wl_surface has another role
- used_source — source has already been used
wl_data_device
request start_drag(
source: nullable object<wl_data_source>,
origin: object<wl_surface>,
icon: nullable object<wl_surface>,
serial: uint,
)- source — data source for the eventual transfer
- origin — surface where the drag originates
- icon — drag-and-drop icon surface
- serial — serial number of the implicit grab on the origin
start drag-and-drop operation
This request asks the compositor to start a drag-and-drop
operation on behalf of the client.
The source argument is the data source that provides the data
for the eventual data transfer. If source is NULL, enter, leave
and motion events are sent only to the client that initiated the
drag and the client is expected to handle the data passing
internally. If source is destroyed, the drag-and-drop session will be
cancelled.
The origin surface is the surface where the drag originates and
the client must have an active implicit grab that matches the
serial.
The icon surface is an optional (can be NULL) surface that
provides an icon to be moved around with the cursor. Initially,
the top-left corner of the icon surface is placed at the cursor
hotspot, but subsequent wl_surface.offset requests can move the
relative position. Attach requests must be confirmed with
wl_surface.commit as usual. The icon surface is given the role of
a drag-and-drop icon. If the icon surface already has another role,
it raises a protocol error.
The input region is ignored for wl_surfaces with the role of a
drag-and-drop icon.
The given source may not be used in any further set_selection or
start_drag requests. Attempting to reuse a previously-used source
may send a used_source error.
wl_data_device
request set_selection(
source: nullable object<wl_data_source>,
serial: uint,
)- source — data source for the selection
- serial — serial number of the event that triggered this request
copy data to the selection
This request asks the compositor to set the selection
to the data from the source on behalf of the client.
To unset the selection, set the source to NULL.
The given source may not be used in any further set_selection or
start_drag requests. Attempting to reuse a previously-used source
may send a used_source error.
wl_data_device
event data_offer(
id: new_id<wl_data_offer>,
)- id — the new data_offer object
introduce a new wl_data_offer
The data_offer event introduces a new wl_data_offer object,
which will subsequently be used in either the
data_device.enter event (for drag-and-drop) or the
data_device.selection event (for selections). Immediately
following the data_device.data_offer event, the new data_offer
object will send out data_offer.offer events to describe the
mime types it offers.
wl_data_device
event enter(
serial: uint,
surface: object<wl_surface>,
x: fixed,
y: fixed,
id: nullable object<wl_data_offer>,
)- serial — serial number of the enter event
- surface — client surface entered
- x — surface-local x coordinate
- y — surface-local y coordinate
- id — source data_offer object
initiate drag-and-drop session
This event is sent when an active drag-and-drop pointer enters
a surface owned by the client. The position of the pointer at
enter time is provided by the x and y arguments, in surface-local
coordinates.
wl_data_device
event leave()
end drag-and-drop session
This event is sent when the drag-and-drop pointer leaves the
surface and the session ends. The client must destroy the
wl_data_offer introduced at enter time at this point.
wl_data_device
event motion(
time: uint,
x: fixed,
y: fixed,
)- time — timestamp with millisecond granularity
- x — surface-local x coordinate
- y — surface-local y coordinate
drag-and-drop session motion
This event is sent when the drag-and-drop pointer moves within
the currently focused surface. The new position of the pointer
is provided by the x and y arguments, in surface-local
coordinates.
wl_data_device
event drop()
end drag-and-drop session successfully
The event is sent when a drag-and-drop operation is ended
because the implicit grab is removed.
The drag-and-drop destination is expected to honor the last action
received through wl_data_offer.action, if the resulting action is
"copy" or "move", the destination can still perform
wl_data_offer.receive requests, and is expected to end all
transfers with a wl_data_offer.finish request.
If the resulting action is "ask", the action will not be considered
final. The drag-and-drop destination is expected to perform one last
wl_data_offer.set_actions request, or wl_data_offer.destroy in order
to cancel the operation.
wl_data_device
event selection(
id: nullable object<wl_data_offer>,
)- id — selection data_offer object
advertise new selection
The selection event is sent out to notify the client of a new
wl_data_offer for the selection for this device. The
data_device.data_offer and the data_offer.offer events are
sent out immediately before this event to introduce the data
offer object. The selection event is sent to a client
immediately before receiving keyboard focus and when a new
selection is set while the client has keyboard focus. The
data_offer is valid until a new data_offer or NULL is received
or until the client loses keyboard focus. Switching surface with
keyboard focus within the same client doesn't mean a new selection
will be sent. The client must destroy the previous selection
data_offer, if any, upon receiving this event.
wl_data_device
request release()
DestructorAvailable since version 2
destroy data device
This request destroys the data device.
Version 4
Compositor Support
Version 3cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
weston 15.0.1
wl_data_device_manager
enum dnd_action {
none = 0,
copy = 1,
move = 2,
ask = 4,
}This is a bitfieldAvailable since version 3
- none — no action
- copy — copy action
- move — move action
- ask — ask action
drag and drop actions
This is a bitmask of the available/preferred actions in a
drag-and-drop operation.
In the compositor, the selected action is a result of matching the
actions offered by the source and destination sides. "action" events
with a "none" action will be sent to both source and destination if
there is no match. All further checks will effectively happen on
(source actions ∩ destination actions).
In addition, compositors may also pick different actions in
reaction to key modifiers being pressed. One common design that
is used in major toolkits (and the behavior recommended for
compositors) is:
If no modifiers are pressed, the first match (in bit order)
will be used.
Pressing Shift selects "move", if enabled in the mask.
Pressing Control selects "copy", if enabled in the mask.
Behavior beyond that is considered implementation-dependent.
Compositors may for example bind other modifiers (like Alt/Meta)
or drags initiated with other buttons than BTN_LEFT to specific
actions (e.g. "ask").
Version 1
Compositor Support
create desktop-style surfaces
This interface is implemented by servers that provide
desktop-style user interfaces.
It allows clients to associate a wl_shell_surface with
a basic surface.
Note! This protocol is deprecated and not intended for production use.
For desktop-style user interfaces, use xdg_shell. Compositors and clients
should not implement this interface.
wl_shell
enum error {
role = 0,
}- role — given wl_surface has another role
wl_shell
request get_shell_surface(
id: new_id<wl_shell_surface>,
surface: object<wl_surface>,
)- id — shell surface to create
- surface — surface to be given the shell surface role
create a shell surface from a surface
Create a shell surface for an existing surface. This gives
the wl_surface the role of a shell surface. If the wl_surface
already has another role, it raises a protocol error.
Only one shell surface can be associated with a given surface.
Version 1
desktop-style metadata interface
An interface that may be implemented by a wl_surface, for
implementations that provide a desktop-style user interface.
It provides requests to treat surfaces like toplevel, fullscreen
or popup windows, move, resize or maximize them, associate
metadata like title and class, etc.
On the server side the object is automatically destroyed when
the related wl_surface is destroyed. On the client side,
wl_shell_surface_destroy() must be called before destroying
the wl_surface object.
wl_shell_surface
request pong(
serial: uint,
)- serial — serial number of the ping event
respond to a ping event
A client must respond to a ping event with a pong request or
the client may be deemed unresponsive.
wl_shell_surface
request move(
seat: object<wl_seat>,
serial: uint,
)- seat — seat whose pointer is used
- serial — serial number of the implicit grab on the pointer
start an interactive move
Start a pointer-driven move of the surface.
This request must be used in response to a button press event.
The server may ignore move requests depending on the state of
the surface (e.g. fullscreen or maximized).
wl_shell_surface
enum resize {
none = 0,
top = 1,
bottom = 2,
left = 4,
top_left = 5,
bottom_left = 6,
right = 8,
top_right = 9,
bottom_right = 10,
}This is a bitfield
- none — no edge
- top — top edge
- bottom — bottom edge
- left — left edge
- top_left — top and left edges
- bottom_left — bottom and left edges
- right — right edge
- top_right — top and right edges
- bottom_right — bottom and right edges
edge values for resizing
These values are used to indicate which edge of a surface
is being dragged in a resize operation. The server may
use this information to adapt its behavior, e.g. choose
an appropriate cursor image.
wl_shell_surface
request resize(
seat: object<wl_seat>,
serial: uint,
edges: uint<resize>,
)- seat — seat whose pointer is used
- serial — serial number of the implicit grab on the pointer
- edges — which edge or corner is being dragged
start an interactive resize
Start a pointer-driven resizing of the surface.
This request must be used in response to a button press event.
The server may ignore resize requests depending on the state of
the surface (e.g. fullscreen or maximized).
wl_shell_surface
request set_toplevel()
make the surface a toplevel surface
Map the surface as a toplevel surface.
A toplevel surface is not fullscreen, maximized or transient.
wl_shell_surface
enum transient {
inactive = 0x1,
}This is a bitfield
- inactive — do not set keyboard focus
details of transient behaviour
These flags specify details of the expected behaviour
of transient surfaces. Used in the set_transient request.
wl_shell_surface
request set_transient(
parent: object<wl_surface>,
x: int,
y: int,
flags: uint<transient>,
)- parent — parent surface
- x — surface-local x coordinate
- y — surface-local y coordinate
- flags — transient surface behavior
make the surface a transient surface
Map the surface relative to an existing surface.
The x and y arguments specify the location of the upper left
corner of the surface relative to the upper left corner of the
parent surface, in surface-local coordinates.
The flags argument controls details of the transient behaviour.
wl_shell_surface
enum fullscreen_method {
default = 0,
scale = 1,
driver = 2,
fill = 3,
}- default — no preference, apply default policy
- scale — scale, preserve the surface's aspect ratio and center on output
- driver — switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch
- fill — no upscaling, center on output and add black borders to compensate size mismatch
different method to set the surface fullscreen
Hints to indicate to the compositor how to deal with a conflict
between the dimensions of the surface and the dimensions of the
output. The compositor is free to ignore this parameter.
wl_shell_surface
request set_fullscreen(
method: uint<fullscreen_method>,
framerate: uint,
output: nullable object<wl_output>,
)- method — method for resolving size conflict
- framerate — framerate in mHz
- output — output on which the surface is to be fullscreen
make the surface a fullscreen surface
Map the surface as a fullscreen surface.
If an output parameter is given then the surface will be made
fullscreen on that output. If the client does not specify the
output then the compositor will apply its policy - usually
choosing the output on which the surface has the biggest surface
area.
The client may specify a method to resolve a size conflict
between the output size and the surface size - this is provided
through the method parameter.
The framerate parameter is used only when the method is set
to "driver", to indicate the preferred framerate. A value of 0
indicates that the client does not care about framerate. The
framerate is specified in mHz, that is framerate of 60000 is 60Hz.
A method of "scale" or "driver" implies a scaling operation of
the surface, either via a direct scaling operation or a change of
the output mode. This will override any kind of output scaling, so
that mapping a surface with a buffer size equal to the mode can
fill the screen independent of buffer_scale.
A method of "fill" means we don't scale up the buffer, however
any output scale is applied. This means that you may run into
an edge case where the application maps a buffer with the same
size of the output mode but buffer_scale 1 (thus making a
surface larger than the output). In this case it is allowed to
downscale the results to fit the screen.
The compositor must reply to this request with a configure event
with the dimensions for the output on which the surface will
be made fullscreen.
wl_shell_surface
request set_popup(
seat: object<wl_seat>,
serial: uint,
parent: object<wl_surface>,
x: int,
y: int,
flags: uint<transient>,
)- seat — seat whose pointer is used
- serial — serial number of the implicit grab on the pointer
- parent — parent surface
- x — surface-local x coordinate
- y — surface-local y coordinate
- flags — transient surface behavior
make the surface a popup surface
Map the surface as a popup.
A popup surface is a transient surface with an added pointer
grab.
An existing implicit grab will be changed to owner-events mode,
and the popup grab will continue after the implicit grab ends
(i.e. releasing the mouse button does not cause the popup to
be unmapped).
The popup grab continues until the window is destroyed or a
mouse button is pressed in any other client's window. A click
in any of the client's surfaces is reported as normal, however,
clicks in other clients' surfaces will be discarded and trigger
the callback.
The x and y arguments specify the location of the upper left
corner of the surface relative to the upper left corner of the
parent surface, in surface-local coordinates.
wl_shell_surface
request set_maximized(
output: nullable object<wl_output>,
)- output — output on which the surface is to be maximized
make the surface a maximized surface
Map the surface as a maximized surface.
If an output parameter is given then the surface will be
maximized on that output. If the client does not specify the
output then the compositor will apply its policy - usually
choosing the output on which the surface has the biggest surface
area.
The compositor will reply with a configure event telling
the expected new surface size. The operation is completed
on the next buffer attach to this surface.
A maximized surface typically fills the entire output it is
bound to, except for desktop elements such as panels. This is
the main difference between a maximized shell surface and a
fullscreen shell surface.
The details depend on the compositor implementation.
wl_shell_surface
request set_title(
title: string,
)set surface title
Set a short title for the surface.
This string may be used to identify the surface in a task bar,
window list, or other user interface elements provided by the
compositor.
The string must be encoded in UTF-8.
wl_shell_surface
request set_class(
class_: string,
)set surface class
Set a class for the surface.
The surface class identifies the general class of applications
to which the surface belongs. A common convention is to use the
file name (or the full path if it is a non-standard location) of
the application's .desktop file as the class.
wl_shell_surface
event ping(
serial: uint,
)- serial — serial number of the ping
ping client
Ping a client to check if it is receiving events and sending
requests. A client is expected to reply with a pong request.
wl_shell_surface
event configure(
edges: uint<resize>,
width: int,
height: int,
)- edges — how the surface was resized
- width — new width of the surface
- height — new height of the surface
suggest resize
The configure event asks the client to resize its surface.
The size is a hint, in the sense that the client is free to
ignore it if it doesn't resize, pick a smaller size (to
satisfy aspect ratio or resize in steps of NxM pixels).
The edges parameter provides a hint about how the surface
was resized. The client may use this information to decide
how to adjust its content to the new size (e.g. a scrolling
area might adjust its content position to leave the viewable
content unmoved).
The client is free to dismiss all but the last configure
event it received.
The width and height arguments specify the size of the window
in surface-local coordinates.
wl_shell_surface
event popup_done()
popup interaction is done
The popup_done event is sent out when a popup grab is broken,
that is, when the user clicks a surface that doesn't belong
to the client owning the popup surface.
Version 7
an onscreen surface
A surface is a rectangular area that may be displayed on zero
or more outputs, and shown any number of times at the compositor's
discretion. They can present wl_buffers, receive user input, and
define a local coordinate system.
The size of a surface (and relative positions on it) is described
in surface-local coordinates, which may differ from the buffer
coordinates of the pixel content, in case a buffer_transform
or a buffer_scale is used.
A surface without a "role" is fairly useless: a compositor does
not know where, when or how to present it. The role is the
purpose of a wl_surface. Examples of roles are a cursor for a
pointer (as set by wl_pointer.set_cursor), a drag icon
(wl_data_device.start_drag), a sub-surface
(wl_subcompositor.get_subsurface), and a window as defined by a
shell protocol (e.g. wl_shell.get_shell_surface).
A surface can have only one role at a time. Initially a
wl_surface does not have a role. Once a wl_surface is given a
role, it is set permanently for the whole lifetime of the
wl_surface object. Giving the current role again is allowed,
unless explicitly forbidden by the relevant interface
specification.
Surface roles are given by requests in other interfaces such as
wl_pointer.set_cursor. The request should explicitly mention
that this request gives a role to a wl_surface. Often, this
request also creates a new protocol object that represents the
role and adds additional functionality to wl_surface. When a
client wants to destroy a wl_surface, they must destroy this role
object before the wl_surface, otherwise a defunct_role_object error is
sent.
Destroying the role object does not remove the role from the
wl_surface, but it may stop the wl_surface from "playing the role".
For instance, if a wl_subsurface object is destroyed, the wl_surface
it was created for will be unmapped and forget its position and
z-order. It is allowed to create a wl_subsurface for the same
wl_surface again, but it is not allowed to use the wl_surface as
a cursor (cursor is a different role than sub-surface, and role
switching is not allowed).
wl_surface
enum error {
invalid_scale = 0,
invalid_transform = 1,
invalid_size = 2,
invalid_offset = 3,
defunct_role_object = 4,
no_buffer = 5,
}- invalid_scale — buffer scale value is invalid
- invalid_transform — buffer transform value is invalid
- invalid_size — buffer size is invalid
- invalid_offset — buffer offset is invalid
- defunct_role_object — surface was destroyed before its role object
- no_buffer — no buffer was attached
wl_surface error values
These errors can be emitted in response to wl_surface requests.
wl_surface
request destroy()
Destructor
delete surface
Deletes the surface and invalidates its object ID.
wl_surface
request attach(
buffer: nullable object<wl_buffer>,
x: int,
y: int,
)- buffer — buffer of surface contents
- x — surface-local x coordinate
- y — surface-local y coordinate
set the surface contents
Set a buffer as the content of this surface.
The new size of the surface is calculated based on the buffer
size transformed by the inverse buffer_transform and the
inverse buffer_scale. This means that at commit time the supplied
buffer size must be an integer multiple of the buffer_scale. If
that's not the case, an invalid_size error is sent.
The x and y arguments specify the location of the new pending
buffer's upper left corner, relative to the current buffer's upper
left corner, in surface-local coordinates. In other words, the
x and y, combined with the new surface size define in which
directions the surface's size changes. Setting anything other than 0
as x and y arguments is discouraged, and should instead be replaced
with using the separate wl_surface.offset request.
When the bound wl_surface version is 5 or higher, passing any
non-zero x or y is a protocol violation, and will result in an
'invalid_offset' error being raised. The x and y arguments are ignored
and do not change the pending state. To achieve equivalent semantics,
use wl_surface.offset.
Surface contents are double-buffered state, see wl_surface.commit.
The initial surface contents are void; there is no content.
wl_surface.attach assigns the given wl_buffer as the pending
wl_buffer. wl_surface.commit makes the pending wl_buffer the new
surface contents, and the size of the surface becomes the size
calculated from the wl_buffer, as described above. After commit,
there is no pending buffer until the next attach.
Committing a pending wl_buffer allows the compositor to read the
pixels in the wl_buffer. The compositor may access the pixels at
any time after the wl_surface.commit request. When the compositor
will not access the pixels anymore, it will send the
wl_buffer.release event. Only after receiving wl_buffer.release,
the client may reuse the wl_buffer. A wl_buffer that has been
attached and then replaced by another attach instead of committed
will not receive a release event, and is not used by the
compositor.
If a pending wl_buffer has been committed to more than one wl_surface,
the delivery of wl_buffer.release events becomes undefined. A well
behaved client should not rely on wl_buffer.release events in this
case. Instead, clients hitting this case should use
wl_surface.get_release or use a protocol extension providing per-commit
release notifications (if none of these options are available, a
fallback can be implemented by creating multiple wl_buffer objects from
the same backing storage).
Destroying the wl_buffer after wl_buffer.release does not change
the surface contents. Destroying the wl_buffer before wl_buffer.release
is allowed as long as the underlying buffer storage isn't re-used (this
can happen e.g. on client process termination). However, if the client
destroys the wl_buffer before receiving the wl_buffer.release event and
mutates the underlying buffer storage, the surface contents become
undefined immediately.
If wl_surface.attach is sent with a NULL wl_buffer, the
following wl_surface.commit will remove the surface content.
If a pending wl_buffer has been destroyed, the result is not specified.
Many compositors are known to remove the surface content on the following
wl_surface.commit, but this behaviour is not universal. Clients seeking to
maximise compatibility should not destroy pending buffers and should
ensure that they explicitly remove content from surfaces, even after
destroying buffers.
wl_surface
request damage(
x: int,
y: int,
width: int,
height: int,
)- x — surface-local x coordinate
- y — surface-local y coordinate
- width — width of damage rectangle
- height — height of damage rectangle
mark part of the surface damaged
This request is used to describe the regions where the pending
buffer is different from the current surface contents, and where
the surface therefore needs to be repainted. The compositor
ignores the parts of the damage that fall outside of the surface.
Damage is double-buffered state, see wl_surface.commit.
The damage rectangle is specified in surface-local coordinates,
where x and y specify the upper left corner of the damage rectangle.
The initial value for pending damage is empty: no damage.
wl_surface.damage adds pending damage: the new pending damage
is the union of old pending damage and the given rectangle.
wl_surface.commit assigns pending damage as the current damage,
and clears pending damage. The server will clear the current
damage as it repaints the surface.
Note! New clients should not use this request. Instead damage can be
posted with wl_surface.damage_buffer which uses buffer coordinates
instead of surface coordinates.
wl_surface
request frame(
callback: new_id<wl_callback>,
)- callback — callback object for the frame request
request a frame throttling hint
Request a notification when it is a good time to start drawing a new
frame, by creating a frame callback. This is useful for throttling
redrawing operations, and driving animations.
When a client is animating on a wl_surface, it can use the 'frame'
request to get notified when it is a good time to draw and commit the
next frame of animation. If the client commits an update earlier than
that, it is likely that some updates will not make it to the display,
and the client is wasting resources by drawing too often.
The frame request will take effect on the next wl_surface.commit.
The notification will only be posted for one frame unless
requested again. For a wl_surface, the notifications are posted in
the order the frame requests were committed.
The server must send the notifications so that a client
will not send excessive updates, while still allowing
the highest possible update rate for clients that wait for the reply
before drawing again. The server should give some time for the client
to draw and commit after sending the frame callback events to let it
hit the next output refresh.
A server should avoid signaling the frame callbacks if the
surface is not visible in any way, e.g. the surface is off-screen,
or completely obscured by other opaque surfaces.
The object returned by this request will be destroyed by the
compositor after the callback is fired and as such the client must not
attempt to use it after that point.
The callback_data passed in the callback is the current time, in
milliseconds, with an undefined base.
wl_surface
request set_opaque_region(
region: nullable object<wl_region>,
)- region — opaque region of the surface
set opaque region
This request sets the region of the surface that contains
opaque content.
The opaque region is an optimization hint for the compositor
that lets it optimize the redrawing of content behind opaque
regions. Setting an opaque region is not required for correct
behaviour, but marking transparent content as opaque will result
in repaint artifacts.
The opaque region is specified in surface-local coordinates.
The compositor ignores the parts of the opaque region that fall
outside of the surface.
Opaque region is double-buffered state, see wl_surface.commit.
wl_surface.set_opaque_region changes the pending opaque region.
wl_surface.commit copies the pending region to the current region.
Otherwise, the pending and current regions are never changed.
The initial value for an opaque region is empty. Setting the pending
opaque region has copy semantics, and the wl_region object can be
destroyed immediately. A NULL wl_region causes the pending opaque
region to be set to empty.
wl_surface
request set_input_region(
region: nullable object<wl_region>,
)- region — input region of the surface
set input region
This request sets the region of the surface that can receive
pointer and touch events.
Input events happening outside of this region will try the next
surface in the server surface stack. The compositor ignores the
parts of the input region that fall outside of the surface.
The input region is specified in surface-local coordinates.
Input region is double-buffered state, see wl_surface.commit.
wl_surface.set_input_region changes the pending input region.
wl_surface.commit copies the pending region to the current region.
Otherwise the pending and current regions are never changed,
except cursor and icon surfaces are special cases, see
wl_pointer.set_cursor and wl_data_device.start_drag.
The initial value for an input region is infinite. That means the
whole surface will accept input. Setting the pending input region
has copy semantics, and the wl_region object can be destroyed
immediately. A NULL wl_region causes the input region to be set
to infinite.
wl_surface
request commit()
commit pending surface state
Surface state (input, opaque, and damage regions, attached buffers,
etc.) is double-buffered. Protocol requests modify the pending state,
as opposed to the active state in use by the compositor.
All requests that need a commit to become effective are documented
to affect double-buffered state.
Other interfaces may add further double-buffered surface state.
A commit request atomically creates a Content Update (CU) from the
pending state, even if the pending state has not been touched. The
content update is placed at the end of a per-surface queue until it
becomes active. After commit, the new pending state is as documented for
each related request.
A CU is either a Desync Content Update (DCU) or a Sync Content Update
(SCU). If the surface is effectively synchronized at the commit request,
it is a SCU, otherwise a DCU.
When a surface transitions from effectively synchronized to effectively
desynchronized, all SCUs in its queue which are not reachable by any
DCU become DCUs and dependency edges from outside the queue to these CUs
are removed.
See wl_subsurface for the definition of 'effectively synchronized' and
'effectively desynchronized'.
When a CU is placed in the queue, the CU has a dependency on the CU in
front of it and to the SCU at end of the queue of every direct child
surface if that SCU exists and does not have another dependent. This can
form a directed acyclic graph of CUs with dependencies as edges.
In addition to surface state, the CU can have constraints that must be
satisfied before it can be applied. Other interfaces may add CU
constraints.
All DCUs which do not have a SCU in front of themselves in their queue,
are candidates. If the graph that's reachable by a candidate does not
have any unsatisfied constraints, the entire graph must be applied
atomically.
When a CU is applied, the wl_buffer is applied before all other state.
This means that all coordinates in double-buffered state are relative to
the newly attached wl_buffers, except for wl_surface.attach itself. If
there is no newly attached wl_buffer, the coordinates are relative to
the previous content update.
wl_surface
event enter(
output: object<wl_output>,
)- output — output entered by the surface
surface enters an output
This is emitted whenever a surface's creation, movement, or resizing
results in some part of it being within the scanout region of an
output.
Note that a surface may be overlapping with zero or more outputs.
wl_surface
event leave(
output: object<wl_output>,
)- output — output left by the surface
surface leaves an output
This is emitted whenever a surface's creation, movement, or resizing
results in it no longer having any part of it within the scanout region
of an output.
Clients should not use the number of outputs the surface is on for frame
throttling purposes. The surface might be hidden even if no leave event
has been sent, and the compositor might expect new surface content
updates even if no enter event has been sent. The frame event should be
used instead.
wl_surface
request set_buffer_transform(
transform: int<wl_output.transform>,
)Available since version 2
- transform — transform for interpreting buffer contents
sets the buffer transformation
This request sets the transformation that the client has already applied
to the content of the buffer. The accepted values for the transform
parameter are the values for wl_output.transform.
The compositor applies the inverse of this transformation whenever it
uses the buffer contents.
Buffer transform is double-buffered state, see wl_surface.commit.
A newly created surface has its buffer transformation set to normal.
wl_surface.set_buffer_transform changes the pending buffer
transformation. wl_surface.commit copies the pending buffer
transformation to the current one. Otherwise, the pending and current
values are never changed.
The purpose of this request is to allow clients to render content
according to the output transform, thus permitting the compositor to
use certain optimizations even if the display is rotated. Using
hardware overlays and scanning out a client buffer for fullscreen
surfaces are examples of such optimizations. Those optimizations are
highly dependent on the compositor implementation, so the use of this
request should be considered on a case-by-case basis.
Note that if the transform value includes 90 or 270 degree rotation,
the width of the buffer will become the surface height and the height
of the buffer will become the surface width.
If transform is not one of the values from the
wl_output.transform enum the invalid_transform protocol error
is raised.
wl_surface
request set_buffer_scale(
scale: int,
)Available since version 3
- scale — scale for interpreting buffer contents
sets the buffer scaling factor
This request sets an optional scaling factor on how the compositor
interprets the contents of the buffer attached to the window.
Buffer scale is double-buffered state, see wl_surface.commit.
A newly created surface has its buffer scale set to 1.
wl_surface.set_buffer_scale changes the pending buffer scale.
wl_surface.commit copies the pending buffer scale to the current one.
Otherwise, the pending and current values are never changed.
The purpose of this request is to allow clients to supply higher
resolution buffer data for use on high resolution outputs. It is
intended that you pick the same buffer scale as the scale of the
output that the surface is displayed on. This means the compositor
can avoid scaling when rendering the surface on that output.
Note that if the scale is larger than 1, then you have to attach
a buffer that is larger (by a factor of scale in each dimension)
than the desired surface size.
If scale is not greater than 0 the invalid_scale protocol error is
raised.
wl_surface
request damage_buffer(
x: int,
y: int,
width: int,
height: int,
)Available since version 4
- x — buffer-local x coordinate
- y — buffer-local y coordinate
- width — width of damage rectangle
- height — height of damage rectangle
mark part of the surface damaged using buffer coordinates
This request is used to describe the regions where the pending
buffer is different from the current surface contents, and where
the surface therefore needs to be repainted. The compositor
ignores the parts of the damage that fall outside of the surface.
Damage is double-buffered state, see wl_surface.commit.
The damage rectangle is specified in buffer coordinates,
where x and y specify the upper left corner of the damage rectangle.
The initial value for pending damage is empty: no damage.
wl_surface.damage_buffer adds pending damage: the new pending
damage is the union of old pending damage and the given rectangle.
wl_surface.commit assigns pending damage as the current damage,
and clears pending damage. The server will clear the current
damage as it repaints the surface.
This request differs from wl_surface.damage in only one way - it
takes damage in buffer coordinates instead of surface-local
coordinates. While this generally is more intuitive than surface
coordinates, it is especially desirable when using wp_viewport
or when a drawing library (like EGL) is unaware of buffer scale
and buffer transform.
Note: Because buffer transformation changes and damage requests may
be interleaved in the protocol stream, it is impossible to determine
the actual mapping between surface and buffer damage until
wl_surface.commit time. Therefore, compositors wishing to take both
kinds of damage into account will have to accumulate damage from the
two requests separately and only transform from one to the other
after receiving the wl_surface.commit.
wl_surface
request offset(
x: int,
y: int,
)Available since version 5
- x — surface-local x coordinate
- y — surface-local y coordinate
set the surface contents offset
The x and y arguments specify the location of the new pending
buffer's upper left corner, relative to the current buffer's upper
left corner, in surface-local coordinates. In other words, the
x and y, combined with the new surface size define in which
directions the surface's size changes.
The exact semantics of wl_surface.offset are role-specific. Refer to
the documentation of specific roles for more information.
Surface location offset is double-buffered state, see
wl_surface.commit.
This request is semantically equivalent to and the replaces the x and y
arguments in the wl_surface.attach request in wl_surface versions prior
to 5. See wl_surface.attach for details.
wl_surface
event preferred_buffer_scale(
factor: int,
)Available since version 6
- factor — preferred scaling factor
preferred buffer scale for the surface
This event indicates the preferred buffer scale for this surface. It is
sent whenever the compositor's preference changes.
Before receiving this event the preferred buffer scale for this surface
is 1.
It is intended that scaling aware clients use this event to scale their
content and use wl_surface.set_buffer_scale to indicate the scale they
have rendered with. This allows clients to supply a higher detail
buffer.
The compositor shall emit a scale value greater than 0.
wl_surface
event preferred_buffer_transform(
transform: uint<wl_output.transform>,
)Available since version 6
- transform — preferred transform
preferred buffer transform for the surface
This event indicates the preferred buffer transform for this surface.
It is sent whenever the compositor's preference changes.
Before receiving this event the preferred buffer transform for this
surface is normal.
Applying this transformation to the surface buffer contents and using
wl_surface.set_buffer_transform might allow the compositor to use the
surface buffer more efficiently.
wl_surface
request get_release(
callback: new_id<wl_callback>,
)Available since version 7
- callback — callback object for the release
get a release callback
Create a callback for the release of the buffer attached by the client
with wl_surface.attach.
The compositor will release the buffer when it has finished its usage of
the underlying storage for the relevant commit. Once the client receives
this event, and assuming the associated buffer is not pending release
from other wl_surface.commit requests, the client can safely re-use the
buffer.
Release callbacks are double-buffered state, and will be associated
with the pending buffer at wl_surface.commit time.
The callback_data passed in the wl_callback.done event is unused and
is always zero.
Sending this request without attaching a non-null buffer in the same
content update is a protocol error. The compositor will send the
no_buffer error in this case.
Version 11
Compositor Support
Version 9cage 0.3.0
cosmic 1.0.0
gamescope 3.15.14
hyprland 0.52.1
labwc 0.20.2
louvre 2.14.1
mir 2.26
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
group of input devices
A seat is a group of keyboards, pointer and touch devices. This
object is published as a global during start up, or when such a
device is hot plugged. A seat typically has a pointer and
maintains a keyboard focus and a pointer focus.
wl_seat
enum capability {
pointer = 1,
keyboard = 2,
touch = 4,
}This is a bitfield
- pointer — the seat has pointer devices
- keyboard — the seat has one or more keyboards
- touch — the seat has touch devices
seat capability bitmask
This is a bitmask of capabilities this seat has; if a member is
set, then it is present on the seat.
wl_seat
enum error {
missing_capability = 0,
}- missing_capability — get_pointer, get_keyboard or get_touch called on seat without the matching capability
wl_seat error values
These errors can be emitted in response to wl_seat requests.
wl_seat
event capabilities(
capabilities: uint<capability>,
)- capabilities — capabilities of the seat
seat capabilities changed
This is sent on binding to the seat global or whenever a seat gains
or loses the pointer, keyboard or touch capabilities.
The argument is a capability enum containing the complete set of
capabilities this seat has.
When the pointer capability is added, a client may create a
wl_pointer object using the wl_seat.get_pointer request. This object
will receive pointer events until the capability is removed in the
future.
When the pointer capability is removed, a client should destroy the
wl_pointer objects associated with the seat where the capability was
removed, using the wl_pointer.release request. No further pointer
events will be received on these objects.
In some compositors, if a seat regains the pointer capability and a
client has a previously obtained wl_pointer object of version 4 or
less, that object may start sending pointer events again. This
behavior is considered a misinterpretation of the intended behavior
and must not be relied upon by the client. wl_pointer objects of
version 5 or later must not send events if created before the most
recent event notifying the client of an added pointer capability.
The above behavior also applies to wl_keyboard and wl_touch with the
keyboard and touch capabilities, respectively.
wl_seat
request get_pointer(
id: new_id<wl_pointer>,
)return pointer object
The ID provided will be initialized to the wl_pointer interface
for this seat.
This request only takes effect if the seat has the pointer
capability, or has had the pointer capability in the past.
It is a protocol violation to issue this request on a seat that has
never had the pointer capability. The missing_capability error will
be sent in this case.
wl_seat
request get_keyboard(
id: new_id<wl_keyboard>,
)return keyboard object
The ID provided will be initialized to the wl_keyboard interface
for this seat.
This request only takes effect if the seat has the keyboard
capability, or has had the keyboard capability in the past.
It is a protocol violation to issue this request on a seat that has
never had the keyboard capability. The missing_capability error will
be sent in this case.
wl_seat
request get_touch(
id: new_id<wl_touch>,
)- id — seat touch interface
return touch object
The ID provided will be initialized to the wl_touch interface
for this seat.
This request only takes effect if the seat has the touch
capability, or has had the touch capability in the past.
It is a protocol violation to issue this request on a seat that has
never had the touch capability. The missing_capability error will
be sent in this case.
wl_seat
event name(
name: string,
)Available since version 2
unique identifier for this seat
In a multi-seat configuration the seat name can be used by clients to
help identify which physical devices the seat represents.
The seat name is a UTF-8 string with no convention defined for its
contents. Each name is unique among all wl_seat globals. The name is
only guaranteed to be unique for the current compositor instance.
The same seat names are used for all clients. Thus, the name can be
shared across processes to refer to a specific wl_seat global.
The name event is sent after binding to the seat global, and should be sent
before announcing capabilities. This event is only sent once per seat object,
and the name does not change over the lifetime of the wl_seat global.
Compositors may re-use the same seat name if the wl_seat global is
destroyed and re-created later.
wl_seat
request release()
DestructorAvailable since version 5
release the seat object
Using this request a client can tell the server that it is not going to
use the seat object anymore.
Version 11
pointer input device
The wl_pointer interface represents one or more input devices,
such as mice, which control the pointer location and pointer_focus
of a seat.
The wl_pointer interface generates motion, enter and leave
events for the surfaces that the pointer is located over,
and button and axis events for button presses, button releases
and scrolling.
wl_pointer
enum error {
role = 0,
}- role — given wl_surface has another role
wl_pointer
request set_cursor(
serial: uint,
surface: nullable object<wl_surface>,
hotspot_x: int,
hotspot_y: int,
)- serial — serial number of the enter event
- surface — pointer surface
- hotspot_x — surface-local x coordinate
- hotspot_y — surface-local y coordinate
set the pointer surface
Set the pointer surface, i.e., the surface that contains the
pointer image (cursor). This request gives the surface the role
of a cursor. If the surface already has another role, it raises
a protocol error.
The cursor actually changes only if the pointer
focus for this device is one of the requesting client's surfaces
or the surface parameter is the current pointer surface. If
there was a previous surface set with this request it is
replaced. If surface is NULL, the pointer image is hidden.
The parameters hotspot_x and hotspot_y define the position of
the pointer surface relative to the pointer location. Its
top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
where (x, y) are the coordinates of the pointer location, in
surface-local coordinates.
On wl_surface.offset requests to the pointer surface, hotspot_x
and hotspot_y are decremented by the x and y parameters
passed to the request. The offset must be applied by
wl_surface.commit as usual.
The hotspot can also be updated by passing the currently set
pointer surface to this request with new values for hotspot_x
and hotspot_y.
The input region is ignored for wl_surfaces with the role of
a cursor. When the use as a cursor ends, the wl_surface is
unmapped.
The serial parameter must match the latest wl_pointer.enter
serial number sent to the client. Otherwise the request will be
ignored.
wl_pointer
event enter(
serial: uint,
surface: object<wl_surface>,
surface_x: fixed,
surface_y: fixed,
)- serial — serial number of the enter event
- surface — surface entered by the pointer
- surface_x — surface-local x coordinate
- surface_y — surface-local y coordinate
enter event
Notification that this seat's pointer is focused on a certain
surface.
When a seat's focus enters a surface, the pointer image
is undefined and a client should respond to this event by setting
an appropriate pointer image with the set_cursor request.
wl_pointer
event leave(
serial: uint,
surface: object<wl_surface>,
)- serial — serial number of the leave event
- surface — surface left by the pointer
leave event
Notification that this seat's pointer is no longer focused on
a certain surface.
The leave notification is sent before the enter notification
for the new focus.
wl_pointer
event motion(
time: uint,
surface_x: fixed,
surface_y: fixed,
)- time — timestamp with millisecond granularity
- surface_x — surface-local x coordinate
- surface_y — surface-local y coordinate
pointer motion event
Notification of pointer location change. The arguments
surface_x and surface_y are the location relative to the
focused surface.
wl_pointer
enum button_state {
released = 0,
pressed = 1,
}- released — the button is not pressed
- pressed — the button is pressed
physical button state
Describes the physical state of a button that produced the button
event.
wl_pointer
event button(
serial: uint,
time: uint,
button: uint,
state: uint<button_state>,
)- serial — serial number of the button event
- time — timestamp with millisecond granularity
- button — button that produced the event
- state — physical state of the button
pointer button event
Mouse button click and release notifications.
The location of the click is given by the last motion, warp or
enter event.
The time argument is a timestamp with millisecond
granularity, with an undefined base.
The button is a button code as defined in the Linux kernel's
linux/input-event-codes.h header file, e.g. BTN_LEFT.
Any 16-bit button code value is reserved for future additions to the
kernel's event code list. All other button codes above 0xFFFF are
currently undefined but may be used in future versions of this
protocol.
wl_pointer
enum axis {
vertical_scroll = 0,
horizontal_scroll = 1,
}- vertical_scroll — vertical axis
- horizontal_scroll — horizontal axis
axis types
Describes the axis types of scroll events.
wl_pointer
event axis(
time: uint,
axis: uint<axis>,
value: fixed,
)- time — timestamp with millisecond granularity
- axis — axis type
- value — length of vector in surface-local coordinate space
axis event
Scroll and other axis notifications.
For scroll events (vertical and horizontal scroll axes), the
value parameter is the length of a vector along the specified
axis in a coordinate space identical to those of motion events,
representing a relative movement along the specified axis.
For devices that support movements non-parallel to axes multiple
axis events will be emitted.
When applicable, for example for touch pads, the server can
choose to emit scroll events where the motion vector is
equivalent to a motion event vector.
When applicable, a client can transform its content relative to the
scroll distance.
wl_pointer
request release()
DestructorAvailable since version 3
release the pointer object
Using this request a client can tell the server that it is not going to
use the pointer object anymore.
This request destroys the pointer proxy object, so clients must not call
wl_pointer_destroy() after using this request.
wl_pointer
event frame()
Available since version 5
end of a pointer event sequence
Indicates the end of a set of events that logically belong together.
A client is expected to accumulate the data in all events within the
frame before proceeding.
All wl_pointer events before a wl_pointer.frame event belong
logically together. For example, in a diagonal scroll motion the
compositor will send an optional wl_pointer.axis_source event, two
wl_pointer.axis events (horizontal and vertical) and finally a
wl_pointer.frame event. The client may use this information to
calculate a diagonal vector for scrolling.
When multiple wl_pointer.axis events occur within the same frame,
the motion vector is the combined motion of all events.
When a wl_pointer.axis and a wl_pointer.axis_stop event occur within
the same frame, this indicates that axis movement in one axis has
stopped but continues in the other axis.
When multiple wl_pointer.axis_stop events occur within the same
frame, this indicates that these axes stopped in the same instance.
A wl_pointer.frame event is sent for every logical event group,
even if the group only contains a single wl_pointer event.
Specifically, a client may get a sequence: motion, frame, button,
frame, axis, frame, axis_stop, frame.
The wl_pointer.enter and wl_pointer.leave events are logical events
generated by the compositor and not the hardware. These events are
also grouped by a wl_pointer.frame. When a pointer moves from one
surface to another, a compositor should group the
wl_pointer.leave event within the same wl_pointer.frame.
However, a client must not rely on wl_pointer.leave and
wl_pointer.enter being in the same wl_pointer.frame.
Compositor-specific policies may require the wl_pointer.leave and
wl_pointer.enter event being split across multiple wl_pointer.frame
groups.
wl_pointer
enum axis_source {
wheel = 0,
finger = 1,
continuous = 2,
wheel_tilt = 3,
}axis source types
Describes the source types for axis events. This indicates to the
client how an axis event was physically generated; a client may
adjust the user interface accordingly. For example, scroll events
from a "finger" source may be in a smooth coordinate space with
kinetic scrolling whereas a "wheel" source may be in discrete steps
of a number of lines.
The "continuous" axis source is a device generating events in a
continuous coordinate space, but using something other than a
finger. One example for this source is button-based scrolling where
the vertical motion of a device is converted to scroll events while
a button is held down.
The "wheel tilt" axis source indicates that the actual device is a
wheel but the scroll event is not caused by a rotation but a
(usually sideways) tilt of the wheel.
wl_pointer
event axis_source(
axis_source: uint<axis_source>,
)Available since version 5
- axis_source — source of the axis event
axis source event
Source information for scroll and other axes.
This event does not occur on its own. It is sent before a
wl_pointer.frame event and carries the source information for
all events within that frame.
The source specifies how this event was generated. If the source is
wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
sent when the user lifts the finger off the device.
If the source is wl_pointer.axis_source.wheel,
wl_pointer.axis_source.wheel_tilt or
wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
or may not be sent. Whether a compositor sends an axis_stop event
for these sources is hardware-specific and implementation-dependent;
clients must not rely on receiving an axis_stop event for these
scroll sources and should treat scroll sequences from these scroll
sources as unterminated by default.
This event is optional. If the source is unknown for a particular
axis event sequence, no event is sent.
Only one wl_pointer.axis_source event is permitted per frame.
The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
not guaranteed.
wl_pointer
event axis_stop(
time: uint,
axis: uint<axis>,
)Available since version 5
- time — timestamp with millisecond granularity
- axis — the axis stopped with this event
axis stop event
Stop notification for scroll and other axes.
For some wl_pointer.axis_source types, a wl_pointer.axis_stop event
is sent to notify a client that the axis sequence has terminated.
This enables the client to implement kinetic scrolling.
See the wl_pointer.axis_source documentation for information on when
this event may be generated.
Any wl_pointer.axis events with the same axis_source after this
event should be considered as the start of a new axis motion.
The timestamp is to be interpreted identical to the timestamp in the
wl_pointer.axis event. The timestamp value may be the same as a
preceding wl_pointer.axis event.
wl_pointer
event axis_discrete(
axis: uint<axis>,
discrete: int,
)Available since version 5Deprecated since version 8
- axis — axis type
- discrete — number of steps
axis click event
Discrete step information for scroll and other axes.
This event carries the axis value of the wl_pointer.axis event in
discrete steps (e.g. mouse wheel clicks).
This event is deprecated with wl_pointer version 8 - this event is not
sent to clients supporting version 8 or later.
This event does not occur on its own, it is coupled with a
wl_pointer.axis event that represents this axis value on a
continuous scale. The protocol guarantees that each axis_discrete
event is always followed by exactly one axis event with the same
axis number within the same wl_pointer.frame. Note that the protocol
allows for other events to occur between the axis_discrete and
its coupled axis event, including other axis_discrete or axis
events. A wl_pointer.frame must not contain more than one axis_discrete
event per axis type.
This event is optional; continuous scrolling devices
like two-finger scrolling on touchpads do not have discrete
steps and do not generate this event.
The discrete value carries the directional information. e.g. a value
of -2 is two steps towards the negative direction of this axis.
The axis number is identical to the axis number in the associated
axis event.
The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
not guaranteed.
wl_pointer
event axis_value120(
axis: uint<axis>,
value120: int,
)Available since version 8
- axis — axis type
- value120 — scroll distance as fraction of 120
axis high-resolution scroll event
Discrete high-resolution scroll information.
This event carries high-resolution wheel scroll information,
with each multiple of 120 representing one logical scroll step
(a wheel detent). For example, an axis_value120 of 30 is one quarter of
a logical scroll step in the positive direction, a value120 of
-240 are two logical scroll steps in the negative direction within the
same hardware event.
Clients that rely on discrete scrolling should accumulate the
value120 to multiples of 120 before processing the event.
The value120 must not be zero.
This event replaces the wl_pointer.axis_discrete event in clients
supporting wl_pointer version 8 or later.
Where a wl_pointer.axis_source event occurs in the same
wl_pointer.frame, the axis source applies to this event.
The order of wl_pointer.axis_value120 and wl_pointer.axis_source is
not guaranteed.
wl_pointer
enum axis_relative_direction {
identical = 0,
inverted = 1,
}- identical — physical motion matches axis direction
- inverted — physical motion is the inverse of the axis direction
axis relative direction
This specifies the direction of the physical motion that caused a
wl_pointer.axis event, relative to the wl_pointer.axis direction.
wl_pointer
event axis_relative_direction(
axis: uint<axis>,
direction: uint<axis_relative_direction>,
)Available since version 9
- axis — axis type
- direction — physical direction relative to axis motion
axis relative physical direction event
Relative directional information of the entity causing the axis
motion.
For a wl_pointer.axis event, the wl_pointer.axis_relative_direction
event specifies the movement direction of the entity causing the
wl_pointer.axis event. For example:
if a user's fingers on a touchpad move down and this
causes a wl_pointer.axis vertical_scroll down event, the physical
direction is 'identical'
if a user's fingers on a touchpad move down and this causes a
wl_pointer.axis vertical_scroll up scroll up event ('natural
scrolling'), the physical direction is 'inverted'.
A client may use this information to adjust scroll motion of
components. Specifically, enabling natural scrolling causes the
content to change direction compared to traditional scrolling.
Some widgets like volume control sliders should usually match the
physical direction regardless of whether natural scrolling is
active. This event enables clients to match the scroll direction of
a widget to the physical direction.
This event does not occur on its own, it is coupled with a
wl_pointer.axis event that represents this axis value.
The protocol guarantees that each axis_relative_direction event is
always followed by exactly one axis event with the same
axis number within the same wl_pointer.frame. Note that the protocol
allows for other events to occur between the axis_relative_direction
and its coupled axis event.
The axis number is identical to the axis number in the associated
axis event.
The order of wl_pointer.axis_relative_direction,
wl_pointer.axis_discrete and wl_pointer.axis_source is not
guaranteed.
wl_pointer
event warp(
surface_x: fixed,
surface_y: fixed,
)Available since version 11
- surface_x — surface-local x coordinate
- surface_y — surface-local y coordinate
pointer warp event
Notification of pointer location change within a surface.
This location change is not due to events on the input device,
but because either the surface under the pointer was moved and
thus the relative position of the pointer changed, or because
the compositor changed the pointer position in response to an
event like pointer confinement being exited.
The arguments surface_x and surface_y are the location relative to
the focused surface.
This event must not occur in the same wl_pointer.frame as a
wl_pointer.enter or wl_pointer.motion event.
Version 11
keyboard input device
The wl_keyboard interface represents one or more keyboards
associated with a seat.
Each wl_keyboard has the following logical state:
an active surface (possibly null),
the keys currently logically down,
the active modifiers,
the active group.
By default, the active surface is null, the keys currently logically down
are empty, the active modifiers and the active group are 0.
wl_keyboard
enum keymap_format {
no_keymap = 0,
xkb_v1 = 1,
}- no_keymap — no keymap; client must understand how to interpret the raw keycode
- xkb_v1 — libxkbcommon compatible, null-terminated string; to determine the xkb keycode, clients must add 8 to the key event keycode
keyboard mapping format
This specifies the format of the keymap provided to the
client with the wl_keyboard.keymap event.
wl_keyboard
event keymap(
format: uint<keymap_format>,
fd: fd,
size: uint,
)- format — keymap format
- fd — keymap file descriptor
- size — keymap size, in bytes
keyboard mapping
This event provides a file descriptor to the client which can be
memory-mapped in read-only mode to provide a keyboard mapping
description.
From version 7 onwards, the fd must be mapped with MAP_PRIVATE by
the recipient, as MAP_SHARED may fail.
wl_keyboard
event enter(
serial: uint,
surface: object<wl_surface>,
keys: array,
)- serial — serial number of the enter event
- surface — surface gaining keyboard focus
- keys — the keys currently logically down
enter event
Notification that this seat's keyboard focus is on a certain
surface.
The compositor must send the wl_keyboard.modifiers event after this
event.
In the wl_keyboard logical state, this event sets the active surface to
the surface argument and the keys currently logically down to the keys
in the keys argument. The compositor must not send this event if the
wl_keyboard already had an active surface immediately before this event.
Clients should not use the list of pressed keys to emulate key-press
events. The order of keys in the list is unspecified.
wl_keyboard
event leave(
serial: uint,
surface: object<wl_surface>,
)- serial — serial number of the leave event
- surface — surface that lost keyboard focus
leave event
Notification that this seat's keyboard focus is no longer on
a certain surface.
The leave notification is sent before the enter notification
for the new focus.
In the wl_keyboard logical state, this event resets all values to their
defaults. The compositor must not send this event if the active surface
of the wl_keyboard was not equal to the surface argument immediately
before this event.
wl_keyboard
enum key_state {
released = 0,
pressed = 1,
repeated = 2,
}physical key state
Describes the physical state of a key that produced the key event.
Since version 10, the key can be in a "repeated" pseudo-state which
means the same as "pressed", but is used to signal repetition in the
key event.
The key may only enter the repeated state after entering the pressed
state and before entering the released state. This event may be
generated multiple times while the key is down.
wl_keyboard
event key(
serial: uint,
time: uint,
key: uint,
state: uint<key_state>,
)- serial — serial number of the key event
- time — timestamp with millisecond granularity
- key — key that produced the event
- state — physical state of the key
key event
A key was pressed or released.
The time argument is a timestamp with millisecond
granularity, with an undefined base.
The key is a platform-specific key code that can be interpreted
by feeding it to the keyboard mapping (see the keymap event).
If this event produces a change in modifiers, then the resulting
wl_keyboard.modifiers event must be sent after this event.
In the wl_keyboard logical state, this event adds the key to the keys
currently logically down (if the state argument is pressed) or removes
the key from the keys currently logically down (if the state argument is
released). The compositor must not send this event if the wl_keyboard
did not have an active surface immediately before this event. The
compositor must not send this event if state is pressed (resp. released)
and the key was already logically down (resp. was not logically down)
immediately before this event.
Since version 10, compositors may send key events with the "repeated"
key state when a wl_keyboard.repeat_info event with a rate argument of
0 has been received. This allows the compositor to take over the
responsibility of key repetition.
wl_keyboard
event modifiers(
serial: uint,
mods_depressed: uint,
mods_latched: uint,
mods_locked: uint,
group: uint,
)- serial — serial number of the modifiers event
- mods_depressed — depressed modifiers
- mods_latched — latched modifiers
- mods_locked — locked modifiers
- group — keyboard layout
modifier and group state
Notifies clients that the modifier and/or group state has
changed, and it should update its local state.
The compositor may send this event without a surface of the client
having keyboard focus, for example to tie modifier information to
pointer focus instead. If a modifier event with pressed modifiers is sent
without a prior enter event, the client can assume the modifier state is
valid until it receives the next wl_keyboard.modifiers event. In order to
reset the modifier state again, the compositor can send a
wl_keyboard.modifiers event with no pressed modifiers.
In the wl_keyboard logical state, this event updates the modifiers and
group.
wl_keyboard
request release()
DestructorAvailable since version 3
release the keyboard object
wl_keyboard
event repeat_info(
rate: int,
delay: int,
)Available since version 4
- rate — the rate of repeating keys in characters per second
- delay — delay in milliseconds since key down until repeating starts
repeat rate and delay
Informs the client about the keyboard's repeat rate and delay.
This event is sent as soon as the wl_keyboard object has been created,
and is guaranteed to be received by the client before any key press
event.
Negative values for either rate or delay are illegal. A rate of zero
will disable any repeating (regardless of the value of delay).
This event can be sent later on as well with a new value if necessary,
so clients should continue listening for the event past the creation
of wl_keyboard.
Version 11
- down — touch down event and beginning of a touch sequence
- up — end of a touch event sequence
- motion — update of touch point coordinates
- frame — end of touch frame event
- cancel — touch session cancelled
- release — release the touch object
- shape — update shape of touch point
- orientation — update orientation of touch point
touchscreen input device
The wl_touch interface represents a touchscreen
associated with a seat.
Touch interactions can consist of one or more contacts.
For each contact, a series of events is generated, starting
with a down event, followed by zero or more motion events,
and ending with an up event. Events relating to the same
contact point can be identified by the ID of the sequence.
wl_touch
event down(
serial: uint,
time: uint,
surface: object<wl_surface>,
id: int,
x: fixed,
y: fixed,
)- serial — serial number of the touch down event
- time — timestamp with millisecond granularity
- surface — surface touched
- id — the unique ID of this touch point
- x — surface-local x coordinate
- y — surface-local y coordinate
touch down event and beginning of a touch sequence
A new touch point has appeared on the surface. This touch point is
assigned a unique ID. Future events from this touch point reference
this ID. The ID ceases to be valid after a touch up event and may be
reused in the future.
wl_touch
event up(
serial: uint,
time: uint,
id: int,
)- serial — serial number of the touch up event
- time — timestamp with millisecond granularity
- id — the unique ID of this touch point
end of a touch event sequence
The touch point has disappeared. No further events will be sent for
this touch point and the touch point's ID is released and may be
reused in a future touch down event.
wl_touch
event motion(
time: uint,
id: int,
x: fixed,
y: fixed,
)- time — timestamp with millisecond granularity
- id — the unique ID of this touch point
- x — surface-local x coordinate
- y — surface-local y coordinate
update of touch point coordinates
A touch point has changed coordinates.
wl_touch
event frame()
end of touch frame event
Indicates the end of a set of events that logically belong together.
A client is expected to accumulate the data in all events within the
frame before proceeding.
A wl_touch.frame terminates at least one event but otherwise no
guarantee is provided about the set of events within a frame. A client
must assume that any state not updated in a frame is unchanged from the
previously known state.
wl_touch
event cancel()
touch session cancelled
Sent if the compositor decides the touch stream is a global
gesture. No further events are sent to the clients from that
particular gesture. Touch cancellation applies to all touch points
currently active on this client's surface. The client is
responsible for finalizing the touch points, future touch points on
this surface may reuse the touch point ID.
No frame event is required after the cancel event.
wl_touch
event shape(
id: int,
major: fixed,
minor: fixed,
)Available since version 6
- id — the unique ID of this touch point
- major — length of the major axis in surface-local coordinates
- minor — length of the minor axis in surface-local coordinates
update shape of touch point
Sent when a touchpoint has changed its shape.
This event does not occur on its own. It is sent before a
wl_touch.frame event and carries the new shape information for
any previously reported, or new touch points of that frame.
Other events describing the touch point such as wl_touch.down,
wl_touch.motion or wl_touch.orientation may be sent within the
same wl_touch.frame. A client should treat these events as a single
logical touch point update. The order of wl_touch.shape,
wl_touch.orientation and wl_touch.motion is not guaranteed.
A wl_touch.down event is guaranteed to occur before the first
wl_touch.shape event for this touch ID but both events may occur within
the same wl_touch.frame.
A touchpoint shape is approximated by an ellipse through the major and
minor axis length. The major axis length describes the longer diameter
of the ellipse, while the minor axis length describes the shorter
diameter. Major and minor are orthogonal and both are specified in
surface-local coordinates. The center of the ellipse is always at the
touchpoint location as reported by wl_touch.down or wl_touch.motion.
This event is only sent by the compositor if the touch device supports
shape reports. The client has to make reasonable assumptions about the
shape if it did not receive this event.
wl_touch
event orientation(
id: int,
orientation: fixed,
)Available since version 6
- id — the unique ID of this touch point
- orientation — angle between major axis and positive surface y-axis in degrees
update orientation of touch point
Sent when a touchpoint has changed its orientation.
This event does not occur on its own. It is sent before a
wl_touch.frame event and carries the new shape information for
any previously reported, or new touch points of that frame.
Other events describing the touch point such as wl_touch.down,
wl_touch.motion or wl_touch.shape may be sent within the
same wl_touch.frame. A client should treat these events as a single
logical touch point update. The order of wl_touch.shape,
wl_touch.orientation and wl_touch.motion is not guaranteed.
A wl_touch.down event is guaranteed to occur before the first
wl_touch.orientation event for this touch ID but both events may occur
within the same wl_touch.frame.
The orientation describes the clockwise angle of a touchpoint's major
axis to the positive surface y-axis and is normalized to the -180 to
+180 degree range. The granularity of orientation depends on the touch
device, some devices only support binary rotation values between 0 and
90 degrees.
This event is only sent by the compositor if the touch device supports
orientation reports.
Version 4
- subpixel — subpixel geometry information
- transform — transformation applied to buffer contents
- geometry — properties of the output
- mode — mode information
- mode — advertise available modes for the output
- done — sent all information about output
- scale — output scaling properties
- release — release the output object
- name — name of this output
- description — human-readable description of this output
Compositor Support
Version 4cage 0.3.0
cosmic 1.0.0
gamescope 3.15.14
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
weston 15.0.1
compositor output region
An output describes part of the compositor geometry. The
compositor works in the 'compositor coordinate system' and an
output corresponds to a rectangular area in that space that is
actually visible. This typically corresponds to a monitor that
displays part of the compositor space. This object is published
as global during start up, or when a monitor is hotplugged.
wl_output
enum subpixel {
unknown = 0,
none = 1,
horizontal_rgb = 2,
horizontal_bgr = 3,
vertical_rgb = 4,
vertical_bgr = 5,
}- unknown — unknown geometry
- none — no geometry
- horizontal_rgb — horizontal RGB
- horizontal_bgr — horizontal BGR
- vertical_rgb — vertical RGB
- vertical_bgr — vertical BGR
subpixel geometry information
This enumeration describes how the physical
pixels on an output are laid out.
wl_output
enum transform {
normal = 0,
90 = 1,
180 = 2,
270 = 3,
flipped = 4,
flipped_90 = 5,
flipped_180 = 6,
flipped_270 = 7,
}- normal — no transform
- 90 — 90 degrees counter-clockwise
- 180 — 180 degrees counter-clockwise
- 270 — 270 degrees counter-clockwise
- flipped — 180 degree flip around a vertical axis
- flipped_90 — flip and rotate 90 degrees counter-clockwise
- flipped_180 — flip and rotate 180 degrees counter-clockwise
- flipped_270 — flip and rotate 270 degrees counter-clockwise
transformation applied to buffer contents
This describes transformations that clients and compositors apply to
buffer contents.
The flipped values correspond to an initial flip around a
vertical axis followed by rotation.
The purpose is mainly to allow clients to render accordingly and
tell the compositor, so that for fullscreen surfaces, the
compositor will still be able to scan out directly from client
surfaces.
wl_output
event geometry(
x: int,
y: int,
physical_width: int,
physical_height: int,
subpixel: int<subpixel>,
make: string,
model: string,
transform: int<transform>,
)- x — x position within the global compositor space
- y — y position within the global compositor space
- physical_width — width in millimeters of the output
- physical_height — height in millimeters of the output
- subpixel — subpixel orientation of the output
- make — textual description of the manufacturer
- model — textual description of the model
- transform — additional transformation applied to buffer contents during presentation
properties of the output
The geometry event describes geometric properties of the output.
The event is sent when binding to the output object and whenever
any of the properties change.
The physical size can be set to zero if it doesn't make sense for this
output (e.g. for projectors or virtual outputs).
The geometry event will be followed by a done event (starting from
version 2).
Clients should use wl_surface.preferred_buffer_transform instead of the
transform advertised by this event to find the preferred buffer
transform to use for a surface.
Note: wl_output only advertises partial information about the output
position and identification. Some compositors, for instance those not
implementing a desktop-style output layout or those exposing virtual
outputs, might fake this information. Instead of using x and y, clients
should use xdg_output.logical_position. Instead of using make and model,
clients should use name and description.
wl_output
enum mode {
current = 0x1,
preferred = 0x2,
}This is a bitfield
- current — indicates this is the current mode
- preferred — indicates this is the preferred mode
mode information
These flags describe properties of an output mode.
They are used in the flags bitfield of the mode event.
wl_output
event mode(
flags: uint<mode>,
width: int,
height: int,
refresh: int,
)- flags — bitfield of mode flags
- width — width of the mode in hardware units
- height — height of the mode in hardware units
- refresh — vertical refresh rate in mHz
advertise available modes for the output
The mode event describes an available mode for the output.
The event is sent when binding to the output object and there
will always be one mode, the current mode. The event is sent
again if an output changes mode, for the mode that is now
current. In other words, the current mode is always the last
mode that was received with the current flag set.
Non-current modes are deprecated. A compositor can decide to only
advertise the current mode and never send other modes. Clients
should not rely on non-current modes.
The size of a mode is given in physical hardware units of
the output device. This is not necessarily the same as
the output size in the global compositor space. For instance,
the output may be scaled, as described in wl_output.scale,
or transformed, as described in wl_output.transform. Clients
willing to retrieve the output size in the global compositor
space should use xdg_output.logical_size instead.
The vertical refresh rate can be set to zero if it doesn't make
sense for this output (e.g. for virtual outputs).
The mode event will be followed by a done event (starting from
version 2).
Clients should not use the refresh rate to schedule frames. Instead,
they should use the wl_surface.frame event or the presentation-time
protocol.
Note: this information is not always meaningful for all outputs. Some
compositors, such as those exposing virtual outputs, might fake the
refresh rate or the size.
wl_output
event done()
Available since version 2
sent all information about output
This event is sent after all other properties have been
sent after binding to the output object and after any
other property changes done after that. This allows
changes to the output properties to be seen as
atomic, even if they happen via multiple events.
wl_output
event scale(
factor: int,
)Available since version 2
- factor — scaling factor of output
output scaling properties
This event contains scaling geometry information
that is not in the geometry event. It may be sent after
binding the output object or if the output scale changes
later. The compositor will emit a non-zero, positive
value for scale. If it is not sent, the client should
assume a scale of 1.
A scale larger than 1 means that the compositor will
automatically scale surface buffers by this amount
when rendering. This is used for very high resolution
displays where applications rendering at the native
resolution would be too small to be legible.
Clients should use wl_surface.preferred_buffer_scale
instead of this event to find the preferred buffer
scale to use for a surface.
The scale event will be followed by a done event.
wl_output
request release()
DestructorAvailable since version 3
release the output object
Using this request a client can tell the server that it is not going to
use the output object anymore.
wl_output
event name(
name: string,
)Available since version 4
name of this output
Many compositors will assign user-friendly names to their outputs, show
them to the user, allow the user to refer to an output, etc. The client
may wish to know this name as well to offer the user similar behaviors.
The name is a UTF-8 string with no convention defined for its contents.
Each name is unique among all wl_output globals. The name is only
guaranteed to be unique for the compositor instance.
The same output name is used for all clients for a given wl_output
global. Thus, the name can be shared across processes to refer to a
specific wl_output global.
The name is not guaranteed to be persistent across sessions, thus cannot
be used to reliably identify an output in e.g. configuration files.
Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
not assume that the name is a reflection of an underlying DRM connector,
X11 connection, etc.
The name event is sent after binding the output object. This event is
only sent once per output object, and the name does not change over the
lifetime of the wl_output global.
Compositors may re-use the same output name if the wl_output global is
destroyed and re-created later. Compositors should avoid re-using the
same name if possible.
The name event will be followed by a done event.
wl_output
event description(
description: string,
)Available since version 4
- description — output description
human-readable description of this output
Many compositors can produce human-readable descriptions of their
outputs. The client may wish to know this description as well, e.g. for
output selection purposes.
The description is a UTF-8 string with no convention defined for its
contents. The description is not guaranteed to be unique among all
wl_output globals. Examples might include 'Foocorp 11" Display' or
'Virtual X11 output via :1'.
The description event is sent after binding the output object and
whenever the description changes. The description is optional, and may
not be sent at all.
The description event will be followed by a done event.
Version 7
- destroy — destroy region
- add — add rectangle to region
- subtract — subtract rectangle from region
region interface
A region object describes an area.
Region objects are used to describe the opaque and input
regions of a surface.
wl_region
request destroy()
Destructor
destroy region
Destroy the region. This will invalidate the object ID.
wl_region
request add(
x: int,
y: int,
width: int,
height: int,
)- x — region-local x coordinate
- y — region-local y coordinate
- width — rectangle width
- height — rectangle height
add rectangle to region
Add the specified rectangle to the region.
wl_region
request subtract(
x: int,
y: int,
width: int,
height: int,
)- x — region-local x coordinate
- y — region-local y coordinate
- width — rectangle width
- height — rectangle height
subtract rectangle from region
Subtract the specified rectangle from the region.
Version 1
Compositor Support
Version 1cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
weston 15.0.1
sub-surface compositing
The global interface exposing sub-surface compositing capabilities.
A wl_surface, that has sub-surfaces associated, is called the
parent surface. Sub-surfaces can be arbitrarily nested and create
a tree of sub-surfaces.
The root surface in a tree of sub-surfaces is the main
surface. The main surface cannot be a sub-surface, because
sub-surfaces must always have a parent.
A main surface with its sub-surfaces forms a (compound) window.
For window management purposes, this set of wl_surface objects is
to be considered as a single window, and it should also behave as
such.
The aim of sub-surfaces is to offload some of the compositing work
within a window from clients to the compositor. A prime example is
a video player with decorations and video in separate wl_surface
objects. This should allow the compositor to pass YUV video buffer
processing to dedicated overlay hardware when possible.
wl_subcompositor
request destroy()
Destructor
unbind from the subcompositor interface
Informs the server that the client will not be using this
protocol object anymore. This does not affect any other
objects, wl_subsurface objects included.
wl_subcompositor
enum error {
bad_surface = 0,
bad_parent = 1,
}- bad_surface — the to-be sub-surface is invalid
- bad_parent — the to-be sub-surface parent is invalid
wl_subcompositor
request get_subsurface(
id: new_id<wl_subsurface>,
surface: object<wl_surface>,
parent: object<wl_surface>,
)- id — the new sub-surface object ID
- surface — the surface to be turned into a sub-surface
- parent — the parent surface
give a surface the role sub-surface
Create a sub-surface interface for the given surface, and
associate it with the given parent surface. This turns a
plain wl_surface into a sub-surface.
The to-be sub-surface must not already have another role, and it
must not have an existing wl_subsurface object. Otherwise the
bad_surface protocol error is raised.
Adding sub-surfaces to a parent is a double-buffered operation on the
parent (see wl_surface.commit). The effect of adding a sub-surface
becomes visible on the next time the state of the parent surface is
applied.
The parent surface must not be one of the child surface's descendants,
and the parent must be different from the child surface, otherwise the
bad_parent protocol error is raised.
This request modifies the behaviour of wl_surface.commit request on
the sub-surface, see the documentation on wl_subsurface interface.
Version 1
sub-surface interface to a wl_surface
An additional interface to a wl_surface object, which has been
made a sub-surface. A sub-surface has one parent surface. A
sub-surface's size and position are not limited to that of the parent.
Particularly, a sub-surface is not automatically clipped to its
parent's area.
A sub-surface becomes mapped, when a non-NULL wl_buffer is applied
and the parent surface is mapped. The order of which one happens
first is irrelevant. A sub-surface is hidden if the parent becomes
hidden, or if a NULL wl_buffer is applied. These rules apply
recursively through the tree of surfaces.
A sub-surface can be in one of two modes. The possible modes are
synchronized and desynchronized, see methods wl_subsurface.set_sync and
wl_subsurface.set_desync.
The main surface can be thought to be always in desynchronized mode,
since it does not have a parent in the sub-surfaces sense.
Even if a sub-surface is in desynchronized mode, it will behave as
in synchronized mode, if its parent surface behaves as in
synchronized mode. This rule is applied recursively throughout the
tree of surfaces. This means, that one can set a sub-surface into
synchronized mode, and then assume that all its child and grand-child
sub-surfaces are synchronized, too, without explicitly setting them.
If a surface behaves as in synchronized mode, it is effectively
synchronized, otherwise it is effectively desynchronized.
A sub-surface is initially in the synchronized mode.
The wl_subsurface interface has requests which modify double-buffered
state of the parent surface (wl_subsurface.set_position, .place_above and
.place_below).
Destroying a sub-surface takes effect immediately. If you need to
synchronize the removal of a sub-surface to the parent surface update,
unmap the sub-surface first by attaching a NULL wl_buffer, update parent,
and then destroy the sub-surface.
If the parent wl_surface object is destroyed, the sub-surface is
unmapped.
A sub-surface never has the keyboard focus of any seat.
The wl_surface.offset request is ignored: clients must use set_position
instead to move the sub-surface.
wl_subsurface
enum error {
bad_surface = 0,
}- bad_surface — wl_surface is not a sibling or the parent
wl_subsurface
request set_position(
x: int,
y: int,
)- x — x coordinate in the parent surface
- y — y coordinate in the parent surface
reposition the sub-surface
This sets the position of the sub-surface, relative to the parent
surface.
The sub-surface will be moved so that its origin (top left
corner pixel) will be at the location x, y of the parent surface
coordinate system. The coordinates are not restricted to the parent
surface area. Negative values are allowed.
The initial position is 0, 0.
Position is double-buffered state on the parent surface, see
wl_subsurface and wl_surface.commit for more information.
wl_subsurface
request place_above(
sibling: object<wl_surface>,
)- sibling — the reference surface
restack the sub-surface
This sub-surface is taken from the stack, and put back just
above the reference surface, changing the z-order of the sub-surfaces.
The reference surface must be one of the sibling surfaces, or the
parent surface. Using any other surface, including this sub-surface,
will cause a protocol error.
A new sub-surface is initially added as the top-most in the stack
of its siblings and parent.
Z-order is double-buffered state on the parent surface, see
wl_subsurface and wl_surface.commit for more information.
Version 2
Compositor Support
wayland protocol fixes
This global fixes problems with other core-protocol interfaces that
cannot be fixed in these interfaces themselves.
wl_fixes
enum error {
invalid_ack_remove = 0,
}- invalid_ack_remove — unknown global or the global is not removed
wl_fixes error values
These errors can be emitted in response to wl_fixes requests.
wl_fixes
request ack_global_remove(
registry: object<wl_registry>,
name: uint,
)Available since version 2
- registry — the registry object
- name — unique name of the global
acknowledge global removal
Acknowledge the removal of the specified global.
If no global with the specified name exists or the global is not removed,
the wl_fixes.invalid_ack_remove protocol error will be posted.
Due to the Wayland protocol being asynchronous, the wl_global objects
cannot be destroyed immediately. For example, if a wl_global is removed
and a client attempts to bind that global around same time, it can
result in a protocol error due to an unknown global name in the bind
request.
In order to avoid crashing clients, the compositor should remove the
wl_global once it is guaranteed that no more bind requests will come.
The wl_fixes.ack_global_remove() request is used to signal to the
compositor that the client will not bind the given global anymore. After
all clients acknowledge the removal of the global, the compositor can
safely destroy it.
The client must call the wl_fixes.ack_global_remove() request in
response to a wl_registry.global_remove() event even if it did not bind
the corresponding global.
Copyright
Copyright © 2024 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
surface alpha modifier manager
This interface allows a client to set a factor for the alpha values on a
surface, which can be used to offload such operations to the compositor,
which can in turn for example offload them to KMS.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
wp_alpha_modifier_v1
request destroy()
Destructor
destroy the alpha modifier manager object
Destroy the alpha modifier manager. This doesn't destroy objects
created with the manager.
wp_alpha_modifier_v1
enum error {
already_constructed = 0,
}- already_constructed — wl_surface already has a alpha modifier object
Version 1
alpha modifier object for a surface
This interface allows the client to set a factor for the alpha values on
a surface, which can be used to offload such operations to the compositor.
The default factor is UINT32_MAX.
This object has to be destroyed before the associated wl_surface. Once the
wl_surface is destroyed, all request on this object will raise the
no_surface error.
wp_alpha_modifier_surface_v1
request destroy()
Destructor
destroy the alpha modifier object
This destroys the object, and is equivalent to set_multiplier with
a value of UINT32_MAX, with the same double-buffered semantics as
set_multiplier.
wp_alpha_modifier_surface_v1
request set_multiplier(
factor: uint,
)specify the alpha multiplier
Sets the alpha multiplier for the surface. The alpha multiplier is
double-buffered state, see wl_surface.commit for details.
This factor is applied in the compositor's blending space, as an
additional step after the processing of per-pixel alpha values for the
wl_surface. The exact meaning of the factor is thus undefined, unless
the blending space is specified in a different extension.
This multiplier is applied even if the buffer attached to the
wl_surface doesn't have an alpha channel; in that case an alpha value
of one is used instead.
Zero means completely transparent, UINT32_MAX means completely opaque.
Copyright
Copyright 2019 Sebastian Wick
Copyright 2019 Erwin Burema
Copyright 2020 AMD
Copyright 2020-2024 Collabora, Ltd.
Copyright 2024 Xaver Hugl
Copyright 2022-2025 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
color management protocol
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
properties of their content on surfaces. All surface contents must be
readily intended for some display, but not necessarily for the display at
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/book/ .
The color properties are represented as an image description object which
is immutable after it has been created. A wl_output always has an
associated image description that clients can observe. A wl_surface
always has an associated preferred image description as a hint chosen by
the compositor that clients can also observe. Clients can set an image
description on a wl_surface to denote the color characteristics of the
surface contents.
An image description essentially defines a display and (indirectly) its
viewing environment. An image description includes SDR and HDR colorimetry
and encoding, HDR metadata, and some parameters related to the viewing
environment. An image description does not include the properties set
through color-representation extension. It is expected that the
color-representation extension is used in conjunction with the
color-management extension when necessary, particularly with the YUV family
of pixel formats.
The normative appendix for this protocol is in the appendix.md file beside
this XML file.
The color-and-hdr repository
(https://gitlab.freedesktop.org/pq/color-and-hdr) contains
background information on the protocol design and legacy color management.
It also contains a glossary, learning resources for digital color, tools,
samples and more.
The terminology used in this protocol is based on common color science and
color encoding terminology where possible. The glossary in the color-and-hdr
repository shall be the authority on the definition of terms in this
protocol.
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.
Version 3
Compositor Support
color manager singleton
A singleton global interface used for getting color management extensions
for wl_surface and wl_output objects, and for creating client defined
image description objects. The extension interfaces allow
getting the image description of outputs and setting the image
description of surfaces.
Compositors should never remove this global.
wp_color_manager_v1
enum error {
unsupported_feature = 0,
surface_exists = 1,
}- unsupported_feature — request not supported
- surface_exists — color management surface exists already
wp_color_manager_v1
enum render_intent {
perceptual = 0,
relative = 1,
saturation = 2,
absolute = 3,
relative_bpc = 4,
absolute_no_adaptation = 5,
}rendering intents
See the ICC.1:2022 specification from the International Color Consortium
for more details about rendering intents.
The principles of ICC defined rendering intents apply with all types of
image descriptions, not only those with ICC file profiles.
Compositors must support the perceptual rendering intent. Other
rendering intents are optional.
wp_color_manager_v1
enum feature {
icc_v2_v4 = 0,
parametric = 1,
set_primaries = 2,
set_tf_power = 3,
set_luminances = 4,
set_mastering_display_primaries = 5,
extended_target_volume = 6,
windows_scrgb = 7,
windows_bt2100 = 8,
}- icc_v2_v4 — create_icc_creator request
- parametric — create_parametric_creator request
- set_primaries — parametric set_primaries request
- set_tf_power — parametric set_tf_power request
- set_luminances — parametric set_luminances request
- set_mastering_display_primaries
parametric set_mastering_display_primaries request
The compositor supports set_mastering_display_primaries request with a
target color volume fully contained inside the primary color volume.
- extended_target_volume
parametric target exceeds primary color volume
The compositor additionally supports target color volumes that
extend outside of the primary color volume.
This can only be advertised if feature set_mastering_display_primaries
is supported as well.
- windows_scrgb — create_windows_scrgb request
- windows_bt2100 — create_windows_bt2100 request
compositor supported features
wp_color_manager_v1
enum primaries {
srgb = 1,
pal_m = 2,
pal = 3,
ntsc = 4,
generic_film = 5,
bt2020 = 6,
cie1931_xyz = 7,
dci_p3 = 8,
display_p3 = 9,
adobe_rgb = 10,
}- srgb
Color primaries for the sRGB color space as defined by the BT.709 standard
Color primaries as defined by
Rec. ITU-R BT.709-6
Rec. ITU-R BT.1361-0 conventional colour gamut system and extended
colour gamut system (historical)
IEC 61966-2-1 sRGB or sYCC
IEC 61966-2-4
Society of Motion Picture and Television Engineers (SMPTE) RP 177
(1993) Annex B
- pal_m
Color primaries for PAL-M as defined by the BT.470 standard
Color primaries as defined by
Rec. ITU-R BT.470-6 System M (historical)
United States National Television System Committee 1953
Recommendation for transmission standards for color television
United States Federal Communications Commission (2003) Title 47 Code
of Federal Regulations 73.682 (a)(20)
- pal
Color primaries for PAL as defined by the BT.601 standard
Color primaries as defined by
Rec. ITU-R BT.470-6 System B, G (historical)
Rec. ITU-R BT.601-7 625
Rec. ITU-R BT.1358-0 625 (historical)
Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
- ntsc
Color primaries for NTSC as defined by the BT.601 standard
Color primaries as defined by
Rec. ITU-R BT.601-7 525
Rec. ITU-R BT.1358-1 525 or 625 (historical)
Rec. ITU-R BT.1700-0 NTSC
SMPTE 170M (2004)
SMPTE 240M (1999) (historical)
- generic_film
Generic film with colour filters using Illuminant C
Color primaries as defined by Recommendation ITU-T H.273
"Coding-independent code points for video signal type identification"
for "generic film".
- bt2020
Color primaries as defined by the BT.2020 and BT.2100 standard
Color primaries as defined by
Rec. ITU-R BT.2020-2
Rec. ITU-R BT.2100-0
- cie1931_xyz
Color primaries of the full CIE 1931 XYZ color space
Color primaries as defined as the maximum of the CIE 1931 XYZ color
space by
- dci_p3
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
SMPTE RP 431-2 (2011).
- display_p3
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
SMPTE EG 432-1 (2010).
- adobe_rgb
Color primaries of the Adobe RGB color space as defined by the ISO 12640 standard
Color primaries as defined by Adobe as "Adobe RGB" and later published
by ISO 12640-4 (2011).
named color primaries
Named color primaries used to encode well-known sets of primaries.
A value of 0 is invalid and will never be present in the list of enums.
wp_color_manager_v1
enum transfer_function {
bt1886 = 1,
gamma22 = 2,
gamma28 = 3,
st240 = 4,
ext_linear = 5,
log_100 = 6,
log_316 = 7,
xvycc = 8,
srgb = 9,
ext_srgb = 10,
st2084_pq = 11,
st428 = 12,
hlg = 13,
compound_power_2_4 = 14,
}- bt1886
BT.1886 display transfer characteristic
Rec. ITU-R BT.1886 is the display transfer characteristic assumed by
This TF implies these default luminances from Rec. ITU-R BT.2035:
primary color volume minimum: 0.01 cd/m²
primary color volume maximum: 100 cd/m²
reference white: 100 cd/m²
- gamma22
Assumed display gamma 2.2 transfer function
Transfer characteristics as defined by
Rec. ITU-R BT.470-6 System M (historical)
United States National Television System Committee 1953
Recommendation for transmission standards for color television
United States Federal Communications Commission (2003) Title 47 Code
of Federal Regulations 73.682 (a) (20)
Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
IEC 61966-2-1 (reference display)
- gamma28
Assumed display gamma 2.8 transfer function
Transfer characteristics as defined by
- st240
SMPTE ST 240 transfer function
Transfer characteristics as defined by
- ext_linear
extended linear transfer function
Linear transfer function defined over all real numbers.
Normalised electrical values are equal the normalised optical values.
- log_100
logarithmic 100:1 transfer function
Logarithmic transfer characteristic (100:1 range).
- log_316
logarithmic (100*Sqrt(10) : 1) transfer function
Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range).
- xvycc
IEC 61966-2-4 transfer function
Transfer characteristics as defined by
- srgb
Deprecated since version 2
Deprecated (ambiguous sRGB transfer function)
Transfer characteristics as defined by
As a rule of thumb, use gamma22 for video, motion picture and
computer graphics, or compound_power_2_4 for ICC calibrated print
workflows.
- ext_srgb
Deprecated since version 2
Deprecated (Extended sRGB piece-wise transfer function)
Transfer characteristics as defined by
- st2084_pq
perceptual quantizer transfer function
Transfer characteristics as defined by
SMPTE ST 2084 (2014) for 10-, 12-, 14- and 16-bit systems
Rec. ITU-R BT.2100-2 perceptual quantization (PQ) system
This TF implies these default luminances
primary color volume minimum: 0.005 cd/m²
primary color volume maximum: 10000 cd/m²
reference white: 203 cd/m²
The difference between the primary color volume minimum and maximum
must be approximately 10000 cd/m² as that is the swing of the EOTF
defined by ST 2084 and BT.2100. The default value for the
reference white is a protocol addition: it is suggested by
Report ITU-R BT.2408-7 and is not part of ST 2084 or BT.2100.
- st428
SMPTE ST 428 transfer function
Transfer characteristics as defined by
- hlg
hybrid log-gamma transfer function
Transfer characteristics as defined by
This TF implies these default luminances
primary color volume minimum: 0.005 cd/m²
primary color volume maximum: 1000 cd/m²
reference white: 203 cd/m²
HLG is a relative display-referred signal with a specified
non-linear mapping to the display peak luminance (the HLG OOTF).
All absolute luminance values used here for HLG assume a 1000 cd/m²
peak display.
The default value for the reference white is a protocol addition:
it is suggested by Report ITU-R BT.2408-7 and is not part of
ARIB STD-B67 or BT.2100.
- compound_power_2_4
Available since version 2
IEC 61966-2-1 encoding function
Encoding characteristics as defined by IEC 61966-2-1, for displays
that invert the encoding function.
named transfer functions
Named transfer functions used to represent well-known transfer
characteristics of displays.
A value of 0 is invalid and will never be present in the list of enums.
See appendix.md for the formulae.
wp_color_manager_v1
request create_windows_scrgb(
image_description: new_id<wp_image_description_v1>,
)create Windows-scRGB image description object
This creates a pre-defined image description for the so-called
Windows-scRGB stimulus encoding. This comes from the Windows 10 handling
of its own definition of an scRGB color space for an HDR screen
driven in BT.2100/PQ signalling mode.
Windows-scRGB uses sRGB (BT.709) color primaries and white point.
The transfer characteristic is extended linear.
The nominal color channel value range is extended, meaning it includes
negative and greater than 1.0 values. Negative values are used to
escape the sRGB color gamut boundaries. To make use of the extended
range, the client needs to use a pixel format that can represent those
values, e.g. floating-point 16 bits per channel.
Nominal color value R=G=B=0.0 corresponds to BT.2100/PQ system
0 cd/m², and R=G=B=1.0 corresponds to BT.2100/PQ system 80 cd/m².
The maximum is R=G=B=125.0 corresponding to 10k cd/m².
Windows-scRGB is displayed by Windows 10 by converting it to
BT.2100/PQ, maintaining the CIE 1931 chromaticity and mapping the
luminance as above. No adjustment is made to the signal to account
for the viewing conditions.
The reference white level of Windows-scRGB is unknown. If a
reference white level must be assumed for compositor processing, it
should be R=G=B=2.5375 corresponding to 203 cd/m² of Report ITU-R
BT.2408-7.
The target color volume of Windows-scRGB is unknown. The color gamut
may be anything between sRGB and BT.2100.
Note: EGL_EXT_gl_colorspace_scrgb_linear definition differs from
Windows-scRGB by using R=G=B=1.0 as the reference white level, while
Windows-scRGB reference white level is unknown or varies. However,
it seems probable that Windows implements both
EGL_EXT_gl_colorspace_scrgb_linear and Vulkan
VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT as Windows-scRGB.
This request can be used when the compositor advertises
wp_color_manager_v1.feature.windows_scrgb.
Otherwise this request raises the protocol error unsupported_feature.
The resulting image description object does not allow get_information
request. The wp_image_description_v1.ready event shall be sent.
wp_color_manager_v1
event supported_intent(
render_intent: uint<render_intent>,
)- render_intent — rendering intent
supported rendering intent
When this object is created, it shall immediately send this event once
for each rendering intent the compositor supports.
A compositor must not advertise intents that are deprecated in the
bound version of the interface.
wp_color_manager_v1
event supported_feature(
feature: uint<feature>,
)- feature — supported feature
supported features
When this object is created, it shall immediately send this event once
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.
wp_color_manager_v1
event supported_tf_named(
tf: uint<transfer_function>,
)- tf — Named transfer function
supported named transfer characteristic
When this object is created, it shall immediately send this event once
for each named transfer function the compositor supports with the
parametric image description creator.
A compositor must not advertise transfer functions that are deprecated
in the bound version of the interface.
wp_color_manager_v1
event supported_primaries_named(
primaries: uint<primaries>,
)- primaries — Named color primaries
supported named primaries
When this object is created, it shall immediately send this event once
for each named set of primaries the compositor supports with the
parametric image description creator.
A compositor must not advertise names that are deprecated in the
bound version of the interface.
wp_color_manager_v1
event done()
all features have been sent
This event is sent when all supported rendering intents, features,
transfer functions and named primaries have been sent.
wp_color_manager_v1
request create_windows_bt2100(
image_description: new_id<wp_image_description_v1>,
)Available since version 3
create Windows-BT.2100 image description object
This creates a pre-defined image description for the so-called
Windows-BT.2100 stimulus encoding. This comes from the Windows 10
handling of its own definition of a BT.2100 color space for an HDR
screen driven in BT.2100/PQ signalling mode.
Windows-BT.2100 uses BT.2020 color primaries and white point.
The transfer characteristic is st2084_pq.
Windows-BT.2100 is generally displayed by Windows 10 without any
adjustments to the signal to account for viewing conditions.
The reference white level of Windows-BT.2100 is unknown. If a
reference white level must be assumed for compositor processing, it
should be 203 cd/m² of Report ITU-R BT.2408-7.
The target color volume of Windows-BT.2100 is unknown. The color gamut
may be anything up to BT.2100.
This request can be used when the compositor advertises
wp_color_manager_v1.feature.windows_bt2100.
Otherwise this request raises the protocol error unsupported_feature.
The resulting image description object does not allow get_information
request. The wp_image_description_v1.ready event shall be sent.
Version 3
wp_color_management_output_v1
event image_description_changed()
image description changed
This event is sent whenever the image description of the output changed,
followed by one wl_output.done event common to output events across all
extensions.
If the client wants to use the updated image description, it needs to do
get_image_description again, because image description objects are
immutable.
wp_color_management_output_v1
request get_image_description(
image_description: new_id<wp_image_description_v1>,
)get the image description of the output
This creates a new wp_image_description_v1 object for the current image
description of the output. There always is exactly one image description
active for an output so the client should destroy the image description
created by earlier invocations of this request. This request is usually
sent as a reaction to the image_description_changed event or when
creating a wp_color_management_output_v1 object.
The image description of an output represents the color encoding the
output expects. There might be performance and power advantages, as well
as improved color reproduction, if a content update matches the image
description of the output it is being shown on. If a content update is
shown on any other output than the one it matches the image description
of, then the color reproduction on those outputs might be considerably
worse.
The created wp_image_description_v1 object preserves the image
description of the output from the time the object was created.
The resulting image description object allows get_information request.
If this protocol object is inert, the resulting image description object
shall immediately deliver the wp_image_description_v1.failed event with
the no_output cause.
If the interface version is inadequate for the output's image
description, meaning that the client does not support all the events
needed to deliver the crucial information, the resulting image
description object shall immediately deliver the
wp_image_description_v1.failed event with the low_version cause.
Otherwise the object shall immediately deliver the ready event.
Version 3
wp_color_management_surface_v1
enum error {
render_intent = 0,
image_description = 1,
inert = 2,
}- render_intent — unsupported rendering intent
- image_description — invalid image description
- inert — forbidden request on inert object
wp_color_management_surface_v1
request set_image_description(
image_description: object<wp_image_description_v1>,
render_intent: uint<wp_color_manager_v1.render_intent>,
)- render_intent — rendering intent
set the surface image description
If this protocol object is inert, the protocol error inert is raised.
Set the image description of the underlying surface. The image
description and rendering intent are double-buffered state, see
wl_surface.commit.
It is the client's responsibility to understand the image description
it sets on a surface, and to provide content that matches that image
description. Compositors might convert images to match their own or any
other image descriptions.
Image descriptions which are not ready (see wp_image_description_v1)
are forbidden in this request, and in such case the protocol error
image_description is raised.
All image descriptions which are ready (see wp_image_description_v1)
are allowed and must always be accepted by the compositor.
When an image description is set on a surface, it establishes an
explicit link between surface pixel values and surface colorimetry.
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
render_intent is raised.
By default, a surface does not have an associated image description
nor a rendering intent. The handling of color on such surfaces is
compositor implementation defined. Compositors should handle such
surfaces as sRGB, but may handle them differently if they have specific
requirements.
Setting the image description has copy semantics; after this request,
the image description can be immediately destroyed without affecting
the pending state of the surface.
wp_color_management_surface_v1
request unset_image_description()
remove the surface image description
If this protocol object is inert, the protocol error inert is raised.
This request removes any image description from the surface. See
set_image_description for how a compositor handles a surface without
an image description. This is double-buffered state, see
wl_surface.commit.
Version 3
wp_color_management_surface_feedback_v1
event preferred_changed(
identity: uint,
)Deprecated since version 2
- identity — the 32-bit image description id number
the preferred image description changed (32-bit)
Starting from interface version 2, 'preferred_changed2' is sent instead
of this event. See the 'preferred_changed2' event for the definition.
wp_color_management_surface_feedback_v1
request get_preferred(
image_description: new_id<wp_image_description_v1>,
)get the preferred image description
If this protocol object is inert, the protocol error inert is raised.
The preferred image description represents the compositor's preferred
color encoding for this wl_surface at the current time. There might be
performance and power advantages, as well as improved color
reproduction, if the image description of a content update matches the
preferred image description.
This creates a new wp_image_description_v1 object for the currently
preferred image description for the wl_surface. The client should
stop using and destroy the image descriptions created by earlier
invocations of this request for the associated wl_surface.
This request is usually sent as a reaction to the preferred_changed
event or when creating a wp_color_management_surface_feedback_v1 object
if the client is capable of adapting to image descriptions.
The created wp_image_description_v1 object preserves the preferred image
description of the wl_surface from the time the object was created.
The resulting image description object allows get_information request.
If the image description is parametric, the client should set it on its
wl_surface only if the image description is an exact match with the
client content. Particularly if everything else matches, but the target
color volume is greater than what the client needs, the client should
create its own parameric image description with its exact parameters.
If the interface version is inadequate for the preferred image
description, meaning that the client does not support all the
events needed to deliver the crucial information, the resulting image
description object shall immediately deliver the
wp_image_description_v1.failed event with the low_version cause,
otherwise the object shall immediately deliver the ready event.
wp_color_management_surface_feedback_v1
request get_preferred_parametric(
image_description: new_id<wp_image_description_v1>,
)get the preferred image description
The same description as for get_preferred applies, except the returned
image description is guaranteed to be parametric. This is meant for
clients that can only deal with parametric image descriptions.
If the compositor doesn't support parametric image descriptions, the
unsupported_feature error is emitted.
wp_color_management_surface_feedback_v1
event preferred_changed2(
identity_hi: uint,
identity_lo: uint,
)Available since version 2
- identity_hi — high 32 bits of the 64-bit image description id number
- identity_lo — low 32 bits of the 64-bit image description id number
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
Version 3
- error — protocol errors
- create — Create the image description object from ICC data
- set_icc_file — set the ICC profile file
holder of image description ICC information
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
set of required parameters consists of these properties:
Each required property must be set exactly once if the client is to create
an image description. The set requests verify that a property was not
already set. The create request verifies that all required properties are
set. There may be several alternative requests for setting each property,
and in that case the client must choose one of them.
Once all properties have been set, the create request must be used to
create the image description object, destroying the creator in the
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.
wp_image_description_creator_icc_v1
enum error {
incomplete_set = 0,
already_set = 1,
bad_fd = 2,
bad_size = 3,
out_of_file = 4,
}- incomplete_set — incomplete parameter set
- already_set — property already set
- bad_fd — fd not seekable and readable
- bad_size — no or too much data
- out_of_file — offset + length exceeds file size
wp_image_description_creator_icc_v1
request create(
image_description: new_id<wp_image_description_v1>,
)Destructor
Create the image description object from ICC data
Create an image description object based on the ICC information
previously set on this object. A compositor must parse the ICC data in
some undefined but finite amount of time.
The completeness of the parameter set is verified. If the set is not
complete, the protocol error incomplete_set is raised. For the
definition of a complete set, see the description of this interface.
If the particular combination of the information is not supported
by the compositor, the resulting image description object shall
immediately deliver the wp_image_description_v1.failed event with the
'unsupported' cause. If a valid image description was created from the
information, the wp_image_description_v1.ready event will eventually
be sent instead.
This request destroys the wp_image_description_creator_icc_v1 object.
The resulting image description object does not allow get_information
request.
wp_image_description_creator_icc_v1
request set_icc_file(
icc_profile: fd,
offset: uint,
length: uint,
)- icc_profile — ICC profile
- offset — byte offset in fd to start of ICC data
- length — length of ICC data in bytes
set the ICC profile file
Sets the ICC profile file to be used as the basis of the image
description.
The data shall be found through the given fd at the given offset, having
the given length. The fd must be seekable and readable. Violating these
requirements raises the bad_fd protocol error.
If reading the data fails due to an error independent of the client, the
compositor shall send the wp_image_description_v1.failed event on the
created wp_image_description_v1 with the 'operating_system' cause.
The maximum size of the ICC profile is 32 MB. If length is greater than
that or zero, the protocol error bad_size is raised. If offset + length
exceeds the file size, the protocol error out_of_file is raised.
A compositor may read the file at any time starting from this request
and only until whichever happens first:
A compositor shall not modify the contents of the file, and the fd may
be sealed for writes and size changes. The client must ensure to its
best ability that the data does not change while the compositor is
reading it.
The data must represent a valid ICC profile. The ICC profile version
must be 2 or 4, it must be a 3 channel profile and the class must be
Display or ColorSpace. Violating these requirements will not result in a
protocol error, but will eventually send the
wp_image_description_v1.failed event on the created
wp_image_description_v1 with the 'unsupported' cause.
See the International Color Consortium specification ICC.1:2022 for more
details about ICC profiles.
If ICC file has already been set on this object, the protocol error
already_set is raised.
Version 3
holder of image description parameters
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
parameters consists of these properties:
The following properties are optional and have a well-defined default
if not explicitly set:
primary color volume luminance range
reference white luminance level
mastering display primaries and white point (target color volume)
mastering luminance range
The following properties are optional and will be ignored
if not explicitly set:
Each required property must be set exactly once if the client is to create
an image description. The set requests verify that a property was not
already set. The create request verifies that all required properties are
set. There may be several alternative requests for setting each property,
and in that case the client must choose one of them.
Once all properties have been set, the create request must be used to
create the image description object, destroying the creator in the
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.
wp_image_description_creator_params_v1
enum error {
incomplete_set = 0,
already_set = 1,
unsupported_feature = 2,
invalid_tf = 3,
invalid_primaries_named = 4,
invalid_luminance = 5,
}- incomplete_set — incomplete parameter set
- already_set — property already set
- unsupported_feature — request not supported
- invalid_tf — invalid transfer characteristic
- invalid_primaries_named — invalid primaries named
- invalid_luminance — invalid luminance value or range
wp_image_description_creator_params_v1
request create(
image_description: new_id<wp_image_description_v1>,
)Destructor
Create the image description object using params
Create an image description object based on the parameters previously
set on this object.
The completeness of the parameter set is verified. If the set is not
complete, the protocol error incomplete_set is raised. For the
definition of a complete set, see the description of this interface.
When both max_cll and max_fall are set, max_fall must be less or equal
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
to max L of the mastering luminance range.
When max_fall is set, it must be greater than min L and less or equal
to max L of the mastering luminance range.
If the particular combination of the parameter set is not supported
by the compositor, the resulting image description object shall
immediately deliver the wp_image_description_v1.failed event with the
'unsupported' cause. If a valid image description was created from the
parameter set, the wp_image_description_v1.ready event will eventually
be sent instead.
This request destroys the wp_image_description_creator_params_v1
object.
The resulting image description object does not allow get_information
request.
wp_image_description_creator_params_v1
request set_tf_named(
tf: uint<wp_color_manager_v1.transfer_function>,
)- tf — named transfer function
named transfer characteristic
Sets the transfer characteristic using explicitly enumerated named
functions.
When the resulting image description is attached to an image, the
content should be decoded according to the industry standard
practices for the transfer characteristic.
Only names advertised with wp_color_manager_v1 event supported_tf_named
are allowed. Other values shall raise the protocol error invalid_tf.
If transfer characteristic has already been set on this object, the
protocol error already_set is raised.
wp_image_description_creator_params_v1
request set_tf_power(
eexp: uint,
)- eexp — the exponent * 10000
transfer characteristic as a power curve
Sets the color component transfer characteristic to a power curve with
the given exponent. Negative values are handled by mirroring the
positive half of the curve through the origin. The valid domain and
range of the curve are all finite real numbers. This curve represents
the conversion from electrical to optical color channel values.
The curve exponent shall be multiplied by 10000 to get the argument eexp
value to carry the precision of 4 decimals.
The curve exponent must be at least 1.0 and at most 10.0. Otherwise the
protocol error invalid_tf is raised.
If transfer characteristic has already been set on this object, the
protocol error already_set is raised.
This request can be used when the compositor advertises
wp_color_manager_v1.feature.set_tf_power. Otherwise this request raises
the protocol error unsupported_feature.
wp_image_description_creator_params_v1
request set_primaries_named(
primaries: uint<wp_color_manager_v1.primaries>,
)- primaries — named primaries
named primaries
Sets the color primaries and white point using explicitly named sets.
This describes the primary color volume which is the basis for color
value encoding.
Only names advertised with wp_color_manager_v1 event
supported_primaries_named are allowed. Other values shall raise the
protocol error invalid_primaries_named.
If primaries have already been set on this object, the protocol error
already_set is raised.
wp_image_description_creator_params_v1
request set_primaries(
r_x: int,
r_y: int,
g_x: int,
g_y: int,
b_x: int,
b_y: int,
w_x: int,
w_y: int,
)- r_x — Red x * 1M
- r_y — Red y * 1M
- g_x — Green x * 1M
- g_y — Green y * 1M
- b_x — Blue x * 1M
- b_y — Blue y * 1M
- w_x — White x * 1M
- w_y — White y * 1M
primaries as chromaticity coordinates
Sets the color primaries and white point using CIE 1931 xy chromaticity
coordinates. This describes the primary color volume which is the basis
for color value encoding.
Each coordinate value is multiplied by 1 million to get the argument
value to carry precision of 6 decimals.
If primaries have already been set on this object, the protocol error
already_set is raised.
This request can be used if the compositor advertises
wp_color_manager_v1.feature.set_primaries. Otherwise this request raises
the protocol error unsupported_feature.
wp_image_description_creator_params_v1
request set_luminances(
min_lum: uint,
max_lum: uint,
reference_lum: uint,
)- min_lum — minimum luminance (cd/m²) * 10000
- max_lum — maximum luminance (cd/m²)
- reference_lum — reference white luminance (cd/m²)
primary color volume luminance range and reference white
Sets the primary color volume luminance range and the reference white
luminance level. These values include the minimum display emission, but
not external flare. The minimum display emission is assumed to have
the chromaticity of the primary color volume white point.
The default luminances from
https://www.color.org/chardata/rgb/srgb.xalter are
primary color volume minimum: 0.2 cd/m²
primary color volume maximum: 80 cd/m²
reference white: 80 cd/m²
Setting a named transfer characteristic can imply other default
luminances.
The default luminances get overwritten when this request is used.
With transfer_function.st2084_pq the given 'max_lum' value is ignored,
and 'max_lum' is taken as 'min_lum' + 10000 cd/m².
'min_lum' and 'max_lum' specify the minimum and maximum luminances of
the primary color volume as reproduced by the targeted display.
'reference_lum' specifies the luminance of the reference white as
reproduced by the targeted display, and reflects the targeted viewing
environment.
Compositors should make sure that all content is anchored, meaning that
an input signal level of 'reference_lum' on one image description and
another input signal level of 'reference_lum' on another image
description should produce the same output level, even though the
'reference_lum' on both image representations can be different.
'reference_lum' may be higher than 'max_lum'. In that case reaching
the reference white output level in image content requires the
'extended_target_volume' feature support.
If 'max_lum' or 'reference_lum' are less than or equal to 'min_lum',
the protocol error invalid_luminance is raised.
The minimum luminance is multiplied by 10000 to get the argument
'min_lum' value and carries precision of 4 decimals. The maximum
luminance and reference white luminance values are unscaled.
If the primary color volume luminance range and the reference white
luminance level have already been set on this object, the protocol error
already_set is raised.
This request can be used if the compositor advertises
wp_color_manager_v1.feature.set_luminances. Otherwise this request
raises the protocol error unsupported_feature.
wp_image_description_creator_params_v1
request set_mastering_display_primaries(
r_x: int,
r_y: int,
g_x: int,
g_y: int,
b_x: int,
b_y: int,
w_x: int,
w_y: int,
)- r_x — Red x * 1M
- r_y — Red y * 1M
- g_x — Green x * 1M
- g_y — Green y * 1M
- b_x — Blue x * 1M
- b_y — Blue y * 1M
- w_x — White x * 1M
- w_y — White y * 1M
mastering display primaries as chromaticity coordinates
Provides the color primaries and white point of the mastering display
using CIE 1931 xy chromaticity coordinates. This is compatible with the
SMPTE ST 2086 definition of HDR static metadata.
The mastering display primaries and mastering display luminances define
the target color volume.
If mastering display primaries are not explicitly set, the target color
volume is assumed to have the same primaries as the primary color volume.
The target color volume is defined by all tristimulus values between 0.0
and 1.0 (inclusive) of the color space defined by the given mastering
display primaries and white point. The colorimetry is identical between
the container color space and the mastering display color space,
including that no chromatic adaptation is applied even if the white
points differ.
The target color volume can exceed the primary color volume to allow for
a greater color volume with an existing color space definition (for
example scRGB). It can be smaller than the primary color volume to
minimize gamut and tone mapping distances for big color spaces (HDR
metadata).
To make use of the entire target color volume a suitable pixel format
has to be chosen (e.g. floating point to exceed the primary color
volume, or abusing limited quantization range as with xvYCC).
Each coordinate value is multiplied by 1 million to get the argument
value to carry precision of 6 decimals.
If mastering display primaries have already been set on this object, the
protocol error already_set is raised.
This request can be used if the compositor advertises
wp_color_manager_v1.feature.set_mastering_display_primaries. Otherwise
this request raises the protocol error unsupported_feature. The
advertisement implies support only for target color volumes fully
contained within the primary color volume.
If a compositor additionally supports target color volume exceeding the
primary color volume, it must advertise
wp_color_manager_v1.feature.extended_target_volume. If a client uses
target color volume exceeding the primary color volume and the
compositor does not support it, the result is implementation defined.
Compositors are recommended to detect this case and fail the image
description gracefully, but it may as well result in color artifacts.
wp_image_description_creator_params_v1
request set_mastering_luminance(
min_lum: uint,
max_lum: uint,
)- min_lum — min L (cd/m²) * 10000
- max_lum — max L (cd/m²)
display mastering luminance range
Sets the luminance range that was used during the content mastering
process as the minimum and maximum absolute luminance L. These values
include the minimum display emission and ambient flare luminances,
assumed to be optically additive and have the chromaticity of the
primary color volume white point. This should be
compatible with the SMPTE ST 2086 definition of HDR static metadata.
The mastering display primaries and mastering display luminances define
the target color volume.
If mastering luminances are not explicitly set, the target color volume
is assumed to have the same min and max luminances as the primary color
volume.
If max L is less than or equal to min L, the protocol error
invalid_luminance is raised.
Min L value is multiplied by 10000 to get the argument min_lum value
and carry precision of 4 decimals. Max L value is unscaled for max_lum.
This request can be used if the compositor advertises
wp_color_manager_v1.feature.set_mastering_display_primaries. Otherwise
this request raises the protocol error unsupported_feature. The
advertisement implies support only for target color volumes fully
contained within the primary color volume.
If a compositor additionally supports target color volume exceeding the
primary color volume, it must advertise
wp_color_manager_v1.feature.extended_target_volume. If a client uses
target color volume exceeding the primary color volume and the
compositor does not support it, the result is implementation defined.
Compositors are recommended to detect this case and fail the image
description gracefully, but it may as well result in color artifacts.
wp_image_description_creator_params_v1
request set_max_cll(
max_cll: uint,
)- max_cll — Maximum content light level (cd/m²)
maximum content light level
Sets the maximum content light level (max_cll) as defined by CTA-861-H.
max_cll is undefined by default.
wp_image_description_creator_params_v1
request set_max_fall(
max_fall: uint,
)- max_fall — Maximum frame-average light level (cd/m²)
maximum frame-average light level
Sets the maximum frame-average light level (max_fall) as defined by
CTA-861-H.
max_fall is undefined by default.
Version 3
- destroy — destroy the image description
- error — protocol errors
- cause — generic reason for failure
- failed — graceful error on creating the image description
- ready — the object is ready to be used (32-bit)
- get_information — get information about the image description
- ready2 — the object is ready to be used
Colorimetric image description
An image description carries information about the pixel color encoding
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
this information to decode pixel values into colorimetrically meaningful
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
immediately after creation. The object eventually delivers either the
'ready' or the 'failed' event, specified in all requests creating it. The
object is deemed "ready" after receiving the 'ready' event.
An object which is not ready is illegal to use, it can only be destroyed.
Any other request in this interface shall result in the 'not_ready'
protocol error. Attempts to use an object which is not ready through other
interfaces shall raise protocol errors defined there.
Once created and regardless of how it was created, a
wp_image_description_v1 object always refers to one fixed image
description. It cannot change after creation.
wp_image_description_v1
enum error {
not_ready = 0,
no_information = 1,
}- not_ready — attempted to use an object which is not ready
- no_information — get_information not allowed
wp_image_description_v1
enum cause {
low_version = 0,
unsupported = 1,
operating_system = 2,
no_output = 3,
}- low_version — interface version too low
- unsupported — unsupported image description data
- operating_system — error independent of the client
- no_output — the relevant output no longer exists
generic reason for failure
wp_image_description_v1
event failed(
cause: uint<cause>,
msg: string,
)- cause — generic reason
- msg — ad hoc human-readable explanation
graceful error on creating the image description
If creating a wp_image_description_v1 object fails for a reason that is
not defined as a protocol error, this event is sent.
The requests that create image description objects define whether and
when this can occur. Only such creation requests can trigger this event.
This event cannot be triggered after the image description was
successfully formed.
Once this event has been sent, the wp_image_description_v1 object will
never become ready and it can only be destroyed.
wp_image_description_v1
event ready(
identity: uint,
)Deprecated since version 2
- identity — the 32-bit image description id number
the object is ready to be used (32-bit)
Starting from interface version 2, the 'ready2' event is sent instead
of this event.
For the definition of this event, see the 'ready2' event. The
difference to this event is as follows.
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
destroyed, the id number may be recycled for a different image
description record.
wp_image_description_v1
request get_information(
information: new_id<wp_image_description_info_v1>,
)get information about the image description
Creates a wp_image_description_info_v1 object which delivers the
information that makes up the image description.
Not all image description protocol objects allow get_information
request. Whether it is allowed or not is defined by the request that
created the object. If get_information is not allowed, the protocol
error no_information is raised.
wp_image_description_v1
event ready2(
identity_hi: uint,
identity_lo: uint,
)Available since version 2
- identity_hi — high 32 bits of the 64-bit image description id number
- identity_lo — low 32 bits of the 64-bit image description id number
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.
Version 3
Colorimetric image description information
Sends all matching events describing an image description object exactly
once and finally sends the 'done' event.
This means
if the image description is parametric, it must send
primaries
named_primaries, if applicable
at least one of tf_power and tf_named, as applicable
luminances
target_primaries
target_luminance
if the image description is parametric, it may send, if applicable,
target_max_cll
target_max_fall
if the image description contains an ICC profile, it must send the
icc_file event
Once a wp_image_description_info_v1 object has delivered a 'done' event it
is automatically destroyed.
Every wp_image_description_info_v1 created from the same
wp_image_description_v1 shall always return the exact same data.
wp_image_description_info_v1
event icc_file(
icc: fd,
icc_size: uint,
)- icc — ICC profile file descriptor
- icc_size — ICC profile size, in bytes
ICC profile matching the image description
The icc argument provides a file descriptor to the client which may be
memory-mapped to provide the ICC profile matching the image description.
The fd is read-only, and if mapped then it must be mapped with
MAP_PRIVATE by the client.
The ICC profile version and other details are determined by the
compositor. There is no provision for a client to ask for a specific
kind of a profile.
wp_image_description_info_v1
event primaries(
r_x: int,
r_y: int,
g_x: int,
g_y: int,
b_x: int,
b_y: int,
w_x: int,
w_y: int,
)- r_x — Red x * 1M
- r_y — Red y * 1M
- g_x — Green x * 1M
- g_y — Green y * 1M
- b_x — Blue x * 1M
- b_y — Blue y * 1M
- w_x — White x * 1M
- w_y — White y * 1M
primaries as chromaticity coordinates
Delivers the primary color volume primaries and white point using CIE
1931 xy chromaticity coordinates.
Each coordinate value is multiplied by 1 million to get the argument
value to carry precision of 6 decimals.
wp_image_description_info_v1
event tf_power(
eexp: uint,
)- eexp — the exponent * 10000
transfer characteristic as a power curve
The color component transfer characteristic of this image description is
a pure power curve. This event provides the exponent of the power
function. This curve represents the conversion from electrical to
optical pixel or color values.
The curve exponent has been multiplied by 10000 to get the argument eexp
value to carry the precision of 4 decimals.
wp_image_description_info_v1
event luminances(
min_lum: uint,
max_lum: uint,
reference_lum: uint,
)- min_lum — minimum luminance (cd/m²) * 10000
- max_lum — maximum luminance (cd/m²)
- reference_lum — reference white luminance (cd/m²)
primary color volume luminance range and reference white
Delivers the primary color volume luminance range and the reference
white luminance level. These values include the minimum display emission
and ambient flare luminances, assumed to be optically additive and have
the chromaticity of the primary color volume white point.
The minimum luminance is multiplied by 10000 to get the argument
'min_lum' value and carries precision of 4 decimals. The maximum
luminance and reference white luminance values are unscaled.
wp_image_description_info_v1
event target_primaries(
r_x: int,
r_y: int,
g_x: int,
g_y: int,
b_x: int,
b_y: int,
w_x: int,
w_y: int,
)- r_x — Red x * 1M
- r_y — Red y * 1M
- g_x — Green x * 1M
- g_y — Green y * 1M
- b_x — Blue x * 1M
- b_y — Blue y * 1M
- w_x — White x * 1M
- w_y — White y * 1M
target primaries as chromaticity coordinates
Provides the color primaries and white point of the target color volume
using CIE 1931 xy chromaticity coordinates. This is compatible with the
SMPTE ST 2086 definition of HDR static metadata for mastering displays.
While primary color volume is about how color is encoded, the target
color volume is the actually displayable color volume.
Each coordinate value is multiplied by 1 million to get the argument
value to carry precision of 6 decimals.
wp_image_description_info_v1
event target_luminance(
min_lum: uint,
max_lum: uint,
)- min_lum — min L (cd/m²) * 10000
- max_lum — max L (cd/m²)
target luminance range
Provides the luminance range that the image description is targeting as
the minimum and maximum absolute luminance L. These values include the
minimum display emission and ambient flare luminances, assumed to be
optically additive and have the chromaticity of the primary color
volume white point. This should be compatible with the SMPTE ST 2086
definition of HDR static metadata.
This luminance range is only theoretical and may not correspond to the
luminance of light emitted on an actual display.
Min L value is multiplied by 10000 to get the argument min_lum value and
carry precision of 4 decimals. Max L value is unscaled for max_lum.
wp_image_description_info_v1
event target_max_cll(
max_cll: uint,
)- max_cll — Maximum content light-level (cd/m²)
target maximum content light level
Provides the targeted max_cll of the image description. max_cll is
defined by CTA-861-H.
This luminance is only theoretical and may not correspond to the
luminance of light emitted on an actual display.
wp_image_description_info_v1
event target_max_fall(
max_fall: uint,
)- max_fall — Maximum frame-average light level (cd/m²)
target maximum frame-average light level
Provides the targeted max_fall of the image description. max_fall is
defined by CTA-861-H.
This luminance is only theoretical and may not correspond to the
luminance of light emitted on an actual display.
This interface is frozen
Copyright
Copyright 2022 Simon Ser
Copyright 2022 Red Hat, Inc.
Copyright 2022 Collabora, Ltd.
Copyright 2022-2025 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
color representation protocol extension
This protocol extension delivers the metadata required to define alpha mode,
the color model, sub-sampling and quantization range used when interpreting
buffer contents. The main use case is defining how the YCbCr family of pixel
formats convert to RGB.
Note that this protocol does not define the colorimetry of the resulting RGB
channels / tristimulus values. Without the help of other extensions the
resulting colorimetry is therefore implementation defined.
If this extension is not used, the color representation used is compositor
implementation defined.
Recommendation ITU-T H.273
"Coding-independent code points for video signal type identification"
shall be referred to as simply H.273 here.
Version 1
Compositor Support
Version 1jay 1.14.0
kwin 6.7
labwc 0.20.2
mutter 51
weston 15.0.1
color representation manager singleton
A singleton global interface used for getting color representation
extensions for wl_surface. The extension interfaces allow setting the
color representation of surfaces.
Compositors should never remove this global.
Version 1
wp_color_representation_surface_v1
enum error {
alpha_mode = 1,
coefficients = 2,
pixel_format = 3,
inert = 4,
chroma_location = 5,
}- alpha_mode — unsupported alpha mode
- coefficients — unsupported coefficients
- pixel_format — the pixel format and a set value are incompatible
- inert — forbidden request on inert object
- chroma_location — invalid chroma location
wp_color_representation_surface_v1
enum alpha_mode {
premultiplied_electrical = 0,
premultiplied_optical = 1,
straight = 2,
}- premultiplied_electrical
premultiplied alpha in electrical values
Electrical color channel values (after transfer function encoding)
are already multiplied with the alpha channel value.
- premultiplied_optical
premultiplied alpha in optical values
Optical color channel values (before transfer function encoding)
are already multiplied with the alpha channel value.
- straight
straight alpha
Alpha channel has not been pre-multiplied into color channels.
alpha mode
Specifies how the alpha channel affects the color channels.
wp_color_representation_surface_v1
enum coefficients {
identity = 1,
bt709 = 2,
fcc = 3,
bt601 = 4,
smpte240 = 5,
bt2020 = 6,
bt2020_cl = 7,
ictcp = 8,
}- identity
The identity matrix
Coefficients as defined by
IEC 61966-2-1 sRGB
SMPTE ST 428-1 (2019)
Equivalent to H.273 MatrixCoefficients code point 0.
Compatible with pixel formats of the RGB family.
- bt709
BT.709 matrix coefficients
Coefficients as defined by
Rec. ITU-R BT.709-6
Rec. ITU-R BT.1361-0 conventional colour gamut system (historical)
Rec. ITU-R BT.1361-0 conventional colour gamut system and extended
colour gamut system (historical)
IEC 61966-2-4 xvYCC709
SMPTE RP 177 (1993) Annex B
Equivalent to H.273 MatrixCoefficients code point 1.
Compatible with pixel formats of the YCbCr family.
- fcc
FCC matrix coefficients
Coefficients as defined by
Equivalent to H.273 MatrixCoefficients code point 4.
Compatible with pixel formats of the YCbCr family.
- bt601
BT.601-7 matrix coefficients
Coefficients as defined by
Rec. ITU-R BT.470-6 System B, G (historical)
Rec. ITU-R BT.601-7 625
Rec. ITU-R BT.601-7 525
Rec. ITU-R BT.1358-0 625 (historical)
Rec. ITU-R BT.1358-1 525 or 625 (historical)
Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
Rec. ITU-R BT.1700-0 NTSC
IEC 61966-2-1 sYCC
IEC 61966-2-4 xvYCC601
SMPTE ST 170 (2004)
Equivalent to H.273 MatrixCoefficients code point 5, 6.
Compatible with pixel formats of the YCbCr family.
- smpte240
SMPTE ST 240 matrix coefficients
Coefficients as defined by
Equivalent to H.273 MatrixCoefficients code point 7.
Compatible with pixel formats of the YCbCr family.
- bt2020
BT.2020 and BT.2100 YCbCr matrix coefficients
Coefficients as defined by
Equivalent to H.273 MatrixCoefficients code point 9.
Compatible with pixel formats of the YCbCr family.
- bt2020_cl
BT.2020 matrix coefficients for constant luminance
Coefficients as defined by
Equivalent to H.273 MatrixCoefficients code point 10.
Compatible with pixel formats of the YCbCr family.
- ictcp
BT.2100 ICtCp matrix coefficients
Coefficients as defined by
Equivalent to H.273 MatrixCoefficients code point 14.
Compatible with pixel formats of the YCbCr family.
named coefficients
Named matrix coefficients used to encode well-known sets of
coefficients. H.273 is the authority, when it comes to the exact values
of coefficients and authoritative specifications, where an equivalent
code point exists.
A value of 0 is invalid and will never be present in the list of enums.
Descriptions do list the specifications for convenience.
wp_color_representation_surface_v1
enum range {
full = 1,
limited = 2,
}- full — Full color range
- limited — Limited color range
Color range values
Possible color range values.
A value of 0 is invalid and will never be present in the list of enums.
wp_color_representation_surface_v1
enum chroma_location {
type_0 = 1,
type_1 = 2,
type_2 = 3,
type_3 = 4,
type_4 = 5,
type_5 = 6,
}- type_0
Horizontal offset of 0, vertical offset of 0.5
Corresponding to VkChromaLocations:
Equivalent to H.273 Chroma420SampleLocType 0.
- type_1
Horizontal offset of 0.5, vertical offset of 0.5
Corresponding to VkChromaLocations:
Equivalent to H.273 Chroma420SampleLocType 1.
- type_2
Horizontal offset of 0, vertical offset of 0
Corresponding to VkChromaLocations:
Equivalent to H.273 Chroma420SampleLocType 2.
- type_3
Horizontal offset of 0.5, vertical offset of 0
Corresponding to VkChromaLocations:
Equivalent to H.273 Chroma420SampleLocType 3.
- type_4
Horizontal offset of 0, vertical offset of 1
Equivalent to H.273 Chroma420SampleLocType 4.
- type_5
Horizontal offset of 0.5, vertical offset of 1
Equivalent to H.273 Chroma420SampleLocType 5.
Chroma sample location for 4:2:0 YCbCr
Chroma sample location as defined by H.273 Chroma420SampleLocType.
A value of 0 is invalid and will never be present in the list of enums.
The descriptions list the matching Vulkan VkChromaLocation combinations
for convenience.
wp_color_representation_surface_v1
request set_alpha_mode(
alpha_mode: uint<alpha_mode>,
)set the surface alpha mode
If this protocol object is inert, the protocol error inert is raised.
Assuming an alpha channel exists, it is always linear. The alpha mode
determines whether and how the color channels include pre-multiplied
alpha. Using straight alpha might have performance benefits.
Only alpha modes advertised by the compositor are allowed to be used as
argument for this request. The "alpha_mode" protocol error is raised
otherwise.
Alpha mode is double buffered, see wl_surface.commit.
wp_color_representation_surface_v1
request set_coefficients_and_range(
coefficients: uint<coefficients>,
range: uint<range>,
)- coefficients — matrix coefficients
- range — range
set the matrix coefficients and range
If this protocol object is inert, the protocol error inert is raised.
Set the matrix coefficients and video range which defines the formula
and the related constants used to derive red, green and blue signals.
Usually coefficients correspond to MatrixCoefficients code points in
H.273.
Only combinations advertised by the compositor are allowed to be used as
argument for this request. The "coefficients" protocol error is raised
otherwise.
A call to wl_surface.commit verifies that the pixel format and the
coefficients-range combination in the committed surface contents are
compatible, if contents exist. The "pixel_format" protocol error is
raised otherwise.
A pixel format is compatible with the coefficients-range combination if
the related equations and conventions as defined in H.273 can produce
the color channels (RGB or YCbCr) of the pixel format.
For the definition of the supported combination, see the
wp_color_representation_surface_v1::coefficients and
wp_color_representation_surface_v1::range enums.
The coefficients-range combination is double-buffered, see
wl_surface.commit.
wp_color_representation_surface_v1
request set_chroma_location(
chroma_location: uint<chroma_location>,
)- chroma_location — chroma sample location
set the chroma location
If this protocol object is inert, the protocol error inert is raised.
Set the chroma location type which defines the position of downsampled
chroma samples, corresponding to Chroma420SampleLocType code points in
H.273.
An invalid chroma location enum value raises the "chroma_location"
protocol error.
A call to wl_surface.commit verifies that the pixel format and chroma
location type in the committed surface contents are compatible, if
contents exist. The "pixel_format" protocol error is raised otherwise.
For the definition of the supported chroma location types, see the
wp_color_representation_surface_v1::chroma_location enum.
The chroma location type is double-buffered, see wl_surface.commit.
Copyright
Copyright © 2023 Valve Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
- error
- destroy — unbind from the commit timing interface
- get_timer — request commit timer interface for surface
Compositor Support
Version 1hyprland 0.52.1
jay 1.14.0
mutter 51
weston 15.0.1
commit timing
When a compositor latches on to new content updates it will check for
any number of requirements of the available content updates (such as
fences of all buffers being signalled) to consider the update ready.
This protocol provides a method for adding a time constraint to surface
content. This constraint indicates to the compositor that a content
update should be presented as closely as possible to, but not before,
a specified time.
This protocol does not change the Wayland property that content
updates are applied in the order they are received, even when some
content updates contain timestamps and others do not.
To provide timestamps, this global factory interface must be used to
acquire a wp_commit_timing_v1 object for a surface, which may then be
used to provide timestamp information for commits.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
wp_commit_timing_manager_v1
request destroy()
Destructor
unbind from the commit timing interface
Informs the server that the client will no longer be using
this protocol object. Existing objects created by this object
are not affected.
Version 1
Surface commit timer
An object to set a time constraint for a content update on a surface.
wp_commit_timer_v1
enum error {
invalid_timestamp = 0,
timestamp_exists = 1,
surface_destroyed = 2,
}- invalid_timestamp — timestamp contains an invalid value
- timestamp_exists — timestamp exists
- surface_destroyed — the associated surface no longer exists
wp_commit_timer_v1
request set_timestamp(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the seconds part of target time
- tv_sec_lo — low 32 bits of the seconds part of target time
- tv_nsec — nanoseconds part of target time
Specify time the following commit takes effect
Provide a timing constraint for a surface content update.
A set_timestamp request may be made before a wl_surface.commit to
tell the compositor that the content is intended to be presented
as closely as possible to, but not before, the specified time.
The time is in the domain of the compositor's presentation clock.
An invalid_timestamp error will be generated for invalid tv_nsec.
If a timestamp already exists on the surface, a timestamp_exists
error is generated.
Requesting set_timestamp after the commit_timer object's surface is
destroyed will generate a "surface_destroyed" error.
wp_commit_timer_v1
request destroy()
Destructor
Destroy the timer
Informs the server that the client will no longer be using
this protocol object.
Existing timing constraints are not affected by the destruction.
Copyright
Copyright © 2021 Emmanuel Gil Peyrot
Copyright © 2022 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1hyprland 0.52.1
jay 1.14.0
kwin 6.7
louvre 2.14.1
sway 1.11
surface content type manager
This interface allows a client to describe the kind of content a surface
will display, to allow the compositor to optimize its behavior for it.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
wp_content_type_manager_v1
request destroy()
Destructor
destroy the content type manager object
Destroy the content type manager. This doesn't destroy objects created
with the manager.
Version 1
content type object for a surface
The content type object allows the compositor to optimize for the kind
of content shown on the surface. A compositor may for example use it to
set relevant drm properties like "content type".
The client may request to switch to another content type at any time.
When the associated surface gets destroyed, this object becomes inert and
the client should destroy it.
wp_content_type_v1
request destroy()
Destructor
destroy the content type object
Switch back to not specifying the content type of this surface. This is
equivalent to setting the content type to none, including double
buffering semantics. See set_content_type for details.
wp_content_type_v1
enum type {
none = 0,
photo = 1,
video = 2,
game = 3,
}- none
no content type applies
The content type none means that either the application has no data
about the content type, or that the content doesn't fit into one of
the other categories.
- photo
photo content type
The content type photo describes content derived from digital still
pictures and may be presented with minimal processing.
- video
video content type
The content type video describes a video or animation and may be
presented with more accurate timing to avoid stutter. Where scaling
is needed, scaling methods more appropriate for video may be used.
- game
game content type
The content type game describes a running game. Its content may be
presented with reduced latency.
possible content types
These values describe the available content types for a surface.
wp_content_type_v1
request set_content_type(
content_type: uint<type>,
)- content_type — the content type
specify the content type
Set the surface content type. This informs the compositor that the
client believes it is displaying buffers matching this content type.
This is purely a hint for the compositor, which can be used to adjust
its behavior or hardware settings to fit the presented content best.
The content type is double-buffered state, see wl_surface.commit for
details.
Copyright
Copyright 2018 The Chromium Authors
Copyright 2023 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
Compositor Support
Version 2cosmic 1.0.0
jay 1.14.0
kwin 6.7
muffin 6.7.4
mutter 51
niri 26.04
Version 1hyprland 0.52.1
labwc 0.20.2
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
cursor shape manager
This global offers an alternative, optional way to set cursor images. This
new way uses enumerated cursors instead of a wl_surface like
wl_pointer.set_cursor does.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 2
cursor shape for a device
This interface allows clients to set the cursor shape.
wp_cursor_shape_device_v1
enum shape {
default = 1,
context_menu = 2,
help = 3,
pointer = 4,
progress = 5,
wait = 6,
cell = 7,
crosshair = 8,
text = 9,
vertical_text = 10,
alias = 11,
copy = 12,
move = 13,
no_drop = 14,
not_allowed = 15,
grab = 16,
grabbing = 17,
e_resize = 18,
n_resize = 19,
ne_resize = 20,
nw_resize = 21,
s_resize = 22,
se_resize = 23,
sw_resize = 24,
w_resize = 25,
ew_resize = 26,
ns_resize = 27,
nesw_resize = 28,
nwse_resize = 29,
col_resize = 30,
row_resize = 31,
all_scroll = 32,
zoom_in = 33,
zoom_out = 34,
dnd_ask = 35,
all_resize = 36,
}cursor shapes
This enum describes cursor shapes.
The names are taken from the CSS W3C specification:
https://w3c.github.io/csswg-drafts/css-ui/#cursor
with a few additions.
Note that there are some groups of cursor shapes that are related:
The first group is drag-and-drop cursors which are used to indicate
the selected action during dnd operations. The second group is resize
cursors which are used to indicate resizing and moving possibilities
on window borders. It is recommended that the shapes in these groups
should use visually compatible images and metaphors.
wp_cursor_shape_device_v1
request set_shape(
serial: uint,
shape: uint<shape>,
)- serial — serial number of the enter event
set device cursor to the shape
Sets the device cursor to the specified shape. The compositor will
change the cursor image based on the specified shape.
The cursor actually changes only if the input device focus is one of
the requesting client's surfaces. If any, the previous cursor image
(surface or shape) is replaced.
The "shape" argument must be a valid enum entry, otherwise the
invalid_shape protocol error is raised.
This is similar to the wl_pointer.set_cursor and
zwp_tablet_tool_v2.set_cursor requests, but this request accepts a
shape instead of contents in the form of a surface. Clients can mix
set_cursor and set_shape requests.
The serial parameter must match the latest wl_pointer.enter or
zwp_tablet_tool_v2.proximity_in serial number sent to the client.
Otherwise the request will be ignored.
Copyright
Copyright © 2018 NXP
Copyright © 2019 Status Research Development GmbH.
Copyright © 2021 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
- create_lease_request — create a lease request object
- release — release this object
- drm_fd — open a non-master fd for this DRM node
- connector — advertise connectors available for leases
- done — signals grouping of connectors
- released — the compositor has finished using the device
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mutter 51
niri 26.04
niri 26.04
sway 1.11
wayfire 0.9.0
lease device
This protocol is used by Wayland compositors which act as Direct
Rendering Manager (DRM) masters to lease DRM resources to Wayland
clients.
The compositor will advertise one wp_drm_lease_device_v1 global for each
DRM node. Some time after a client binds to the wp_drm_lease_device_v1
global, the compositor will send a drm_fd event followed by zero, one or
more connector events. After all currently available connectors have been
sent, the compositor will send a wp_drm_lease_device_v1.done event.
When the list of connectors available for lease changes the compositor
will send wp_drm_lease_device_v1.connector events for added connectors and
wp_drm_lease_connector_v1.withdrawn events for removed connectors,
followed by a wp_drm_lease_device_v1.done event.
The compositor will indicate when a device is gone by removing the global
via a wl_registry.global_remove event. Upon receiving this event, the
client should destroy any matching wp_drm_lease_device_v1 object.
To destroy a wp_drm_lease_device_v1 object, the client must first issue
a release request. Upon receiving this request, the compositor will
immediately send a released event and destroy the object. The client must
continue to process and discard drm_fd and connector events until it
receives the released event. Upon receiving the released event, the
client can safely cleanup any client-side resources.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
wp_drm_lease_device_v1
request release()
release this object
Indicates the client no longer wishes to use this object. In response
the compositor will immediately send the released event and destroy
this object. It can however not guarantee that the client won't receive
connector events before the released event. The client must not send any
requests after this one, doing so will raise a wl_display error.
Existing connectors, lease request and leases will not be affected.
wp_drm_lease_device_v1
event drm_fd(
fd: fd,
)open a non-master fd for this DRM node
The compositor will send this event when the wp_drm_lease_device_v1
global is bound, although there are no guarantees as to how long this
takes - the compositor might need to wait until regaining DRM master.
The included fd is a non-master DRM file descriptor opened for this
device and the compositor must not authenticate it.
The purpose of this event is to give the client the ability to
query DRM and discover information which may help them pick the
appropriate DRM device or select the appropriate connectors therein.
wp_drm_lease_device_v1
event connector(
id: new_id<wp_drm_lease_connector_v1>,
)advertise connectors available for leases
The compositor will use this event to advertise connectors available for
lease by clients. This object may be passed into a lease request to
indicate the client would like to lease that connector, see
wp_drm_lease_request_v1.request_connector for details. While the
compositor will make a best effort to not send disconnected connectors,
no guarantees can be made.
The compositor must send the drm_fd event before sending connectors.
After the drm_fd event it will send all available connectors but may
send additional connectors at any time.
wp_drm_lease_device_v1
event done()
signals grouping of connectors
The compositor will send this event to indicate that it has sent all
currently available connectors after the client binds to the global or
when it updates the connector list, for example on hotplug, drm master
change or when a leased connector becomes available again. It will
similarly send this event to group wp_drm_lease_connector_v1.withdrawn
events of connectors of this device.
wp_drm_lease_device_v1
event released()
Destructor
the compositor has finished using the device
This event is sent in response to the release request and indicates
that the compositor is done sending connector events.
The compositor will destroy this object immediately after sending the
event and it will become invalid. The client should release any
resources associated with this device after receiving this event.
Version 1
wp_drm_lease_connector_v1
event name(
name: string,
)name
The compositor sends this event once the connector is created to
indicate the name of this connector. This will not change for the
duration of the Wayland session, but is not guaranteed to be consistent
between sessions.
If the compositor supports wl_output version 4 and this connector
corresponds to a wl_output, the compositor should use the same name as
for the wl_output.
wp_drm_lease_connector_v1
event description(
description: string,
)- description — connector description
description
The compositor sends this event once the connector is created to provide
a human-readable description for this connector, which may be presented
to the user. The compositor may send this event multiple times over the
lifetime of this object to reflect changes in the description.
wp_drm_lease_connector_v1
event connector_id(
connector_id: uint,
)- connector_id — DRM connector ID
connector_id
The compositor sends this event once the connector is created to
indicate the DRM object ID which represents the underlying connector
that is being offered. Note that the final lease may include additional
object IDs, such as CRTCs and planes.
wp_drm_lease_connector_v1
event done()
all properties have been sent
This event is sent after all properties of a connector have been sent.
This allows changes to the properties to be seen as atomic even if they
happen via multiple events.
wp_drm_lease_connector_v1
event withdrawn()
lease offer withdrawn
Sent to indicate that the compositor will no longer honor requests for
DRM leases which include this connector. The client may still issue a
lease request including this connector, but the compositor will send
wp_drm_lease_v1.finished without issuing a lease fd. Compositors are
encouraged to send this event when they lose access to connector, for
example when the connector is hot-unplugged, when the connector gets
leased to a client or when the compositor loses DRM master.
If a client holds a lease for the connector, the status of the lease
remains the same. The client should destroy the object after receiving
this event.
wp_drm_lease_connector_v1
request destroy()
Destructor
destroy connector
The client may send this request to indicate that it will not use this
connector. Clients are encouraged to send this after receiving the
"withdrawn" event so that the server can release the resources
associated with this connector offer. Neither existing lease requests
nor leases will be affected.
Version 1
wp_drm_lease_request_v1
enum error {
wrong_device = 0,
duplicate_connector = 1,
empty_lease = 2,
}- wrong_device — requested a connector from a different lease device
- duplicate_connector — requested a connector twice
- empty_lease — requested a lease without requesting a connector
wp_drm_lease_request_v1
request request_connector(
connector: object<wp_drm_lease_connector_v1>,
)request a connector for this lease
Indicates that the client would like to lease the given connector.
This is only used as a suggestion, the compositor may choose to
include any resources in the lease it issues, or change the set of
leased resources at any time. Compositors are however encouraged to
include the requested connector and other resources necessary
to drive the connected output in the lease.
Requesting a connector that was created from a different lease device
than this lease request raises the wrong_device error. Requesting a
connector twice will raise the duplicate_connector error.
wp_drm_lease_request_v1
request submit(
id: new_id<wp_drm_lease_v1>,
)Destructor
submit the lease request
Submits the lease request and creates a new wp_drm_lease_v1 object.
After calling submit the compositor will immediately destroy this
object, issuing any more requests will cause a wl_display error.
The compositor doesn't make any guarantees about the events of the
lease object, clients cannot expect an immediate response.
Not requesting any connectors before submitting the lease request
will raise the empty_lease error.
Version 1
- lease_fd — shares the DRM file descriptor
- finished — sent when the lease has been revoked
- destroy — destroys the lease object
a DRM lease
A DRM lease object is used to transfer the DRM file descriptor to the
client and manage the lifetime of the lease.
Some time after the wp_drm_lease_v1 object is created, the compositor
will reply with the lease request's result. If the lease request is
granted, the compositor will send a lease_fd event. If the lease request
is denied, the compositor will send a finished event without a lease_fd
event.
wp_drm_lease_v1
event lease_fd(
leased_fd: fd,
)- leased_fd — leased DRM file descriptor
shares the DRM file descriptor
This event returns a file descriptor suitable for use with DRM-related
ioctls. The client should use drmModeGetLease to enumerate the DRM
objects which have been leased to them. The compositor guarantees it
will not use the leased DRM objects itself until it sends the finished
event. If the compositor cannot or will not grant a lease for the
requested connectors, it will not send this event, instead sending the
finished event.
The compositor will send this event at most once during this objects
lifetime.
wp_drm_lease_v1
event finished()
sent when the lease has been revoked
The compositor uses this event to either reject a lease request, or if
it previously sent a lease_fd, to notify the client that the lease has
been revoked. If the client requires a new lease, they should destroy
this object and submit a new lease request. The compositor will send
no further events for this object after sending the finish event.
Compositors should revoke the lease when any of the leased resources
become unavailable, namely when a hot-unplug occurs or when the
compositor loses DRM master. Compositors may advertise the connector
for leasing again, if the resource is available, by sending the
connector event through the wp_drm_lease_device_v1 interface.
wp_drm_lease_v1
request destroy()
Destructor
destroys the lease object
The client should send this to indicate that it no longer wishes to use
this lease. The compositor should use drmModeRevokeLease on the
appropriate file descriptor, if necessary.
Upon destruction, the compositor should advertise the connector for
leasing again by sending the connector event through the
wp_drm_lease_device_v1 interface.
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.
Version 1
Compositor Support
Version 1kwin 6.7
mutter 51
niri 26.04
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.
ext_background_effect_manager_v1
request destroy()
Destructor
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.
Version 1
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.
ext_background_effect_surface_v1
request destroy()
Destructor
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.
ext_background_effect_surface_v1
request set_blur_region(
region: nullable object<wl_region>,
)- region — blur region of the surface
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.
Copyright
Copyright © 2018 Simon Ser
Copyright © 2019 Ivan Molodetskikh
Copyright © 2024 Neal Gompa
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
control data devices
This protocol allows a privileged client to control data devices. In
particular, the client will be able to manage the current selection and take
the role of a clipboard manager.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
mir 2.26
niri 26.04
phoc 0.55
sway 1.11
treeland 0.8.0
manager to control data devices
This interface is a manager that allows creating per-seat data device
controls.
ext_data_control_manager_v1
request destroy()
Destructor
destroy the manager
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
Version 1
manage a data device for a seat
This interface allows a client to manage a seat's selection.
When the seat is destroyed, this object becomes inert.
ext_data_control_device_v1
request set_selection(
source: nullable object<ext_data_control_source_v1>,
)copy data to the selection
This request asks the compositor to set the selection to the data from
the source on behalf of the client.
The given source may not be used in any further set_selection or
set_primary_selection requests. Attempting to use a previously used
source triggers the used_source protocol error.
To unset the selection, set the source to NULL.
ext_data_control_device_v1
event data_offer(
id: new_id<ext_data_control_offer_v1>,
)introduce a new ext_data_control_offer
The data_offer event introduces a new ext_data_control_offer object,
which will subsequently be used in either the
ext_data_control_device.selection event (for the regular clipboard
selections) or the ext_data_control_device.primary_selection event (for
the primary clipboard selections). Immediately following the
ext_data_control_device.data_offer event, the new data_offer object
will send out ext_data_control_offer.offer events to describe the MIME
types it offers.
ext_data_control_device_v1
event selection(
id: nullable object<ext_data_control_offer_v1>,
)advertise new selection
The selection event is sent out to notify the client of a new
ext_data_control_offer for the selection for this device. The
ext_data_control_device.data_offer and the ext_data_control_offer.offer
events are sent out immediately before this event to introduce the data
offer object. The selection event is sent to a client when a new
selection is set. The ext_data_control_offer is valid until a new
ext_data_control_offer or NULL is received. The client must destroy the
previous selection ext_data_control_offer, if any, upon receiving this
event. Regardless, the previous selection will be ignored once a new
selection ext_data_control_offer is received.
The first selection event is sent upon binding the
ext_data_control_device object.
ext_data_control_device_v1
event primary_selection(
id: nullable object<ext_data_control_offer_v1>,
)advertise new primary selection
The primary_selection event is sent out to notify the client of a new
ext_data_control_offer for the primary selection for this device. The
ext_data_control_device.data_offer and the ext_data_control_offer.offer
events are sent out immediately before this event to introduce the data
offer object. The primary_selection event is sent to a client when a
new primary selection is set. The ext_data_control_offer is valid until
a new ext_data_control_offer or NULL is received. The client must
destroy the previous primary selection ext_data_control_offer, if any,
upon receiving this event. Regardless, the previous primary selection
will be ignored once a new primary selection ext_data_control_offer is
received.
If the compositor supports primary selection, the first
primary_selection event is sent upon binding the
ext_data_control_device object.
ext_data_control_device_v1
request set_primary_selection(
source: nullable object<ext_data_control_source_v1>,
)copy data to the primary selection
This request asks the compositor to set the primary selection to the
data from the source on behalf of the client.
The given source may not be used in any further set_selection or
set_primary_selection requests. Attempting to use a previously used
source triggers the used_source protocol error.
To unset the primary selection, set the source to NULL.
The compositor will ignore this request if it does not support primary
selection.
Version 1
offer to transfer data
The ext_data_control_source object is the source side of a
ext_data_control_offer. It is created by the source client in a data
transfer and provides a way to describe the offered data and a way to
respond to requests to transfer the data.
ext_data_control_source_v1
request offer(
mime_type: string,
)- mime_type — MIME type offered by the data source
add an offered MIME type
This request adds a MIME type to the set of MIME types advertised to
targets. Can be called several times to offer multiple types.
Calling this after ext_data_control_device.set_selection is a protocol
error.
ext_data_control_source_v1
event send(
mime_type: string,
fd: fd,
)- mime_type — MIME type for the data
- fd — file descriptor for the data
send the data
Request for data from the client. Send the data as the specified MIME
type over the passed file descriptor, then close it.
ext_data_control_source_v1
event cancelled()
selection was cancelled
This data source is no longer valid. The data source has been replaced
by another data source.
The client should clean up and destroy this data source.
Version 1
- receive — request that the data is transferred
- destroy — destroy this offer
- offer — advertise offered MIME type
offer to transfer data
A ext_data_control_offer represents a piece of data offered for transfer
by another client (the source client). The offer describes the different
MIME types that the data can be converted to and provides the mechanism
for transferring the data directly from the source client.
ext_data_control_offer_v1
request receive(
mime_type: string,
fd: fd,
)- mime_type — MIME type desired by receiver
- fd — file descriptor for data transfer
request that the data is transferred
To transfer the offered data, the client issues this request and
indicates the MIME type it wants to receive. The transfer happens
through the passed file descriptor (typically created with the pipe
system call). The source client writes the data in the MIME type
representation requested and then closes the file descriptor.
The receiving client reads from the read end of the pipe until EOF and
then closes its end, at which point the transfer is complete.
This request may happen multiple times for different MIME types.
ext_data_control_offer_v1
event offer(
mime_type: string,
)- mime_type — offered MIME type
advertise offered MIME type
Sent immediately after creating the ext_data_control_offer object.
One event per offered MIME type.
Copyright
Copyright © 2018 Ilia Bozhinov
Copyright © 2020 Isaac Freund
Copyright © 2022 wb9688
Copyright © 2023 i509VCB
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
list toplevels
The purpose of this protocol is to provide protocol object handles for
toplevels, possibly originating from another client.
This protocol is intentionally minimalistic and expects additional
functionality (e.g. creating a screencopy source from a toplevel handle,
getting information about the state of the toplevel) to be implemented
in extension protocols.
The compositor may choose to restrict this protocol to a special client
launched by the compositor itself or expose it to all clients,
this is compositor policy.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
- toplevel — a toplevel has been created
- finished — the compositor has finished with the toplevel manager
- stop — stop sending events
- destroy — destroy the ext_foreign_toplevel_list_v1 object
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
mir 2.26
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
ext_foreign_toplevel_list_v1
request stop()
stop sending events
This request indicates that the client no longer wishes to receive
events for new toplevels.
The Wayland protocol is asynchronous, meaning the compositor may send
further toplevel events until the stop request is processed.
The client should wait for a ext_foreign_toplevel_list_v1.finished
event before destroying this object.
Version 1
- destroy — destroy the ext_foreign_toplevel_handle_v1 object
- closed — the toplevel has been closed
- done — all information about the toplevel has been sent
- title — title change
- app_id — app_id change
- identifier — a stable identifier for a toplevel
ext_foreign_toplevel_handle_v1
request destroy()
Destructor
destroy the ext_foreign_toplevel_handle_v1 object
This request should be used when the client will no longer use the handle
or after the closed event has been received to allow destruction of the
object.
When a handle is destroyed, a new handle may not be created by the server
until the toplevel is unmapped and then remapped. Destroying a toplevel handle
is not recommended unless the client is cleaning up child objects
before destroying the ext_foreign_toplevel_list_v1 object, the toplevel
was closed or the toplevel handle will not be used in the future.
Other protocols which extend the ext_foreign_toplevel_handle_v1
interface should require destructors for extension interfaces be
called before allowing the toplevel handle to be destroyed.
ext_foreign_toplevel_handle_v1
event identifier(
identifier: string,
)a stable identifier for a toplevel
This identifier is used to check if two or more toplevel handles belong
to the same toplevel.
The identifier is useful for command line tools or privileged clients
which may need to reference an exact toplevel across processes or
instances of the ext_foreign_toplevel_list_v1 global.
The compositor must only send this event when the handle is created.
The identifier must be unique per toplevel and its handles. Two different
toplevels must not have the same identifier. The identifier is only valid
as long as the toplevel is mapped. If the toplevel is unmapped the identifier
must not be reused. An identifier must not be reused by the compositor to
ensure there are no races when sharing identifiers between processes.
An identifier is a string that contains up to 32 printable ASCII bytes.
An identifier must not be an empty string. It is recommended that a
compositor includes an opaque generation value in identifiers. How the
generation value is used when generating the identifier is implementation
dependent.
Copyright
Copyright © 2015 Martin Gräßlin
Copyright © 2022 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
Compositor Support
Version 2cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
Version 1louvre 2.14.1
wayfire 0.9.0
idle notification manager
This interface allows clients to monitor user idle status.
After binding to this global, clients can create ext_idle_notification_v1
objects to get notified when the user is idle for a given amount of time.
ext_idle_notifier_v1
request destroy()
Destructor
destroy the manager
Destroy the manager object. All objects created via this interface
remain valid.
ext_idle_notifier_v1
request get_idle_notification(
id: new_id<ext_idle_notification_v1>,
timeout: uint,
seat: object<wl_seat>,
)- timeout — minimum idle timeout in msec
create a notification object
Create a new idle notification object.
The notification object has a minimum timeout duration and is tied to a
seat. The client will be notified if the seat is inactive for at least
the provided timeout. See ext_idle_notification_v1 for more details.
A zero timeout is valid and means the client wants to be notified as
soon as possible when the seat is inactive.
ext_idle_notifier_v1
request get_input_idle_notification(
id: new_id<ext_idle_notification_v1>,
timeout: uint,
seat: object<wl_seat>,
)Available since version 2
- timeout — minimum idle timeout in msec
create a notification object
Create a new idle notification object to track input from the
user, such as keyboard and mouse movement. Because this object is
meant to track user input alone, it ignores idle inhibitors.
The notification object has a minimum timeout duration and is tied to a
seat. The client will be notified if the seat is inactive for at least
the provided timeout. See ext_idle_notification_v1 for more details.
A zero timeout is valid and means the client wants to be notified as
soon as possible when the seat is inactive.
Version 2
- destroy — destroy the notification object
- idled — notification object is idle
- resumed — notification object is no longer idle
idle notification
This interface is used by the compositor to send idle notification events
to clients.
Initially the notification object is not idle. The notification object
becomes idle when no user activity has happened for at least the timeout
duration, starting from the creation of the notification object. User
activity may include input events or a presence sensor, but is
compositor-specific.
How this notification responds to idle inhibitors depends on how
it was constructed. If constructed from the
get_idle_notification request, then if an idle inhibitor is
active (e.g. another client has created a zwp_idle_inhibitor_v1
on a visible surface), the compositor must not make the
notification object idle. However, if constructed from the
get_input_idle_notification request, then idle inhibitors are
ignored, and only input from the user, e.g. from a keyboard or
mouse, counts as activity.
When the notification object becomes idle, an idled event is sent. When
user activity starts again, the notification object stops being idle,
a resumed event is sent and the timeout is restarted.
ext_idle_notification_v1
event idled()
notification object is idle
This event is sent when the notification object becomes idle.
It's a compositor protocol error to send this event twice without a
resumed event in-between.
ext_idle_notification_v1
event resumed()
notification object is no longer idle
This event is sent when the notification object stops being idle.
It's a compositor protocol error to send this event twice without an
idled event in-between. It's a compositor protocol error to send this
event prior to any idled event.
Copyright
Copyright © 2022 Andri Yngvason
Copyright © 2024 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
opaque image capture source objects
This protocol serves as an intermediary between capturing protocols and
potential image capture sources such as outputs and toplevels.
This protocol may be extended to support more image capture sources in the
future, thereby adding those image capture sources to other protocols that
use the image capture source object without having to modify those
protocols.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
This interface is frozen
opaque image capture source object
The image capture source object is an opaque descriptor for a capturable
resource. This resource may be any sort of entity from which an image
may be derived.
Note, because ext_image_capture_source_v1 objects are created from multiple
independent factory interfaces, the ext_image_capture_source_v1 interface is
frozen at version 1.
Version 1
Compositor Support
Version 1cosmic 1.0.0
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
mir 2.26
phoc 0.55
sway 1.11
treeland 0.8.0
image capture source manager for outputs
A manager for creating image capture source objects for wl_output objects.
Version 1
Compositor Support
Version 1cosmic 1.0.0
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
treeland 0.8.0
Copyright
Copyright © 2021-2023 Andri Yngvason
Copyright © 2024 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
image capturing into client buffers
This protocol allows clients to ask the compositor to capture image sources
such as outputs and toplevels into user submitted buffers.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
Compositor Support
Version 1cosmic 1.0.0
jay 1.14.0
labwc 0.20.2
mir 2.26
phoc 0.55
sway 1.11
treeland 0.8.0
manager to inform clients and begin capturing
This object is a manager which offers requests to start capturing from a
source.
Version 1
image copy capture session
This object represents an active image copy capture session.
After a capture session is created, buffer constraint events will be
emitted from the compositor to tell the client which buffer types and
formats are supported for reading from the session. The compositor may
re-send buffer constraint events whenever they change.
To advertise buffer constraints, the compositor must send in no
particular order: zero or more shm_format and dmabuf_format events, zero
or one dmabuf_device event, and exactly one buffer_size event. Then the
compositor must send a done event.
When the client has received all the buffer constraints, it can create a
buffer accordingly, attach it to the capture session using the
attach_buffer request, set the buffer damage using the damage_buffer
request and then send the capture request.
ext_image_copy_capture_session_v1
event buffer_size(
width: uint,
height: uint,
)- width — buffer width
- height — buffer height
image capture source dimensions
Provides the dimensions of the source image in buffer pixel coordinates.
The client must attach buffers that match this size.
ext_image_copy_capture_session_v1
event dmabuf_device(
device: array,
)- device — device dev_t value
dma-buf device
This event advertises the device buffers must be allocated on for
dma-buf buffers.
In general the device is a DRM node. The DRM node type (primary vs.
render) is unspecified. Clients must not rely on the compositor sending
a particular node type. Clients cannot check two devices for equality
by comparing the dev_t value.
ext_image_copy_capture_session_v1
event dmabuf_format(
format: uint,
modifiers: array,
)- format — drm format code
- modifiers — drm format modifiers
dma-buf format
Provides the format that must be used for dma-buf buffers.
The client may choose any of the modifiers advertised in the array of
64-bit unsigned integers.
This event may be emitted multiple times, in which case the client may
choose any given format.
ext_image_copy_capture_session_v1
event done()
all constraints have been sent
This event is sent once when all buffer constraint events have been
sent.
The compositor must always end a batch of buffer constraint events with
this event, regardless of whether it sends the initial constraints or
an update.
ext_image_copy_capture_session_v1
event stopped()
session is no longer available
This event indicates that the capture session has stopped and is no
longer available. This can happen in a number of cases, e.g. when the
underlying source is destroyed, if the user decides to end the image
capture, or if an unrecoverable runtime error has occurred.
The client should destroy the session after receiving this event.
Version 1
image capture frame
This object represents an image capture frame.
The client should attach a buffer, damage the buffer, and then send a
capture request.
If the capture is successful, the compositor must send the frame metadata
(transform, damage, presentation_time in any order) followed by the ready
event.
If the capture fails, the compositor must send the failed event.
ext_image_copy_capture_frame_v1
enum error {
no_buffer = 1,
invalid_buffer_damage = 2,
already_captured = 3,
}- no_buffer — capture sent without attach_buffer
- invalid_buffer_damage — invalid buffer damage
- already_captured — capture request has been sent
ext_image_copy_capture_frame_v1
request damage_buffer(
x: int,
y: int,
width: int,
height: int,
)- x — region x coordinate
- y — region y coordinate
- width — region width
- height — region height
damage buffer
Apply damage to the buffer which is to be captured next. This request
may be sent multiple times to describe a region.
The client indicates the accumulated damage since this wl_buffer was
last captured. During capture, the compositor will update the buffer
with at least the union of the region passed by the client and the
region advertised by ext_image_copy_capture_frame_v1.damage.
When a wl_buffer is captured for the first time, or when the client
doesn't track damage, the client must damage the whole buffer.
This is for optimisation purposes. The compositor may use this
information to reduce copying.
These coordinates originate from the upper left corner of the buffer.
If x or y are strictly negative, or if width or height are negative or
zero, the invalid_buffer_damage protocol error is raised.
This request must not be sent after capture, or else the
already_captured protocol error is raised.
ext_image_copy_capture_frame_v1
request capture()
capture a frame
Capture a frame.
Unless this is the first successful captured frame performed in this
session, the compositor may wait an indefinite amount of time for the
source content to change before performing the copy.
This request may only be sent once, or else the already_captured
protocol error is raised. A buffer must be attached before this request
is sent, or else the no_buffer protocol error is raised.
ext_image_copy_capture_frame_v1
event damage(
x: int,
y: int,
width: int,
height: int,
)- x — damage x coordinate
- y — damage y coordinate
- width — damage width
- height — damage height
buffer damaged region
This event is sent before the ready event. It may be generated multiple
times to describe a region.
The first captured frame in a session will always carry full damage.
Subsequent frames' damaged regions describe which parts of the buffer
have changed since the last ready event.
These coordinates originate in the upper left corner of the buffer.
ext_image_copy_capture_frame_v1
event presentation_time(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the seconds part of the timestamp
- tv_sec_lo — low 32 bits of the seconds part of the timestamp
- tv_nsec — nanoseconds part of the timestamp
presentation time of the frame
This event indicates the time at which the frame is presented to the
output in system monotonic time. This event is sent before the ready
event.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
each component being an unsigned 32-bit value. Whole seconds are in
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
and the additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999].
ext_image_copy_capture_frame_v1
event ready()
frame is available for reading
Called as soon as the frame is copied, indicating it is available
for reading.
The buffer may be re-used by the client after this event.
After receiving this event, the client must destroy the object.
ext_image_copy_capture_frame_v1
enum failure_reason {
unknown = 0,
buffer_constraints = 1,
stopped = 2,
}- unknown
unknown runtime error
An unspecified runtime error has occurred. The client may retry.
- buffer_constraints
buffer constraints mismatch
The buffer submitted by the client doesn't match the latest session
constraints. The client should re-allocate its buffers and retry.
- stopped
Version 1
cursor capture session
This object represents a cursor capture session. It extends the base
capture session with cursor-specific metadata.
ext_image_copy_capture_cursor_session_v1
event enter()
cursor entered captured area
Sent when a cursor enters the captured area. It shall be generated
before the "position" and "hotspot" events when and only when a cursor
enters the area.
The cursor enters the captured area when the cursor image intersects
with the captured area. Note, this is different from e.g.
wl_pointer.enter.
ext_image_copy_capture_cursor_session_v1
event leave()
cursor left captured area
Sent when a cursor leaves the captured area. No "position" or "hotspot"
event is generated for the cursor until the cursor enters the captured
area again.
ext_image_copy_capture_cursor_session_v1
event position(
x: int,
y: int,
)- x — position x coordinates
- y — position y coordinates
position changed
Cursors outside the image capture source do not get captured and no
event will be generated for them.
The given position is the position of the cursor's hotspot and it is
relative to the main buffer's top left corner in transformed buffer
pixel coordinates. The coordinates may be negative or greater than the
main buffer size.
ext_image_copy_capture_cursor_session_v1
event hotspot(
x: int,
y: int,
)- x — hotspot x coordinates
- y — hotspot y coordinates
hotspot changed
The hotspot describes the offset between the cursor image and the
position of the input device.
The given coordinates are the hotspot's offset from the origin in
buffer coordinates.
Clients should not apply the hotspot immediately: the hotspot becomes
effective when the next ext_image_copy_capture_frame_v1.ready event is received.
Compositors may delay this event until the client captures a new frame.
Copyright
Copyright 2021 Isaac Freund
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
secure session locking with arbitrary graphics
This protocol allows for a privileged Wayland client to lock the session
and display arbitrary graphics while the session is locked.
The compositor may choose to restrict this protocol to a special client
launched by the compositor itself or expose it to all privileged clients,
this is compositor policy.
The client is responsible for performing authentication and informing the
compositor when the session should be unlocked. If the client dies while
the session is locked the session remains locked, possibly permanently
depending on compositor policy.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Warning! The protocol described in this file is currently in the
testing phase. Backward compatible changes may be added together with
the corresponding interface version bump. Backward incompatible changes
can only be done by creating a new major version of the extension.
Version 1
- destroy — destroy the session lock manager object
- lock — attempt to lock the session
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
mir 2.26
niri 26.04
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
used to lock the session
This interface is used to request that the session be locked.
ext_session_lock_manager_v1
request destroy()
Destructor
destroy the session lock manager object
This informs the compositor that the session lock manager object will
no longer be used. Existing objects created through this interface
remain valid.
Version 1
manage lock state and create lock surfaces
In response to the creation of this object the compositor must send
either the locked or finished event.
The locked event indicates that the session is locked. This means
that the compositor must stop rendering and providing input to normal
clients. Instead the compositor must blank all outputs with an opaque
color such that their normal content is fully hidden.
The only surfaces that should be rendered while the session is locked
are the lock surfaces created through this interface and optionally,
at the compositor's discretion, special privileged surfaces such as
input methods or portions of desktop shell UIs.
The locked event must not be sent until a new "locked" frame (either
from a session lock surface or the compositor blanking the output) has
been presented on all outputs and no security sensitive normal/unlocked
content is possibly visible.
The finished event should be sent immediately on creation of this
object if the compositor decides that the locked event will not be sent.
The compositor may wait for the client to create and render session lock
surfaces before sending the locked event to avoid displaying intermediate
blank frames. However, it must impose a reasonable time limit if
waiting and send the locked event as soon as the hard requirements
described above can be met if the time limit expires. Clients should
immediately create lock surfaces for all outputs on creation of this
object to make this possible.
This behavior of the locked event is required in order to prevent
possible race conditions with clients that wish to suspend the system
or similar after locking the session. Without these semantics, clients
triggering a suspend after receiving the locked event would race with
the first "locked" frame being presented and normal/unlocked frames
might be briefly visible as the system is resumed if the suspend
operation wins the race.
If the client dies while the session is locked, the compositor must not
unlock the session in response. It is acceptable for the session to be
permanently locked if this happens. The compositor may choose to continue
to display the lock surfaces the client had mapped before it died or
alternatively fall back to a solid color, this is compositor policy.
Compositors may also allow a secure way to recover the session, the
details of this are compositor policy. Compositors may allow a new
client to create a ext_session_lock_v1 object and take responsibility
for unlocking the session, they may even start a new lock client
instance automatically.
ext_session_lock_v1
enum error {
invalid_destroy = 0,
invalid_unlock = 1,
role = 2,
duplicate_output = 3,
already_constructed = 4,
}- invalid_destroy — attempted to destroy session lock while locked
- invalid_unlock — unlock requested but locked event was never sent
- role — given wl_surface already has a role
- duplicate_output — given output already has a lock surface
- already_constructed — given wl_surface has a buffer attached or committed
ext_session_lock_v1
request destroy()
Destructor
destroy the session lock
This informs the compositor that the lock object will no longer be
used. Existing objects created through this interface remain valid.
After this request is made, lock surfaces created through this object
should be destroyed by the client as they will no longer be used by
the compositor.
It is a protocol error to make this request if the locked event was
sent, the unlock_and_destroy request must be used instead.
ext_session_lock_v1
event locked()
session successfully locked
This client is now responsible for displaying graphics while the
session is locked and deciding when to unlock the session.
The locked event must not be sent until a new "locked" frame has been
presented on all outputs and no security sensitive normal/unlocked
content is possibly visible.
If this event is sent, making the destroy request is a protocol error,
the lock object must be destroyed using the unlock_and_destroy request.
ext_session_lock_v1
event finished()
the session lock object should be destroyed
The compositor has decided that the session lock should be destroyed
as it will no longer be used by the compositor. Exactly when this
event is sent is compositor policy, but it must never be sent more
than once for a given session lock object.
This might be sent because there is already another ext_session_lock_v1
object held by a client, or the compositor has decided to deny the
request to lock the session for some other reason. This might also
be sent because the compositor implements some alternative, secure
way to authenticate and unlock the session.
The finished event should be sent immediately on creation of this
object if the compositor decides that the locked event will not
be sent.
If the locked event is sent on creation of this object the finished
event may still be sent at some later time in this object's
lifetime. This is compositor policy.
Upon receiving this event, the client should make either the destroy
request or the unlock_and_destroy request, depending on whether or
not the locked event was received on this object.
ext_session_lock_v1
request get_lock_surface(
id: new_id<ext_session_lock_surface_v1>,
surface: object<wl_surface>,
output: object<wl_output>,
)create a lock surface for a given output
The client is expected to create lock surfaces for all outputs
currently present and any new outputs as they are advertised. These
won't be displayed by the compositor unless the lock is successful
and the locked event is sent.
Providing a wl_surface which already has a role or already has a buffer
attached or committed is a protocol error, as is attaching/committing
a buffer before the first ext_session_lock_surface_v1.configure event.
Attempting to create more than one lock surface for a given output
is a duplicate_output protocol error.
ext_session_lock_v1
request unlock_and_destroy()
Destructor
unlock the session, destroying the object
This request indicates that the session should be unlocked, for
example because the user has entered their password and it has been
verified by the client.
This request also informs the compositor that the lock object will
no longer be used and should be destroyed. Existing objects created
through this interface remain valid.
After this request is made, lock surfaces created through this object
should be destroyed by the client as they will no longer be used by
the compositor.
It is a protocol error to make this request if the locked event has
not been sent. In that case, the lock object must be destroyed using
the destroy request.
Note that a correct client that wishes to exit directly after unlocking
the session must use the wl_display.sync request to ensure the server
receives and processes the unlock_and_destroy request. Otherwise
there is no guarantee that the server has unlocked the session due
to the asynchronous nature of the Wayland protocol. For example,
the server might terminate the client with a protocol error before
it processes the unlock_and_destroy request.
Version 1
a surface displayed while the session is locked
The client may use lock surfaces to display a screensaver, render a
dialog to enter a password and unlock the session, or however else it
sees fit.
On binding this interface the compositor will immediately send the
first configure event. After making the ack_configure request in
response to this event the client should attach and commit the first
buffer. Committing the surface before acking the first configure is a
protocol error. Committing the surface with a null buffer at any time
is a protocol error.
The compositor is free to handle keyboard/pointer focus for lock
surfaces however it chooses. A reasonable way to do this would be to
give the first lock surface created keyboard focus and change keyboard
focus if the user clicks on other surfaces.
ext_session_lock_surface_v1
enum error {
commit_before_first_ack = 0,
null_buffer = 1,
dimensions_mismatch = 2,
invalid_serial = 3,
}- commit_before_first_ack — surface committed before first ack_configure request
- null_buffer — surface committed with a null buffer
- dimensions_mismatch — failed to match ack'd width/height
- invalid_serial — serial provided in ack_configure is invalid
ext_session_lock_surface_v1
request destroy()
Destructor
destroy the lock surface object
This informs the compositor that the lock surface object will no
longer be used.
It is recommended for a lock client to destroy lock surfaces if
their corresponding wl_output global is removed.
If a lock surface on an active output is destroyed before the
ext_session_lock_v1.unlock_and_destroy event is sent, the compositor
must fall back to rendering a solid color.
ext_session_lock_surface_v1
request ack_configure(
serial: uint,
)- serial — serial from the configure event
ack a configure event
When a configure event is received, if a client commits the surface
in response to the configure event, then the client must make an
ack_configure request sometime before the commit request, passing
along the serial of the configure event.
If the client receives multiple configure events before it can
respond to one, it only has to ack the last configure event.
A client is not required to commit immediately after sending an
ack_configure request - it may even ack_configure several times
before its next surface commit.
A client may send multiple ack_configure requests before committing,
but only the last request sent before a commit indicates which
configure event the client really is responding to.
Sending an ack_configure request consumes the configure event
referenced by the given serial, as well as all older configure events
sent on this object.
It is a protocol error to issue multiple ack_configure requests
referencing the same configure event or to issue an ack_configure
request referencing a configure event older than the last configure
event acked for a given lock surface.
ext_session_lock_surface_v1
event configure(
serial: uint,
width: uint,
height: uint,
)- serial — serial for use in ack_configure
the client should resize its surface
This event is sent once on binding the interface and may be sent again
at the compositor's discretion, for example if output geometry changes.
The width and height are in surface-local coordinates and are exact
requirements. Failing to match these surface dimensions in the next
commit after acking a configure is a protocol error.
Copyright
Copyright © 2020 - 2023 Andri Yngvason
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
protocol for creating temporary seats
The transient seat protocol can be used by privileged clients to create
independent seats that will be removed from the compositor when the client
destroys its transient seat.
This protocol is intended for use with virtual input protocols such as
"virtual_keyboard_unstable_v1" or "wlr_virtual_pointer_unstable_v1", both
of which allow the user to select a seat.
The "wl_seat" global created by this protocol does not generate input events
on its own, or have any capabilities except those assigned to it by other
protocol extensions, such as the ones mentioned above.
For example, a remote desktop server can create a seat with virtual inputs
for each remote user by following these steps for each new connection:
Create a transient seat
Wait for the transient seat to be created
Locate a "wl_seat" global with a matching name
Create virtual inputs using the resulting "wl_seat" global
Version 1
Compositor Support
transient seat manager
The transient seat manager creates short-lived seats.
ext_transient_seat_manager_v1
request create(
seat: new_id<ext_transient_seat_v1>,
)create a transient seat
Create a new seat that is removed when the client side transient seat
object is destroyed.
The actual seat may be removed sooner, in which case the transient seat
object shall become inert.
ext_transient_seat_manager_v1
request destroy()
Destructor
destroy the manager
Destroy the manager.
All objects created by the manager will remain valid until they are
destroyed themselves.
Version 1
- ready — transient seat is ready
- denied — transient seat creation denied
- destroy — destroy transient seat
transient seat handle
When the transient seat handle is destroyed, the seat itself will also be
destroyed.
ext_transient_seat_v1
event ready(
global_name: uint,
)transient seat is ready
This event advertises the global name for the wl_seat to be used with
wl_registry_bind.
It is sent exactly once, immediately after the transient seat is created
and the new "wl_seat" global is advertised, if and only if the creation
of the transient seat was allowed.
ext_transient_seat_v1
event denied()
transient seat creation denied
The event informs the client that the compositor denied its request to
create a transient seat.
It is sent exactly once, immediately after the transient seat object is
created, if and only if the creation of the transient seat was denied.
After receiving this event, the client should destroy the object.
ext_transient_seat_v1
request destroy()
Destructor
destroy transient seat
When the transient seat object is destroyed by the client, the
associated seat created by the compositor is also destroyed.
Copyright
Copyright © 2019 Christopher Billington
Copyright © 2020 Ilia Bozhinov
Copyright © 2022 Victoria Brekenfeld
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
Version 1
- workspace_group — a workspace group has been created
- workspace — workspace has been created
- commit — all requests about the workspaces have been sent
- done — all information about the workspaces and workspace groups has been sent
- finished — the compositor has finished with the workspace_manager
- stop — stop sending events
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
niri 26.04
list and control workspaces
Workspaces, also called virtual desktops, are groups of surfaces. A
compositor with a concept of workspaces may only show some such groups of
surfaces (those of 'active' workspaces) at a time. 'Activating' a
workspace is a request for the compositor to display that workspace's
surfaces as normal, whereas the compositor may hide or otherwise
de-emphasise surfaces that are associated only with 'inactive' workspaces.
Workspaces are grouped by which sets of outputs they correspond to, and
may contain surfaces only from those outputs. In this way, it is possible
for each output to have its own set of workspaces, or for all outputs (or
any other arbitrary grouping) to share workspaces. Compositors may
optionally conceptually arrange each group of workspaces in an
N-dimensional grid.
The purpose of this protocol is to enable the creation of taskbars and
docks by providing them with a list of workspaces and their properties,
and allowing them to activate and deactivate workspaces.
After a client binds the ext_workspace_manager_v1, each workspace will be
sent via the workspace event.
ext_workspace_manager_v1
request commit()
all requests about the workspaces have been sent
The client must send this request after it has finished sending other
requests. The compositor must process a series of requests preceding a
commit request atomically.
This allows changes to the workspace properties to be seen as atomic,
even if they happen via multiple events, and even if they involve
multiple ext_workspace_handle_v1 objects, for example, deactivating one
workspace and activating another.
ext_workspace_manager_v1
event done()
all information about the workspaces and workspace groups has been sent
This event is sent after all changes in all workspaces and workspace groups have been
sent.
This allows changes to one or more ext_workspace_group_handle_v1
properties and ext_workspace_handle_v1 properties
to be seen as atomic, even if they happen via multiple events.
In particular, an output moving from one workspace group to
another sends an output_enter event and an output_leave event to the two
ext_workspace_group_handle_v1 objects in question. The compositor sends
the done event only after updating the output information in both
workspace groups.
ext_workspace_manager_v1
request stop()
stop sending events
Indicates the client no longer wishes to receive events for new
workspace groups. However the compositor may emit further workspace
events, until the finished event is emitted. The compositor is expected
to send the finished event eventually once the stop request has been processed.
The client must not send any requests after this one, doing so will raise a wl_display
invalid_object error.
Version 1
a workspace group assigned to a set of outputs
A ext_workspace_group_handle_v1 object represents a workspace group
that is assigned a set of outputs and contains a number of workspaces.
The set of outputs assigned to the workspace group is conveyed to the client via
output_enter and output_leave events, and its workspaces are conveyed with
workspace events.
For example, a compositor which has a set of workspaces for each output may
advertise a workspace group (and its workspaces) per output, whereas a compositor
where a workspace spans all outputs may advertise a single workspace group for all
outputs.
ext_workspace_group_handle_v1
event capabilities(
capabilities: uint<group_capabilities>,
)- capabilities — capabilities
compositor capabilities
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for creating workspaces, a button
triggering the create_workspace request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for creating workspaces will ignore
create_workspace requests.
Compositors must send this event once after creation of an
ext_workspace_group_handle_v1. When the capabilities change, compositors
must send this event again.
ext_workspace_group_handle_v1
event removed()
this workspace group has been removed
This event is send when the group associated with the ext_workspace_group_handle_v1
has been removed. After sending this request the compositor will immediately consider
the object inert. Any requests will be ignored except the destroy request.
It is guaranteed there won't be any more events referencing this
ext_workspace_group_handle_v1.
The compositor must remove all workspaces belonging to a workspace group
via a workspace_leave event before removing the workspace group.
ext_workspace_group_handle_v1
request create_workspace(
workspace: string,
)create a new workspace
Request that the compositor create a new workspace with the given name
and assign it to this group.
There is no guarantee that the compositor will create a new workspace,
or that the created workspace will have the provided name.
ext_workspace_group_handle_v1
request destroy()
Destructor
destroy the ext_workspace_group_handle_v1 object
Destroys the ext_workspace_group_handle_v1 object.
This request should be send either when the client does not want to
use the workspace group object any more or after the removed event to finalize
the destruction of the object.
Version 1
a workspace handing a group of surfaces
A ext_workspace_handle_v1 object represents a workspace that handles a
group of surfaces.
Each workspace has:
a name, conveyed to the client with the name event
potentially an id conveyed with the id event
a list of states, conveyed to the client with the state event
and optionally a set of coordinates, conveyed to the client with the
coordinates event
The client may request that the compositor activate or deactivate the workspace.
Each workspace can belong to only a single workspace group.
Depending on the compositor policy, there might be workspaces with
the same name in different workspace groups, but these workspaces are still
separate (e.g. one of them might be active while the other is not).
ext_workspace_handle_v1
event id(
id: string,
)workspace id
If this event is emitted, it will be send immediately after the
ext_workspace_handle_v1 is created or when an id is assigned to
a workspace (at most once during its lifetime).
An id will never change during the lifetime of the ext_workspace_handle_v1
and is guaranteed to be unique during its lifetime.
Ids are not human-readable and shouldn't be displayed, use name for that purpose.
Compositors are expected to only send ids for workspaces likely stable across multiple
sessions and can be used by clients to store preferences for workspaces. Workspaces without
ids should be considered temporary and any data associated with them should be deleted once
the respective object is lost.
ext_workspace_handle_v1
event name(
name: string,
)workspace name changed
This event is emitted immediately after the ext_workspace_handle_v1 is
created and whenever the name of the workspace changes.
A name is meant to be human-readable and can be displayed to a user.
Unlike the id it is neither stable nor unique.
ext_workspace_handle_v1
event coordinates(
coordinates: array,
)workspace coordinates changed
This event is used to organize workspaces into an N-dimensional grid
within a workspace group, and if supported, is emitted immediately after
the ext_workspace_handle_v1 is created and whenever the coordinates of
the workspace change. Compositors may not send this event if they do not
conceptually arrange workspaces in this way. If compositors simply
number workspaces, without any geometric interpretation, they may send
1D coordinates, which clients should not interpret as implying any
geometry. Sending an empty array means that the compositor no longer
orders the workspace geometrically.
Coordinates have an arbitrary number of dimensions N with an uint32
position along each dimension. By convention if N > 1, the first
dimension is X, the second Y, the third Z, and so on. The compositor may
chose to utilize these events for a more novel workspace layout
convention, however. No guarantee is made about the grid being filled or
bounded; there may be a workspace at coordinate 1 and another at
coordinate 1000 and none in between. Within a workspace group, however,
workspaces must have unique coordinates of equal dimensionality.
ext_workspace_handle_v1
enum state {
active = 1,
urgent = 2,
hidden = 4,
}This is a bitfield
- active — the workspace is active
- urgent — the workspace requests attention
- hidden
the workspace is not visible
The workspace is not visible in its workspace group, and clients
attempting to visualize the compositor workspace state should not
display such workspaces.
types of states on the workspace
The different states that a workspace can have.
ext_workspace_handle_v1
event state(
state: uint<state>,
)the state of the workspace changed
This event is emitted immediately after the ext_workspace_handle_v1 is
created and each time the workspace state changes, either because of a
compositor action or because of a request in this protocol.
Missing states convey the opposite meaning, e.g. an unset active bit
means the workspace is currently inactive.
ext_workspace_handle_v1
enum workspace_capabilities {
activate = 1,
deactivate = 2,
remove = 4,
assign = 8,
}This is a bitfield
- activate — activate request is available
- deactivate — deactivate request is available
- remove — remove request is available
- assign — assign request is available
ext_workspace_handle_v1
event capabilities(
capabilities: uint<workspace_capabilities>,
)- capabilities — capabilities
compositor capabilities
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for removing workspaces, a button
triggering the remove request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for remove will ignore
remove requests.
Compositors must send this event once after creation of an
ext_workspace_handle_v1 . When the capabilities change, compositors
must send this event again.
ext_workspace_handle_v1
event removed()
this workspace has been removed
This event is send when the workspace associated with the ext_workspace_handle_v1
has been removed. After sending this request, the compositor will immediately consider
the object inert. Any requests will be ignored except the destroy request.
It is guaranteed there won't be any more events referencing this
ext_workspace_handle_v1.
The compositor must only remove a workspaces not currently belonging to any
workspace_group.
ext_workspace_handle_v1
request destroy()
Destructor
destroy the ext_workspace_handle_v1 object
Destroys the ext_workspace_handle_v1 object.
This request should be made either when the client does not want to
use the workspace object any more or after the remove event to finalize
the destruction of the object.
ext_workspace_handle_v1
request activate()
activate the workspace
Request that this workspace be activated.
There is no guarantee the workspace will be actually activated, and
behaviour may be compositor-dependent. For example, activating a
workspace may or may not deactivate all other workspaces in the same
group.
ext_workspace_handle_v1
request deactivate()
deactivate the workspace
Request that this workspace be deactivated.
There is no guarantee the workspace will be actually deactivated.
ext_workspace_handle_v1
request remove()
remove the workspace
Request that this workspace be removed.
There is no guarantee the workspace will be actually removed.
Copyright
Copyright © 2023 Valve Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
- error — fatal presentation error
- destroy — unbind from the manager interface
- get_fifo — request fifo interface for surface
Compositor Support
Version 1hyprland 0.52.1
jay 1.14.0
kwin 6.7
mutter 51
weston 15.0.1
protocol for fifo constraints
When a Wayland compositor considers applying a content update,
it must ensure all the update's readiness constraints (fences, etc)
are met.
This protocol provides a way to use the completion of a display refresh
cycle as an additional readiness constraint.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
wp_fifo_manager_v1
enum error {
already_exists = 0,
}- already_exists — fifo manager already exists for surface
fatal presentation error
These fatal protocol errors may be emitted in response to
illegal requests.
wp_fifo_manager_v1
request destroy()
Destructor
unbind from the manager interface
Informs the server that the client will no longer be using
this protocol object. Existing objects created by this object
are not affected.
wp_fifo_manager_v1
request get_fifo(
id: new_id<wp_fifo_v1>,
surface: object<wl_surface>,
)request fifo interface for surface
Establish a fifo object for a surface that may be used to add
display refresh constraints to content updates.
Only one such object may exist for a surface and attempting
to create more than one will result in an already_exists
protocol error. If a surface is acted on by multiple software
components, general best practice is that only the component
performing wl_surface.attach operations should use this protocol.
Version 1
fifo interface
A fifo object for a surface that may be used to add
display refresh constraints to content updates.
wp_fifo_v1
enum error {
surface_destroyed = 0,
}- surface_destroyed — the associated surface no longer exists
fatal error
These fatal protocol errors may be emitted in response to
illegal requests.
wp_fifo_v1
request set_barrier()
sets the start point for a fifo constraint
When the content update containing the "set_barrier" is applied,
it sets a "fifo_barrier" condition on the surface associated with
the fifo object. The condition is cleared immediately after the
following latching deadline for non-tearing presentation.
The compositor may clear the condition early if it must do so to
ensure client forward progress assumptions.
To wait for this condition to clear, use the "wait_barrier" request.
"set_barrier" is double-buffered state, see wl_surface.commit.
Requesting set_barrier after the fifo object's surface is
destroyed will generate a "surface_destroyed" error.
wp_fifo_v1
request wait_barrier()
adds a fifo constraint to a content update
Indicate that this content update is not ready while a
"fifo_barrier" condition is present on the surface.
This means that when the content update containing "set_barrier"
was made active at a latching deadline, it will be active for
at least one refresh cycle. A content update which is allowed to
tear might become active after a latching deadline if no content
update became active at the deadline.
The constraint must be ignored if the surface is a subsurface in
synchronized mode. If the surface is not being updated by the
compositor (off-screen, occluded) the compositor may ignore the
constraint. Clients must use an additional mechanism such as
frame callbacks or timestamps to ensure throttling occurs under
all conditions.
"wait_barrier" is double-buffered state, see wl_surface.commit.
Requesting "wait_barrier" after the fifo object's surface is
destroyed will generate a "surface_destroyed" error.
wp_fifo_v1
request destroy()
Destructor
destroy the fifo interface
Informs the server that the client will no longer be using
this protocol object.
Surface state changes previously made by this protocol are
unaffected by this object's destruction.
Copyright
Copyright © 2022 Kenny Levinsen
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Protocol for requesting fractional surface scales
This protocol allows a compositor to suggest for surfaces to render at
fractional scales.
A client can submit scaled content by utilizing wp_viewport. This is done by
creating a wp_viewport object for the surface and setting the destination
rectangle to the surface size before the scale factor is applied.
The buffer size is calculated by multiplying the surface size by the
intended scale.
The wl_surface buffer scale should remain set to 1.
If a surface has a surface-local size of 100 px by 50 px and wishes to
submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should
be used and the wp_viewport destination rectangle should be 100 px by 50 px.
For toplevel surfaces, the size is rounded halfway away from zero. The
rounding algorithm for subsurface position and size is not defined.
Version 1
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
fractional surface scale information
A global interface for requesting surfaces to use fractional scales.
Version 1
fractional scale interface to a wl_surface
An additional interface to a wl_surface object which allows the compositor
to inform the client of the preferred scale.
wp_fractional_scale_v1
request destroy()
Destructor
remove surface scale information for surface
Destroy the fractional scale object. When this object is destroyed,
preferred_scale events will no longer be sent.
wp_fractional_scale_v1
event preferred_scale(
scale: uint,
)- scale — the new preferred scale
notify of new preferred scale
Notification of a new preferred scale for this surface that the
compositor suggests that the client should use.
The sent scale is the numerator of a fraction with a denominator of 120.
Copyright
Copyright © 2016 Yong Bakos
Copyright © 2015 Jason Ekstrand
Copyright © 2015 Jonas Ådahl
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.
Version 1
displays a single surface per output
Displays a single surface per output.
This interface provides a mechanism for a single client to display
simple full-screen surfaces. While there technically may be multiple
clients bound to this interface, only one of those clients should be
shown at a time.
To present a surface, the client uses either the present_surface or
present_surface_for_mode requests. Presenting a surface takes effect
on the next wl_surface.commit. See the individual requests for
details about scaling and mode switches.
The client can have at most one surface per output at any time.
Requesting a surface to be presented on an output that already has a
surface replaces the previously presented surface. Presenting a null
surface removes its content and effectively disables the output.
Exactly what happens when an output is "disabled" is
compositor-specific. The same surface may be presented on multiple
outputs simultaneously.
Once a surface is presented on an output, it stays on that output
until either the client removes it or the compositor destroys the
output. This way, the client can update the output's contents by
simply attaching a new buffer.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
zwp_fullscreen_shell_v1
request release()
Destructor
release the wl_fullscreen_shell interface
Release the binding from the wl_fullscreen_shell interface.
This destroys the server-side object and frees this binding. If
the client binds to wl_fullscreen_shell multiple times, it may wish
to free some of those bindings.
zwp_fullscreen_shell_v1
enum capability {
arbitrary_modes = 1,
cursor_plane = 2,
}- arbitrary_modes — compositor is capable of almost any output mode
- cursor_plane — compositor has a separate cursor plane
capabilities advertised by the compositor
Various capabilities that can be advertised by the compositor. They
are advertised one-at-a-time when the wl_fullscreen_shell interface is
bound. See the wl_fullscreen_shell.capability event for more details.
ARBITRARY_MODES:
This is a hint to the client that indicates that the compositor is
capable of setting practically any mode on its outputs. If this
capability is provided, wl_fullscreen_shell.present_surface_for_mode
will almost never fail and clients should feel free to set whatever
mode they like. If the compositor does not advertise this, it may
still support some modes that are not advertised through wl_global.mode
but it is less likely.
CURSOR_PLANE:
This is a hint to the client that indicates that the compositor can
handle a cursor surface from the client without actually compositing.
This may be because of a hardware cursor plane or some other mechanism.
If the compositor does not advertise this capability then setting
wl_pointer.cursor may degrade performance or be ignored entirely. If
CURSOR_PLANE is not advertised, it is recommended that the client draw
its own cursor and set wl_pointer.cursor(NULL).
zwp_fullscreen_shell_v1
event capability(
capability: uint<capability>,
)advertises a capability of the compositor
Advertises a single capability of the compositor.
When the wl_fullscreen_shell interface is bound, this event is emitted
once for each capability advertised. Valid capabilities are given by
the wl_fullscreen_shell.capability enum. If clients want to take
advantage of any of these capabilities, they should use a
wl_display.sync request immediately after binding to ensure that they
receive all the capability events.
zwp_fullscreen_shell_v1
enum present_method {
default = 0,
center = 1,
zoom = 2,
zoom_crop = 3,
stretch = 4,
}- default — no preference, apply default policy
- center — center the surface on the output
- zoom — scale the surface, preserving aspect ratio, to the largest size that will fit on the output
- zoom_crop — scale the surface, preserving aspect ratio, to fully fill the output cropping if needed
- stretch — scale the surface to the size of the output ignoring aspect ratio
different method to set the surface fullscreen
Hints to indicate to the compositor how to deal with a conflict
between the dimensions of the surface and the dimensions of the
output. The compositor is free to ignore this parameter.
zwp_fullscreen_shell_v1
request present_surface(
surface: nullable object<wl_surface>,
method: uint<present_method>,
output: nullable object<wl_output>,
)present surface for display
Present a surface on the given output.
If the output is null, the compositor will present the surface on
whatever display (or displays) it thinks best. In particular, this
may replace any or all surfaces currently presented so it should
not be used in combination with placing surfaces on specific
outputs.
The method parameter is a hint to the compositor for how the surface
is to be presented. In particular, it tells the compositor how to
handle a size mismatch between the presented surface and the
output. The compositor is free to ignore this parameter.
The "zoom", "zoom_crop", and "stretch" methods imply a scaling
operation on the surface. This will override any kind of output
scaling, so the buffer_scale property of the surface is effectively
ignored.
This request gives the surface the role of a fullscreen shell surface.
If the surface already has another role, it raises a role protocol
error.
zwp_fullscreen_shell_v1
request present_surface_for_mode(
surface: object<wl_surface>,
output: object<wl_output>,
framerate: int,
feedback: new_id<zwp_fullscreen_shell_mode_feedback_v1>,
)present surface for display at a particular mode
Presents a surface on the given output for a particular mode.
If the current size of the output differs from that of the surface,
the compositor will attempt to change the size of the output to
match the surface. The result of the mode-switch operation will be
returned via the provided wl_fullscreen_shell_mode_feedback object.
If the current output mode matches the one requested or if the
compositor successfully switches the mode to match the surface,
then the mode_successful event will be sent and the output will
contain the contents of the given surface. If the compositor
cannot match the output size to the surface size, the mode_failed
will be sent and the output will contain the contents of the
previously presented surface (if any). If another surface is
presented on the given output before either of these has a chance
to happen, the present_cancelled event will be sent.
Due to race conditions and other issues unknown to the client, no
mode-switch operation is guaranteed to succeed. However, if the
mode is one advertised by wl_output.mode or if the compositor
advertises the ARBITRARY_MODES capability, then the client should
expect that the mode-switch operation will usually succeed.
If the size of the presented surface changes, the resulting output
is undefined. The compositor may attempt to change the output mode
to compensate. However, there is no guarantee that a suitable mode
will be found and the client has no way to be notified of success
or failure.
The framerate parameter specifies the desired framerate for the
output in mHz. The compositor is free to ignore this parameter. A
value of 0 indicates that the client has no preference.
If the value of wl_output.scale differs from wl_surface.buffer_scale,
then the compositor may choose a mode that matches either the buffer
size or the surface size. In either case, the surface will fill the
output.
This request gives the surface the role of a fullscreen shell surface.
If the surface already has another role, it raises a role protocol
error.
zwp_fullscreen_shell_v1
enum error {
invalid_method = 0,
role = 1,
}- invalid_method — present_method is not known
- role — given wl_surface has another role
wl_fullscreen_shell error values
These errors can be emitted in response to wl_fullscreen_shell requests.
Version 1
zwp_fullscreen_shell_mode_feedback_v1
event mode_successful()
Destructor
mode switch succeeded
This event indicates that the attempted mode switch operation was
successful. A surface of the size requested in the mode switch
will fill the output without scaling.
Upon receiving this event, the client should destroy the
wl_fullscreen_shell_mode_feedback object.
zwp_fullscreen_shell_mode_feedback_v1
event mode_failed()
Destructor
mode switch failed
This event indicates that the attempted mode switch operation
failed. This may be because the requested output mode is not
possible or it may mean that the compositor does not want to allow it.
Upon receiving this event, the client should destroy the
wl_fullscreen_shell_mode_feedback object.
zwp_fullscreen_shell_mode_feedback_v1
event present_cancelled()
Destructor
mode switch cancelled
This event indicates that the attempted mode switch operation was
cancelled. Most likely this is because the client requested a
second mode switch before the first one completed.
Upon receiving this event, the client should destroy the
wl_fullscreen_shell_mode_feedback object.
Copyright
Copyright © 2015 Samsung Electronics Co., Ltd
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
control behavior when display idles
This interface permits inhibiting the idle behavior such as screen
blanking, locking, and screensaving. The client binds the idle manager
globally, then creates idle-inhibitor objects for each surface.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Version 1
- destroy — destroy the idle inhibitor object
context object for inhibiting idle behavior
An idle inhibitor prevents the output that the associated surface is
visible on from being set to a state where it is not visually usable due
to lack of user interaction (e.g. blanked, dimmed, locked, set to power
save, etc.) Any screensaver processes are also blocked from displaying.
If the surface is destroyed, unmapped, becomes occluded, loses
visibility, or otherwise becomes not visually relevant for the user, the
idle inhibitor will not be honored by the compositor; if the surface
subsequently regains visibility the inhibitor takes effect once again.
Likewise, the inhibitor isn't honored if the system was already idled at
the time the inhibitor was established, although if the system later
de-idles and re-idles the inhibitor will take effect.
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.
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.
Version 4
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.
xx_input_method_v1
enum error {
surface_has_role = 0x0,
inactive = 0x1,
}- surface_has_role — surface already has a role
- inactive — operation requires the input method to be active
xx_input_method_v1
event activate()
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.
xx_input_method_v1
event deactivate()
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.
xx_input_method_v1
event surrounding_text(
text: string,
cursor: uint,
anchor: uint,
)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.
xx_input_method_v1
event text_change_cause(
cause: uint<xx_text_input_v3.change_cause>,
)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.
xx_input_method_v1
event set_available_actions(
available_actions: array,
)Available since version 3
- available_actions — available actions
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.
xx_input_method_v1
event announce_supported_features(
features: uint<xx_text_input_v3.supported_features>,
)Available since version 3
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.
xx_input_method_v1
enum protocol_compat {
text_input_v3 = 0x0,
xx_text_input = 0x1,
}Available since version 4
- text_input_v3 — zwp-text-input-v3 semantics
- xx_text_input
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.
protocol compatibility value
Tells the input method client what kinds of events the text input client supports.
xx_input_method_v1
event announce_protocol_compat(
compat_level: uint<protocol_compat>,
)Available since version 3
set text input's compatibility level
Tells the input method client what kinds of events the text input client supports.
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.
xx_input_method_v1
event done()
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.
xx_input_method_v1
request perform_action(
action: uint<xx_text_input_v3.action>,
)Available since version 3
- action — action to perform
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.
xx_input_method_v1
request commit_string(
text: string,
)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.
xx_input_method_v1
request set_preedit_string(
text: string,
cursor_begin: int,
cursor_end: int,
)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.
xx_input_method_v1
request delete_surrounding_text(
before_length: uint,
after_length: uint,
)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.
xx_input_method_v1
request move_cursor(
cursor: int,
anchor: int,
)Available since version 3
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.
xx_input_method_v1
request commit(
serial: uint,
)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:
Replace existing preedit string with the cursor.
Delete requested surrounding text.
Insert commit string with the cursor at its end.
Move the cursor and selection.
Calculate surrounding text to send.
Insert new preedit text in cursor position.
Place cursor inside preedit text.
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.
Available since version 2
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.
xx_input_method_v1
event unavailable()
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.
Version 1
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:
client (Cl): popup = input_method.get_popup(wl_surface, positioner)
Cl: wl_surface.commit()
compositor (Co): popup.start_configure(150, 150, 10, -2, 5, 30)
Co: input_method.done()
Cl: ack_configure()
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:
compositor (Co): input_method.activate()
Co: input_method.done()
[init sequence]
Co: input_method.set_surrounding_text("new text")
Co: popup.start_configure(150, 150, -60, -2, 55, 30)
Co: input_method.done()
client (Cl): ack_configure()
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.
- invalid_serial — received acknowledgement for a serial which has already been acknowledged or has never been issued
- width — popup width
- height — popup height
- anchor_x — x position relative to anchor geometry
- anchor_y — y position relative to anchor geometry
- anchor_width — width of the anchor area
- anchor_height — height of the anchor area
- serial — serial of the configure sequence
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.
- serial — the serial from the configure sequence
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.
- token — reposition request token
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.
- token — reposition request token
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.
Destructor
remove the popup
This destroys the popup. Explicitly destroying the input_popup_surface
object will also dismiss the popup, and unmap the surface.
Version 1
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.
- invalid_input — invalid input provided
Destructor
destroy the input_popup_positioner object
Notify the compositor that the positioner will no longer be used.
- width — width of positioned rectangle
- height — height of positioned rectangle
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.
- none — no edge, specifies center
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.
- gravity — gravity direction
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.
This is a bitfield
- none
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.
- slide_x
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.
- slide_y
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.
- flip_x
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.
- flip_y
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.
- resize_x
horizontally resize the surface
Resize the surface horizontally so that it is completely
unconstrained.
- resize_y
vertically resize the surface
Resize the surface vertically so that it is completely unconstrained.
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.
- constraint_adjustment — bit mask of constraint adjustments
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.
- x — surface position x offset
- y — surface position y offset
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.
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.
Version 4
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.
Copyright
Copyright © 2012, 2013 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
input method context
Corresponds to a text input on the input method side. An input method context
is created on text input activation on the input method side. It allows
receiving information about the text input from the application via events.
Input method contexts do not keep state after deactivation and should be
destroyed after deactivation is handled.
Text is generally UTF-8 encoded, indices and lengths are in bytes.
Serials are used to synchronize the state between the text input and
an input method. New serials are sent by the text input in the
commit_state request and are used by the input method to indicate
the known text input state in events like preedit_string, commit_string,
and keysym. The text input can then ignore events from the input method
which are based on an outdated state (for example after a reset).
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
zwp_input_method_context_v1
request commit_string(
serial: uint,
text: string,
)- serial — serial of the latest known text input state
commit string
Send the commit string text for insertion to the application.
The text to commit could be either just a single character after a key
press or the result of some composing (pre-edit). It could be also an
empty text when some text should be removed (see
delete_surrounding_text) or when the input cursor should be moved (see
cursor_position).
Any previously set composing text will be removed.
zwp_input_method_context_v1
request preedit_string(
serial: uint,
text: string,
commit: string,
)- serial — serial of the latest known text input state
pre-edit string
Send the pre-edit string text to the application text input.
The commit text can be used to replace the pre-edit text on reset (for
example on unfocus).
Previously sent preedit_style and preedit_cursor requests are also
processed by the text_input.
zwp_input_method_context_v1
request preedit_styling(
index: uint,
length: uint,
style: uint,
)pre-edit styling
Set the styling information on composing text. The style is applied for
length in bytes from index relative to the beginning of
the composing text (as byte offset). Multiple styles can
be applied to a composing text.
This request should be sent before sending a preedit_string request.
zwp_input_method_context_v1
request preedit_cursor(
index: int,
)pre-edit cursor
Set the cursor position inside the composing text (as byte offset)
relative to the start of the composing text.
When index is negative no cursor should be displayed.
This request should be sent before sending a preedit_string request.
zwp_input_method_context_v1
request cursor_position(
index: int,
anchor: int,
)set cursor to a new position
Set the cursor and anchor to a new position. Index is the new cursor
position in bytes (when >= 0 this is relative to the end of the inserted text,
otherwise it is relative to the beginning of the inserted text). Anchor is
the new anchor position in bytes (when >= 0 this is relative to the end of the
inserted text, otherwise it is relative to the beginning of the inserted
text). When there should be no selected text, anchor should be the same
as index.
This request will be handled on the text_input side directly following
a commit_string request.
zwp_input_method_context_v1
request keysym(
serial: uint,
time: uint,
sym: uint,
state: uint,
modifiers: uint,
)- serial — serial of the latest known text input state
keysym
Notify when a key event was sent. Key events should not be used for
normal text input operations, which should be done with commit_string,
delete_surrounding_text, etc. The key event follows the wl_keyboard key
event convention. Sym is an XKB keysym, state is a wl_keyboard key_state.
zwp_input_method_context_v1
request grab_keyboard(
keyboard: new_id<wl_keyboard>,
)grab hardware keyboard
Allow an input method to receive hardware keyboard input and process
key events to generate text events (with pre-edit) over the wire. This
allows input methods which compose multiple key events for inputting
text like it is done for CJK languages.
zwp_input_method_context_v1
request key(
serial: uint,
time: uint,
key: uint,
state: uint,
)- serial — serial from wl_keyboard::key
- time — time from wl_keyboard::key
- key — key from wl_keyboard::key
- state — state from wl_keyboard::key
forward key event
Forward a wl_keyboard::key event to the client that was not processed
by the input method itself. Should be used when filtering key events
with grab_keyboard. The arguments should be the ones from the
wl_keyboard::key event.
For generating custom key events use the keysym request instead.
zwp_input_method_context_v1
request modifiers(
serial: uint,
mods_depressed: uint,
mods_latched: uint,
mods_locked: uint,
group: uint,
)- serial — serial from wl_keyboard::modifiers
- mods_depressed — mods_depressed from wl_keyboard::modifiers
- mods_latched — mods_latched from wl_keyboard::modifiers
- mods_locked — mods_locked from wl_keyboard::modifiers
- group — group from wl_keyboard::modifiers
forward modifiers event
Forward a wl_keyboard::modifiers event to the client that was not
processed by the input method itself. Should be used when filtering
key events with grab_keyboard. The arguments should be the ones
from the wl_keyboard::modifiers event.
zwp_input_method_context_v1
event surrounding_text(
text: string,
cursor: uint,
anchor: uint,
)surrounding text event
The plain surrounding text around the input position. Cursor is the
position in bytes within the surrounding text relative to the beginning
of the text. Anchor is the position in bytes of the selection anchor
within the surrounding text relative to the beginning of the text. If
there is no selected text then anchor is the same as cursor.
Version 1
Compositor Support
Version 1kwin 6.7
mir 2.26
weston 15.0.1
input method
An input method object is responsible for composing text in response to
input from hardware or virtual keyboards. There is one input method
object per seat. On activate there is a new input method context object
created which allows the input method to communicate with the text input.
Version 1
Compositor Support
Version 1kwin 6.7
mir 2.26
weston 15.0.1
interface for implementing keyboards
Only one client can bind this interface at a time.
Version 1
zwp_input_panel_surface_v1
request set_overlay_panel()
set the surface type as an overlay panel
Set the input_panel_surface to be an overlay panel.
This is shown near the input cursor above the application window when
a text input is active.
Copyright
Copyright © 2017 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
High-resolution timestamps for input events
This protocol specifies a way for a client to request and receive
high-resolution timestamps for input events.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Version 1
Compositor Support
context object for high-resolution input timestamps
A global interface used for requesting high-resolution timestamps
for input events.
zwp_input_timestamps_manager_v1
request destroy()
Destructor
destroy the input timestamps manager object
Informs the server that the client will no longer be using this
protocol object. Existing objects created by this object are not
affected.
Version 1
- destroy — destroy the input timestamps object
- timestamp — high-resolution timestamp event
context object for input timestamps
Provides high-resolution timestamp events for a set of subscribed input
events. The set of subscribed input events is determined by the
zwp_input_timestamps_manager_v1 request used to create this object.
zwp_input_timestamps_v1
request destroy()
Destructor
destroy the input timestamps object
Informs the server that the client will no longer be using this
protocol object. After the server processes the request, no more
timestamp events will be emitted.
zwp_input_timestamps_v1
event timestamp(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the seconds part of the timestamp
- tv_sec_lo — low 32 bits of the seconds part of the timestamp
- tv_nsec — nanoseconds part of the timestamp
high-resolution timestamp event
The timestamp event is associated with the first subsequent input event
carrying a timestamp which belongs to the set of input events this
object is subscribed to.
The timestamp provided by this event is a high-resolution version of
the timestamp argument of the associated input event. The provided
timestamp is in the same clock domain and is at least as accurate as
the associated input event timestamp.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
each component being an unsigned 32-bit value. Whole seconds are in
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
and the additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999].
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.
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.
Version 1
keyboard event filtering functionality
Manages the filtering of key presses.
xx_keyboard_filter_v1
enum error {
invalid_serial = 0x1,
}- invalid_serial — compositor received serial not adhering to requirements
xx_keyboard_filter_v1
request unbind()
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.
xx_keyboard_filter_v1
request filter(
serial: uint,
action: uint<filter_action>,
)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.
xx_keyboard_filter_v1
request destroy()
Destructor
destroy the keyboard
Destroys the keyboard_filter object, stops event interception, and unbinds the wl_keyboard and input_method objects bound to it.
Version 1
xx_keyboard_filter_manager_v1
enum error {
already_bound = 0x1,
wrong_seat = 0x2,
}- already_bound — an argument is already bound
- wrong_seat — the keyboard i attached to the wrong seat for this operation
xx_keyboard_filter_manager_v1
request bind_to_input_method(
keyboard: object<wl_keyboard>,
input_method: object<xx_input_method_v1>,
surface: object<wl_surface>,
extensions: new_id<xx_keyboard_filter_v1>,
)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.
Copyright
Copyright © 2017 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.
Protocol for inhibiting the compositor keyboard shortcuts
This protocol specifies a way for a client to request the compositor
to ignore its own keyboard shortcuts for a given seat, so that all
key events from that seat get forwarded to a surface.
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 'z' prefix and the version number in the protocol and
interface names are removed and the interface version number is
reset.
Version 1
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
kwin 6.7
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
sway 1.11
wayfire 0.9.0
context object for keyboard grab_manager
A global interface used for inhibiting the compositor keyboard shortcuts.
zwp_keyboard_shortcuts_inhibit_manager_v1
request inhibit_shortcuts(
id: new_id<zwp_keyboard_shortcuts_inhibitor_v1>,
surface: object<wl_surface>,
seat: object<wl_seat>,
)- surface — the surface that inhibits the keyboard shortcuts behavior
- seat — the wl_seat for which keyboard shortcuts should be disabled
create a new keyboard shortcuts inhibitor object
Create a new keyboard shortcuts inhibitor object associated with
the given surface for the given seat.
If shortcuts are already inhibited for the specified seat and surface,
a protocol error "already_inhibited" is raised by the compositor.
Version 1
- destroy — destroy the keyboard shortcuts inhibitor object
- active — shortcuts are inhibited
- inactive — shortcuts are restored
context object for keyboard shortcuts inhibitor
A keyboard shortcuts inhibitor instructs the compositor to ignore
its own keyboard shortcuts when the associated surface has keyboard
focus. As a result, when the surface has keyboard focus on the given
seat, it will receive all key events originating from the specified
seat, even those which would normally be caught by the compositor for
its own shortcuts.
The Wayland compositor is however under no obligation to disable
all of its shortcuts, and may keep some special key combo for its own
use, including but not limited to one allowing the user to forcibly
restore normal keyboard events routing in the case of an unwilling
client. The compositor may also use the same key combo to reactivate
an existing shortcut inhibitor that was previously deactivated on
user request.
When the compositor restores its own keyboard shortcuts, an
"inactive" event is emitted to notify the client that the keyboard
shortcuts inhibitor is not effectively active for the surface and
seat any more, and the client should not expect to receive all
keyboard events.
When the keyboard shortcuts inhibitor is inactive, the client has
no way to forcibly reactivate the keyboard shortcuts inhibitor.
The user can chose to re-enable a previously deactivated keyboard
shortcuts inhibitor using any mechanism the compositor may offer,
in which case the compositor will send an "active" event to notify
the client.
If the surface is destroyed, unmapped, or loses the seat's keyboard
focus, the keyboard shortcuts inhibitor becomes irrelevant and the
compositor will restore its own keyboard shortcuts but no "inactive"
event is emitted in this case.
zwp_keyboard_shortcuts_inhibitor_v1
event active()
shortcuts are inhibited
This event indicates that the shortcut inhibitor is active.
The compositor sends this event every time compositor shortcuts
are inhibited on behalf of the surface. When active, the client
may receive input events normally reserved by the compositor
(see zwp_keyboard_shortcuts_inhibitor_v1).
This occurs typically when the initial request "inhibit_shortcuts"
first becomes active or when the user instructs the compositor to
re-enable and existing shortcuts inhibitor using any mechanism
offered by the compositor.
Copyright
Copyright © 2014, 2015 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 6
Compositor Support
Version 5cosmic 1.0.0
hyprland 0.52.1
kwin 6.7
louvre 2.14.1
mir 2.26
mutter 51
niri 26.04
phoc 0.55
weston 15.0.1
Version 4cage 0.3.0
gamescope 3.15.14
labwc 0.20.2
muffin 6.7.4
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
factory for creating dmabuf-based wl_buffers
This interface offers ways to create generic dmabuf-based wl_buffers.
For more information about dmabuf, see:
https://www.kernel.org/doc/html/next/userspace-api/dma-buf-alloc-exchange.html
Clients can use the get_surface_feedback request to get dmabuf feedback
for a particular surface. If the client wants to retrieve feedback not
tied to a surface, they can use the get_default_feedback request.
The following are required from clients:
Clients must ensure that either all data in the dma-buf is
coherent for all subsequent read access or that coherency is
correctly handled by the underlying kernel-side dma-buf
implementation.
Don't make any more attachments after sending the buffer to the
compositor. Making more attachments later increases the risk of
the compositor not being able to use (re-import) an existing
dmabuf-based wl_buffer.
The underlying graphics stack must ensure the following:
However, when the underlying graphics stack fails to deliver the
promise, because of e.g. a device hot-unplug which raises internal
errors, after the wl_buffer has been successfully created the
compositor must not raise protocol errors to the client when dmabuf
import later fails.
To create a wl_buffer from one or more dmabufs, a client creates a
zwp_linux_buffer_params_v1 object with a zwp_linux_dmabuf_v1.create_params
request. All planes required by the intended format are added with
the 'add' request. Finally, a 'create' or 'create_immed' request is
issued, which has the following outcome depending on the import success.
The 'create' request,
on success, triggers a 'created' event which provides the final
wl_buffer to the client.
on failure, triggers a 'failed' event to convey that the server
cannot use the dmabufs received from the client.
For the 'create_immed' request,
on success, the server immediately imports the added dmabufs to
create a wl_buffer. No event is sent from the server in this case.
on failure, the server can choose to either:
terminate the client by raising a fatal error.
mark the wl_buffer as failed, and send a 'failed' event to the
client. If the client uses a failed wl_buffer as an argument to any
request, the behaviour is compositor implementation-defined.
For all DRM formats and unless specified in another protocol extension,
pre-multiplied alpha is used for pixel values.
Unless specified otherwise in another protocol extension, implicit
synchronization is used. In other words, compositors and clients must
wait and signal fences implicitly passed via the DMA-BUF's reservation
mechanism.
zwp_linux_dmabuf_v1
request create_params(
params_id: new_id<zwp_linux_buffer_params_v1>,
)- params_id — id for the newly created zwp_linux_buffer_params_v1
create a temporary object for buffer parameters
This temporary object is used to collect multiple dmabuf handles into
a single batch to create a wl_buffer. It can only be used once and
should be destroyed after a 'created' or 'failed' event has been
received.
zwp_linux_dmabuf_v1
event format(
format: uint,
)Deprecated since version 4
supported buffer format
This event advertises one buffer format that the server supports.
All the supported formats are advertised once when the client
binds to this interface. A roundtrip after binding guarantees
that the client has received all supported formats.
For the definition of the format codes, see the
zwp_linux_buffer_params_v1::create request.
Starting version 4, the format event is deprecated and must not be
sent by compositors. Instead, use get_default_feedback or
get_surface_feedback.
zwp_linux_dmabuf_v1
event modifier(
format: uint,
modifier_hi: uint,
modifier_lo: uint,
)Available since version 3Deprecated since version 4
- format — DRM_FORMAT code
- modifier_hi — high 32 bits of layout modifier
- modifier_lo — low 32 bits of layout modifier
supported buffer format modifier
This event advertises the formats that the server supports, along with
the modifiers supported for each format. All the supported modifiers
for all the supported formats are advertised once when the client
binds to this interface. A roundtrip after binding guarantees that
the client has received all supported format-modifier pairs.
For legacy support, DRM_FORMAT_MOD_INVALID (that is, modifier_hi ==
0x00ffffff and modifier_lo == 0xffffffff) is allowed in this event.
It indicates that the server can support the format with an implicit
modifier. When a plane has DRM_FORMAT_MOD_INVALID as its modifier, it
is as if no explicit modifier is specified. The effective modifier
will be derived from the dmabuf.
A compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for
a given format supports both explicit modifiers and implicit modifiers.
For the definition of the format and modifier codes, see the
zwp_linux_buffer_params_v1::create and zwp_linux_buffer_params_v1::add
requests.
Starting version 4, the modifier event is deprecated and must not be
sent by compositors. Instead, use get_default_feedback or
get_surface_feedback.
Version 6
parameters for creating a dmabuf-based wl_buffer
This temporary object is a collection of dmabufs and other
parameters that together form a single logical buffer. The temporary
object may eventually create one wl_buffer unless cancelled by
destroying it before requesting 'create'.
Single-planar formats only require one dmabuf, however
multi-planar formats may require more than one dmabuf. For all
formats, an 'add' request must be called once per plane (even if the
underlying dmabuf fd is identical).
You must use consecutive plane indices ('plane_idx' argument for 'add')
from zero to the number of planes used by the drm_fourcc format code.
All planes required by the format must be given exactly once, but can
be given in any order. Each plane index can only be set once; subsequent
calls with a plane index which has already been set will result in a
plane_set error being generated.
zwp_linux_buffer_params_v1
enum error {
already_used = 0,
plane_idx = 1,
plane_set = 2,
incomplete = 3,
invalid_format = 4,
invalid_dimensions = 5,
out_of_bounds = 6,
invalid_wl_buffer = 7,
invalid_dev_t_size = 8,
}- already_used — the zwp_linux_buffer_params_v1 object has already been used to create a wl_buffer
- plane_idx — plane index out of bounds
- plane_set — the plane index was already set
- incomplete — missing or too many planes to create a buffer
- invalid_format — format not supported
- invalid_dimensions — invalid width or height
- out_of_bounds — offset + stride * height goes out of dmabuf bounds
- invalid_wl_buffer — invalid wl_buffer resulted from importing dmabufs via
the create_immed request on given buffer_params
- invalid_dev_t_size — an array with mismatching size for a dev_t was used
zwp_linux_buffer_params_v1
request add(
fd: fd,
plane_idx: uint,
offset: uint,
stride: uint,
modifier_hi: uint,
modifier_lo: uint,
)- fd — dmabuf fd
- plane_idx — plane index
- offset — offset in bytes
- stride — stride in bytes
- modifier_hi — high 32 bits of layout modifier
- modifier_lo — low 32 bits of layout modifier
add a dmabuf to the temporary set
This request adds one dmabuf to the set in this
zwp_linux_buffer_params_v1.
The 64-bit unsigned value combined from modifier_hi and modifier_lo
is the dmabuf layout modifier. DRM AddFB2 ioctl calls this the
fb modifier, which is defined in drm_mode.h of Linux UAPI.
This is an opaque token. Drivers use this token to express tiling,
compression, etc. driver-specific modifications to the base format
defined by the DRM fourcc code.
Starting from version 4, the invalid_format protocol error is sent if
the format + modifier pair was not advertised as supported.
Starting from version 5, the invalid_format protocol error is sent if
all planes don't use the same modifier.
This request raises the PLANE_IDX error if plane_idx is too large.
The error PLANE_SET is raised if attempting to set a plane that
was already set.
zwp_linux_buffer_params_v1
enum flags {
y_invert = 1,
interlaced = 2,
bottom_first = 4,
}This is a bitfield
- y_invert — contents are y-inverted
- interlaced — content is interlaced
- bottom_first — bottom field first
zwp_linux_buffer_params_v1
request create(
width: int,
height: int,
format: uint,
flags: uint<flags>,
)- width — base plane width in pixels
- height — base plane height in pixels
- format — DRM_FORMAT code
- flags — see enum flags
create a wl_buffer from the given dmabufs
This asks for creation of a wl_buffer from the added dmabuf
buffers. The wl_buffer is not created immediately but returned via
the 'created' event if the dmabuf sharing succeeds. The sharing
may fail at runtime for reasons a client cannot predict, in
which case the 'failed' event is triggered.
The 'format' argument is a DRM_FORMAT code, as defined by the
libdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the
authoritative source on how the format codes should work.
The 'flags' is a bitfield of the flags defined in enum "flags".
'y_invert' means that the image needs to be y-flipped.
Flag 'interlaced' means that the frame in the buffer is not
progressive as usual, but interlaced. An interlaced buffer as
supported here must always contain both top and bottom fields.
The top field always begins on the first pixel row. The temporal
ordering between the two fields is top field first, unless
'bottom_first' is specified. It is undefined whether 'bottom_first'
is ignored if 'interlaced' is not set.
This protocol does not convey any information about field rate,
duration, or timing, other than the relative ordering between the
two fields in one buffer. A compositor may have to estimate the
intended field rate from the incoming buffer rate. It is undefined
whether the time of receiving wl_surface.commit with a new buffer
attached, applying the wl_surface state, wl_surface.frame callback
trigger, presentation, or any other point in the compositor cycle
is used to measure the frame or field times. There is no support
for detecting missed or late frames/fields/buffers either, and
there is no support whatsoever for cooperating with interlaced
compositor output.
The composited image quality resulting from the use of interlaced
buffers is explicitly undefined. A compositor may use elaborate
hardware features or software to deinterlace and create progressive
output frames from a sequence of interlaced input buffers, or it
may produce substandard image quality. However, compositors that
cannot guarantee reasonable image quality in all cases are recommended
to just reject all interlaced buffers.
Any argument errors, including non-positive width or height,
mismatch between the number of planes and the format, bad
format, bad offset or stride, may be indicated by fatal protocol
errors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS,
OUT_OF_BOUNDS.
Dmabuf import errors in the server that are not obvious client
bugs are returned via the 'failed' event as non-fatal. This
allows attempting dmabuf sharing and falling back in the client
if it fails.
This request can be sent only once in the object's lifetime, after
which the only legal request is destroy. This object should be
destroyed after issuing a 'create' request. Attempting to use this
object after issuing 'create' raises the ALREADY_USED protocol error.
It is not mandatory to issue 'create'. If a client wants to
cancel the buffer creation, it can just destroy this object.
zwp_linux_buffer_params_v1
event failed()
buffer creation failed
This event indicates that the attempted buffer creation has
failed. It usually means that one of the dmabuf constraints
has not been fulfilled.
Upon receiving this event, the client should destroy the
zwp_linux_buffer_params_v1 object.
zwp_linux_buffer_params_v1
request create_immed(
buffer_id: new_id<wl_buffer>,
width: int,
height: int,
format: uint,
flags: uint<flags>,
)Available since version 2
- buffer_id — id for the newly created wl_buffer
- width — base plane width in pixels
- height — base plane height in pixels
- format — DRM_FORMAT code
- flags — see enum flags
immediately create a wl_buffer from the given
dmabufs
This asks for immediate creation of a wl_buffer by importing the
added dmabufs.
In case of import success, no event is sent from the server, and the
wl_buffer is ready to be used by the client.
Upon import failure, either of the following may happen, as seen fit
by the implementation:
the client is terminated with one of the following fatal protocol
errors:
INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS,
in case of argument errors such as mismatch between the number
of planes and the format, bad format, non-positive width or
height, or bad offset or stride.
INVALID_WL_BUFFER, in case the cause for failure is unknown or
platform specific.
the server creates an invalid wl_buffer, marks it as failed and
sends a 'failed' event to the client. The result of using this
invalid wl_buffer as an argument in any request by the client is
defined by the compositor implementation.
This takes the same arguments as a 'create' request, and obeys the
same restrictions.
zwp_linux_buffer_params_v1
request set_sampling_device(
device: array,
)Available since version 6
- device — device dev_t value
set the target device of the wl_buffer
Set the device the compositor should import the dmabufs to for sampling
in the next create or create_immed request.
To avoid race conditions when the compositor removes a device from the
tranches, it is not a protocol error if the device hasn't been advertised
by the compositor in a tranche with the sampling flag, but the import is
likely to fail in that case.
If the client doesn't know a suitable target device, it shouldn't set one,
and the compositor should attempt import on all devices it supports.
If the array is too small to contain a dev_t or larger than required, the
invalid_dev_t_size error will be emitted.
Version 6
dmabuf feedback
This object advertises dmabuf parameters feedback. This includes the
preferred devices and the supported formats/modifiers.
The parameters are sent once when this object is created and whenever they
change. The done event is always sent once after all parameters have been
sent. When a single parameter changes, all parameters are re-sent by the
compositor.
Compositors can re-send the parameters when the current client buffer
allocations are sub-optimal. Compositors should not re-send the
parameters if re-allocating the buffers would not result in a more optimal
configuration. In particular, compositors should avoid sending the exact
same parameters multiple times in a row.
The tranche_target_device and tranche_formats events are grouped by
tranches of preference. For each tranche, a tranche_target_device, one
tranche_flags and one or more tranche_formats events are sent, followed
by a tranche_done event finishing the list. The tranches are sent in
descending order of preference. All formats and modifiers in the same
tranche have the same preference.
To send parameters, the compositor sends one main_device event (unless
the client bound version 6 or above), tranches (each consisting of one
tranche_target_device event, one tranche_flags event, tranche_formats
events and then a tranche_done event), then one done event.
With version 6 and above, the compositor must always advertise at least
one tranche with the sampling flag set.
The compositor sends a format_table event at least once for each dmabuf
parameters feedback object, before any tranche events. Unless the format
table contents change later, the compositor is free not to send another
format_table event for the same dmabuf parameters feedback object.
zwp_linux_dmabuf_feedback_v1
event format_table(
fd: fd,
size: uint,
)- fd — table file descriptor
- size — table size, in bytes
format and modifier table
This event provides a file descriptor which can be memory-mapped to
access the format and modifier table.
The table contains a tightly packed array of consecutive format +
modifier pairs. Each pair is 16 bytes wide. It contains a format as a
32-bit unsigned integer, followed by 4 bytes of unused padding, and a
modifier as a 64-bit unsigned integer. The native endianness is used.
The client must map the file descriptor in read-only private mode.
Compositors are not allowed to mutate the table file contents once this
event has been sent. Instead, compositors must create a new, separate
table file and re-send feedback parameters. Compositors are allowed to
store duplicate format + modifier pairs in the table.
zwp_linux_dmabuf_feedback_v1
event main_device(
device: array,
)Deprecated since version 6
- device — device dev_t value
preferred main device
This event advertises the main device that the server prefers to use
when direct scan-out to the target device isn't possible. The
advertised main device may be different for each
zwp_linux_dmabuf_feedback_v1 object, and may change over time.
There is exactly one main device. The compositor must send at least
one preference tranche with tranche_target_device equal to main_device.
Clients need to create buffers that the main device can import and
read from, otherwise creating the dmabuf wl_buffer will fail (see the
zwp_linux_buffer_params_v1.create and create_immed requests for details).
The main device will also likely be kept active by the compositor,
so clients can use it instead of waking up another device for power
savings.
In general the device is a DRM node. The DRM node type (primary vs.
render) is unspecified. Clients must not rely on the compositor sending
a particular node type. Clients cannot check two devices for equality
by comparing the dev_t value.
If explicit modifiers are not supported and the client performs buffer
allocations on a different device than the main device, then the client
must force the buffer to have a linear layout.
With version 6 and above, this event is no longer sent. Clients should
use a device with the sampling flag in the tranches instead.
zwp_linux_dmabuf_feedback_v1
event tranche_done()
a preference tranche has been sent
This event splits tranche_target_device and tranche_formats events into
preference tranches. It is sent after a set of tranche_target_device
and tranche_formats events; it represents the end of a tranche. The
next tranche will have a lower preference.
zwp_linux_dmabuf_feedback_v1
event tranche_target_device(
device: array,
)- device — device dev_t value
target device
This event advertises the target device that the server prefers to use
for a buffer created given this tranche. The advertised target device
may be different for each preference tranche, and may change over time.
There is exactly one target device per tranche.
The target device may be a scan-out device, for example if the
compositor prefers to directly scan-out a buffer created given this
tranche. The target device may be a rendering device, for example if
the compositor prefers to texture from said buffer.
The client can use this hint to allocate the buffer in a way that makes
it accessible from the target device, ideally directly. The buffer must
still be accessible from a device with the sampling flag, either through
direct import or a potentially more expensive fallback path. If the
buffer can't be directly imported for sampling, then clients must be
prepared for the compositor changing the tranche priority or making
wl_buffer creation fail (see the zwp_linux_buffer_params_v1.create and
create_immed requests for details).
If the device is a DRM node, the DRM node type (primary vs. render) is
unspecified. Clients must not rely on the compositor sending a
particular node type. Clients cannot check two devices for equality by
comparing the dev_t value.
This event is tied to a preference tranche, see the tranche_done event.
zwp_linux_dmabuf_feedback_v1
event tranche_formats(
indices: array,
)- indices — array of 16-bit indexes
supported buffer format modifiers
This event advertises the format + modifier combinations that the
compositor supports.
It carries an array of indices, each referring to a format + modifier
pair in the last received format table (see the format_table event).
Each index is a 16-bit unsigned integer in native endianness.
For legacy support, DRM_FORMAT_MOD_INVALID is an allowed modifier.
It indicates that the server can support the format with an implicit
modifier. When a buffer has DRM_FORMAT_MOD_INVALID as its modifier, it
is as if no explicit modifier is specified. The effective modifier
will be derived from the dmabuf.
A compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for
a given format supports both explicit modifiers and implicit modifiers.
Compositors must not send duplicate format + modifier pairs within the
same tranche or across two different tranches with the same target
device and flags.
This event is tied to a preference tranche, see the tranche_done event.
For the definition of the format and modifier codes, see the
zwp_linux_buffer_params_v1.create request.
zwp_linux_dmabuf_feedback_v1
event tranche_flags(
flags: uint<tranche_flags>,
)tranche flags
This event sets tranche-specific flags. This event is tied to a
preference tranche, see the tranche_done event.
With version 6 and above, the compositor must set at least one flag
in each tranche.
Copyright
Copyright 2016 The Chromium Authors.
Copyright 2017 Intel Corporation
Copyright 2018 Collabora, Ltd
Copyright 2021 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
protocol for providing explicit synchronization
This protocol allows clients to request explicit synchronization for
buffers. It is tied to the Linux DRM synchronization object framework.
Synchronization refers to co-ordination of pipelined operations performed
on buffers. Most GPU clients will schedule an asynchronous operation to
render to the buffer, then immediately send the buffer to the compositor
to be attached to a surface.
With implicit synchronization, ensuring that the rendering operation is
complete before the compositor displays the buffer is an implementation
detail handled by either the kernel or userspace graphics driver.
By contrast, with explicit synchronization, DRM synchronization object
timeline points mark when the asynchronous operations are complete. When
submitting a buffer, the client provides a timeline point which will be
waited on before the compositor accesses the buffer, and another timeline
point that the compositor will signal when it no longer needs to access the
buffer contents for the purposes of the surface commit.
Linux DRM synchronization objects are documented at:
https://dri.freedesktop.org/docs/drm/gpu/drm-mm.html#drm-sync-objects
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
Compositor Support
Version 1cosmic 1.0.0
gamescope 3.15.14
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
mutter 51
river 0.3.13
sway 1.11
global for providing explicit synchronization
This global is a factory interface, allowing clients to request
explicit synchronization for buffers on a per-surface basis.
See wp_linux_drm_syncobj_surface_v1 for more information.
wp_linux_drm_syncobj_manager_v1
request destroy()
Destructor
destroy explicit synchronization factory object
Destroy this explicit synchronization factory object. Other objects
shall not be affected by this request.
wp_linux_drm_syncobj_manager_v1
enum error {
surface_exists = 0,
invalid_timeline = 1,
}- surface_exists — the surface already has a synchronization object associated
- invalid_timeline — the timeline object could not be imported
wp_linux_drm_syncobj_manager_v1
request get_surface(
id: new_id<wp_linux_drm_syncobj_surface_v1>,
surface: object<wl_surface>,
)- id — the new synchronization surface object id
- surface — the surface
extend surface interface for explicit synchronization
Instantiate an interface extension for the given wl_surface to provide
explicit synchronization.
If the given wl_surface already has an explicit synchronization object
associated, the surface_exists protocol error is raised.
Graphics APIs, like EGL or Vulkan, that manage the buffer queue and
commits of a wl_surface themselves, are likely to be using this
extension internally. If a client is using such an API for a
wl_surface, it should not directly use this extension on that surface,
to avoid raising a surface_exists protocol error.
Version 1
synchronization object timeline
This object represents an explicit synchronization object timeline
imported by the client to the compositor.
wp_linux_drm_syncobj_timeline_v1
request destroy()
Destructor
destroy the timeline
Destroy the synchronization object timeline. Other objects are not
affected by this request, in particular timeline points set by
set_acquire_point and set_release_point are not unset.
Version 1
per-surface explicit synchronization
This object is an add-on interface for wl_surface to enable explicit
synchronization.
Each surface can be associated with only one object of this interface at
any time.
Explicit synchronization is guaranteed to be supported for buffers
created with any version of the linux-dmabuf protocol. Compositors are
free to support explicit synchronization for additional buffer types.
If at surface commit time the attached buffer does not support explicit
synchronization, an unsupported_buffer error is raised.
As long as the wp_linux_drm_syncobj_surface_v1 object is alive, the
compositor may ignore implicit synchronization for buffers attached and
committed to the wl_surface. The delivery of wl_buffer.release events
for buffers attached to the surface becomes undefined.
Clients must set both acquire and release points if and only if a
non-null buffer is attached in the same surface commit. See the
no_buffer, no_acquire_point and no_release_point protocol errors.
If at surface commit time the acquire and release DRM syncobj timelines
are identical, the acquire point value must be strictly less than the
release point value, or else the conflicting_points protocol error is
raised.
wp_linux_drm_syncobj_surface_v1
request destroy()
Destructor
destroy the surface synchronization object
Destroy this surface synchronization object.
Any timeline point set by this object with set_acquire_point or
set_release_point since the last commit may be discarded by the
compositor. Any timeline point set by this object before the last
commit will not be affected.
wp_linux_drm_syncobj_surface_v1
enum error {
no_surface = 1,
unsupported_buffer = 2,
no_buffer = 3,
no_acquire_point = 4,
no_release_point = 5,
conflicting_points = 6,
}- no_surface — the associated wl_surface was destroyed
- unsupported_buffer — the buffer does not support explicit synchronization
- no_buffer — no buffer was attached
- no_acquire_point — no acquire timeline point was set
- no_release_point — no release timeline point was set
- conflicting_points — acquire and release timeline points are in conflict
wp_linux_drm_syncobj_surface_v1
request set_acquire_point(
timeline: object<wp_linux_drm_syncobj_timeline_v1>,
point_hi: uint,
point_lo: uint,
)- point_hi — high 32 bits of the point value
- point_lo — low 32 bits of the point value
set the acquire timeline point
Set the timeline point that must be signalled before the compositor may
sample from the buffer attached with wl_surface.attach.
The 64-bit unsigned value combined from point_hi and point_lo is the
point value.
The acquire point is double-buffered state, and will be applied on the
next wl_surface.commit request for the associated surface. Thus, it
applies only to the buffer that is attached to the surface at commit
time.
If an acquire point has already been attached during the same commit
cycle, the new point replaces the old one.
If the associated wl_surface was destroyed, a no_surface error is
raised.
If at surface commit time there is a pending acquire timeline point set
but no pending buffer attached, a no_buffer error is raised. If at
surface commit time there is a pending buffer attached but no pending
acquire timeline point set, the no_acquire_point protocol error is
raised.
wp_linux_drm_syncobj_surface_v1
request set_release_point(
timeline: object<wp_linux_drm_syncobj_timeline_v1>,
point_hi: uint,
point_lo: uint,
)- point_hi — high 32 bits of the point value
- point_lo — low 32 bits of the point value
set the release timeline point
Set the timeline point that must be signalled by the compositor when it
has finished its usage of the buffer attached with wl_surface.attach
for the relevant commit.
Once the timeline point is signaled, and assuming the associated buffer
is not pending release from other wl_surface.commit requests, no
additional explicit or implicit synchronization with the compositor is
required to safely re-use the buffer.
Note that clients cannot rely on the release point being always
signaled after the acquire point: compositors may release buffers
without ever reading from them. In addition, the compositor may use
different presentation paths for different commits, which may have
different release behavior. As a result, the compositor may signal the
release points in a different order than the client committed them.
Because signaling a timeline point also signals every previous point,
it is generally not safe to use the same timeline object for the
release points of multiple buffers. The out-of-order signaling
described above may lead to a release point being signaled before the
compositor has finished reading. To avoid this, it is strongly
recommended that each buffer should use a separate timeline for its
release points.
The 64-bit unsigned value combined from point_hi and point_lo is the
point value.
The release point is double-buffered state, and will be applied on the
next wl_surface.commit request for the associated surface. Thus, it
applies only to the buffer that is attached to the surface at commit
time.
If a release point has already been attached during the same commit
cycle, the new point replaces the old one.
If the associated wl_surface was destroyed, a no_surface error is
raised.
If at surface commit time there is a pending release timeline point set
but no pending buffer attached, a no_buffer error is raised. If at
surface commit time there is a pending buffer attached but no pending
release timeline point set, the no_release_point protocol error is
raised.
Copyright
Copyright © 2014 Jonas Ådahl
Copyright © 2015 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.
protocol for constraining pointer motions
This protocol specifies a set of interfaces used for adding constraints to
the motion of a pointer. Possible constraints include confining pointer
motions to a given region, or locking it to its current position.
In order to constrain the pointer, a client must first bind the global
interface "wp_pointer_constraints" which, if a compositor supports pointer
constraints, is exposed by the registry. Using the bound global object, the
client uses the request that corresponds to the type of constraint it wants
to make. See wp_pointer_constraints for more details.
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 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
Version 1
Compositor Support
Version 1cosmic 1.0.0
gamescope 3.15.14
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
wayfire 0.9.0
weston 15.0.1
constrain the movement of a pointer
The global interface exposing pointer constraining functionality. It
exposes two requests: lock_pointer for locking the pointer to its
position, and confine_pointer for locking the pointer to a region.
The lock_pointer and confine_pointer requests create the objects
wp_locked_pointer and wp_confined_pointer respectively, and the client can
use these objects to interact with the lock.
For any surface, only one lock or confinement may be active across all
wl_pointer objects of the same seat. If a lock or confinement is requested
when another lock or confinement is active or requested on the same surface
and with any of the wl_pointer objects of the same seat, an
'already_constrained' error will be raised.
zwp_pointer_constraints_v1
enum error {
already_constrained = 1,
}- already_constrained — pointer constraint already requested on that surface
wp_pointer_constraints error values
These errors can be emitted in response to wp_pointer_constraints
requests.
zwp_pointer_constraints_v1
enum lifetime {
oneshot = 1,
persistent = 2,
}- oneshot
the pointer constraint is defunct once deactivated
A oneshot pointer constraint will never reactivate once it has been
deactivated. See the corresponding deactivation event
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
details.
- persistent
the pointer constraint may reactivate
A persistent pointer constraint may again reactivate once it has
been deactivated. See the corresponding deactivation event
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
details.
constraint lifetime
These values represent different lifetime semantics. They are passed
as arguments to the factory requests to specify how the constraint
lifetimes should be managed.
zwp_pointer_constraints_v1
request destroy()
Destructor
destroy the pointer constraints manager object
Used by the client to notify the server that it will no longer use this
pointer constraints object.
zwp_pointer_constraints_v1
request lock_pointer(
id: new_id<zwp_locked_pointer_v1>,
surface: object<wl_surface>,
pointer: object<wl_pointer>,
region: nullable object<wl_region>,
lifetime: uint<lifetime>,
)- surface — surface to lock pointer to
- pointer — the pointer that should be locked
- region — region of surface
- lifetime — lock lifetime
lock pointer to a position
The lock_pointer request lets the client request to disable movements of
the virtual pointer (i.e. the cursor), effectively locking the pointer
to a position. This request may not take effect immediately; in the
future, when the compositor deems implementation-specific constraints
are satisfied, the pointer lock will be activated and the compositor
sends a locked event.
The protocol provides no guarantee that the constraints are ever
satisfied, and does not require the compositor to send an error if the
constraints cannot ever be satisfied. It is thus possible to request a
lock that will never activate.
There may not be another pointer constraint of any kind requested or
active on the surface for any of the wl_pointer objects of the seat of
the passed pointer when requesting a lock. If there is, an error will be
raised. See general pointer lock documentation for more details.
The intersection of the region passed with this request and the input
region of the surface is used to determine where the pointer must be
in order for the lock to activate. It is up to the compositor whether to
warp the pointer or require some kind of user interaction for the lock
to activate. If the region is null the surface input region is used.
A surface may receive pointer focus without the lock being activated.
The request creates a new object wp_locked_pointer which is used to
interact with the lock as well as receive updates about its state. See
the the description of wp_locked_pointer for further information.
Note that while a pointer is locked, the wl_pointer objects of the
corresponding seat will not emit any wl_pointer.motion events, but
relative motion events will still be emitted via wp_relative_pointer
objects of the same seat. wl_pointer.axis and wl_pointer.button events
are unaffected.
zwp_pointer_constraints_v1
request confine_pointer(
id: new_id<zwp_confined_pointer_v1>,
surface: object<wl_surface>,
pointer: object<wl_pointer>,
region: nullable object<wl_region>,
lifetime: uint<lifetime>,
)- surface — surface to lock pointer to
- pointer — the pointer that should be confined
- region — region of surface
- lifetime — confinement lifetime
confine pointer to a region
The confine_pointer request lets the client request to confine the
pointer cursor to a given region. This request may not take effect
immediately; in the future, when the compositor deems implementation-
specific constraints are satisfied, the pointer confinement will be
activated and the compositor sends a confined event.
The intersection of the region passed with this request and the input
region of the surface is used to determine where the pointer must be
in order for the confinement to activate. It is up to the compositor
whether to warp the pointer or require some kind of user interaction for
the confinement to activate. If the region is null the surface input
region is used.
The request will create a new object wp_confined_pointer which is used
to interact with the confinement as well as receive updates about its
state. See the the description of wp_confined_pointer for further
information.
Version 1
receive relative pointer motion events
The wp_locked_pointer interface represents a locked pointer state.
While the lock of this object is active, the wl_pointer objects of the
associated seat will not emit any wl_pointer.motion events.
This object will send the event 'locked' when the lock is activated.
Whenever the lock is activated, it is guaranteed that the locked surface
will already have received pointer focus and that the pointer will be
within the region passed to the request creating this object.
To unlock the pointer, send the destroy request. This will also destroy
the wp_locked_pointer object.
If the compositor decides to unlock the pointer the unlocked event is
sent. See wp_locked_pointer.unlock for details.
When unlocking, the compositor may warp the cursor position to the set
cursor position hint. If it does, it will not result in any relative
motion events emitted via wp_relative_pointer.
If the surface the lock was requested on is destroyed and the lock is not
yet activated, the wp_locked_pointer object is now defunct and must be
destroyed.
zwp_locked_pointer_v1
request destroy()
Destructor
destroy the locked pointer object
Destroy the locked pointer object. If applicable, the compositor will
unlock the pointer.
zwp_locked_pointer_v1
request set_cursor_position_hint(
surface_x: fixed,
surface_y: fixed,
)- surface_x — surface-local x coordinate
- surface_y — surface-local y coordinate
set the pointer cursor position hint
Set the cursor position hint relative to the top left corner of the
surface.
If the client is drawing its own cursor, it should update the position
hint to the position of its own cursor. A compositor may use this
information to warp the pointer upon unlock in order to avoid pointer
jumps.
The cursor position hint is double-buffered state, see
wl_surface.commit.
zwp_locked_pointer_v1
request set_region(
region: nullable object<wl_region>,
)- region — region of surface
set a new lock region
Set a new region used to lock the pointer.
The new lock region is double-buffered, see wl_surface.commit.
For details about the lock region, see wp_locked_pointer.
zwp_locked_pointer_v1
event unlocked()
lock deactivation event
Notification that the pointer lock of the seat's pointer is no longer
active. If this is a oneshot pointer lock (see
wp_pointer_constraints.lifetime) this object is now defunct and should
be destroyed. If this is a persistent pointer lock (see
wp_pointer_constraints.lifetime) this pointer lock may again
reactivate in the future.
Version 1
confined pointer object
The wp_confined_pointer interface represents a confined pointer state.
This object will send the event 'confined' when the confinement is
activated. Whenever the confinement is activated, it is guaranteed that
the surface the pointer is confined to will already have received pointer
focus and that the pointer will be within the region passed to the request
creating this object. It is up to the compositor to decide whether this
requires some user interaction and if the pointer will warp to within the
passed region if outside.
To unconfine the pointer, send the destroy request. This will also destroy
the wp_confined_pointer object.
If the compositor decides to unconfine the pointer the unconfined event is
sent. The wp_confined_pointer object is at this point defunct and should
be destroyed.
zwp_confined_pointer_v1
request destroy()
Destructor
destroy the confined pointer object
Destroy the confined pointer object. If applicable, the compositor will
unconfine the pointer.
zwp_confined_pointer_v1
request set_region(
region: nullable object<wl_region>,
)- region — region of surface
set a new confine region
Set a new region used to confine the pointer.
The new confine region is double-buffered, see wl_surface.commit.
If the confinement is active when the new confinement region is applied
and the pointer ends up outside of newly applied region, the pointer may
warped to a position within the new confinement region. If warped, a
wl_pointer.motion event will be emitted, but no
wp_relative_pointer.relative_motion event.
The compositor may also, instead of using the new region, unconfine the
pointer.
For details about the confine region, see wp_confined_pointer.
zwp_confined_pointer_v1
event unconfined()
pointer unconfined
Notification that the pointer confinement of the seat's pointer is no
longer active. If this is a oneshot pointer confinement (see
wp_pointer_constraints.lifetime) this object is now defunct and should
be destroyed. If this is a persistent pointer confinement (see
wp_pointer_constraints.lifetime) this pointer confinement may again
reactivate in the future.
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.
Version 3
Compositor Support
Version 3cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
touchpad gestures
A global interface to provide semantic touchpad gestures for a given
pointer.
Three gestures are currently supported: swipe, pinch, and hold.
Pinch and swipe gestures follow a three-stage cycle: begin, update,
end. Hold gestures follow a two-stage cycle: begin and end. All
gestures are identified by a unique id.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
zwp_pointer_gestures_v1
request release()
DestructorAvailable since version 2
destroy the pointer gesture object
Destroy the pointer gesture object. Swipe, pinch and hold objects
created via this gesture object remain valid.
Version 3
- destroy — destroy the pointer swipe gesture object
- begin — multi-finger swipe begin
- update — multi-finger swipe motion
- end — multi-finger swipe end
a swipe gesture object
A swipe gesture object notifies a client about a multi-finger swipe
gesture detected on an indirect input device such as a touchpad.
The gesture is usually initiated by multiple fingers moving in the
same direction but once initiated the direction may change.
The precise conditions of when such a gesture is detected are
implementation-dependent.
A gesture consists of three stages: begin, update (optional) and end.
There cannot be multiple simultaneous hold, pinch or swipe gestures on a
same pointer/seat, how compositors prevent these situations is
implementation-dependent.
A gesture may be cancelled by the compositor or the hardware.
Clients should not consider performing permanent or irreversible
actions until the end of a gesture has been received.
zwp_pointer_gesture_swipe_v1
event begin(
serial: uint,
time: uint,
surface: object<wl_surface>,
fingers: uint,
)- time — timestamp with millisecond granularity
- fingers — number of fingers
multi-finger swipe begin
This event is sent when a multi-finger swipe gesture is detected
on the device.
zwp_pointer_gesture_swipe_v1
event update(
time: uint,
dx: fixed,
dy: fixed,
)- time — timestamp with millisecond granularity
- dx — delta x coordinate in surface coordinate space
- dy — delta y coordinate in surface coordinate space
multi-finger swipe motion
This event is sent when a multi-finger swipe gesture changes the
position of the logical center.
The dx and dy coordinates are relative coordinates of the logical
center of the gesture compared to the previous event.
zwp_pointer_gesture_swipe_v1
event end(
serial: uint,
time: uint,
cancelled: int,
)- time — timestamp with millisecond granularity
- cancelled — 1 if the gesture was cancelled, 0 otherwise
multi-finger swipe end
This event is sent when a multi-finger swipe gesture ceases to
be valid. This may happen when one or more fingers are lifted or
the gesture is cancelled.
When a gesture is cancelled, the client should undo state changes
caused by this gesture. What causes a gesture to be cancelled is
implementation-dependent.
Version 3
- destroy — destroy the pinch gesture object
- begin — multi-finger pinch begin
- update — multi-finger pinch motion
- end — multi-finger pinch end
a pinch gesture object
A pinch gesture object notifies a client about a multi-finger pinch
gesture detected on an indirect input device such as a touchpad.
The gesture is usually initiated by multiple fingers moving towards
each other or away from each other, or by two or more fingers rotating
around a logical center of gravity. The precise conditions of when
such a gesture is detected are implementation-dependent.
A gesture consists of three stages: begin, update (optional) and end.
There cannot be multiple simultaneous hold, pinch or swipe gestures on a
same pointer/seat, how compositors prevent these situations is
implementation-dependent.
A gesture may be cancelled by the compositor or the hardware.
Clients should not consider performing permanent or irreversible
actions until the end of a gesture has been received.
zwp_pointer_gesture_pinch_v1
event begin(
serial: uint,
time: uint,
surface: object<wl_surface>,
fingers: uint,
)- time — timestamp with millisecond granularity
- fingers — number of fingers
multi-finger pinch begin
This event is sent when a multi-finger pinch gesture is detected
on the device.
zwp_pointer_gesture_pinch_v1
event update(
time: uint,
dx: fixed,
dy: fixed,
scale: fixed,
rotation: fixed,
)- time — timestamp with millisecond granularity
- dx — delta x coordinate in surface coordinate space
- dy — delta y coordinate in surface coordinate space
- scale — scale relative to the initial finger position
- rotation — angle in degrees cw relative to the previous event
multi-finger pinch motion
This event is sent when a multi-finger pinch gesture changes the
position of the logical center, the rotation or the relative scale.
The dx and dy coordinates are relative coordinates in the
surface coordinate space of the logical center of the gesture.
The scale factor is an absolute scale compared to the
pointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers
are now twice as far apart as on pointer_gesture_pinch.begin.
The rotation is the relative angle in degrees clockwise compared to the previous
pointer_gesture_pinch.begin or pointer_gesture_pinch.update event.
zwp_pointer_gesture_pinch_v1
event end(
serial: uint,
time: uint,
cancelled: int,
)- time — timestamp with millisecond granularity
- cancelled — 1 if the gesture was cancelled, 0 otherwise
multi-finger pinch end
This event is sent when a multi-finger pinch gesture ceases to
be valid. This may happen when one or more fingers are lifted or
the gesture is cancelled.
When a gesture is cancelled, the client should undo state changes
caused by this gesture. What causes a gesture to be cancelled is
implementation-dependent.
Version 3
- destroy — destroy the hold gesture object
- begin — multi-finger hold begin
- end — multi-finger hold end
a hold gesture object
A hold gesture object notifies a client about a single- or
multi-finger hold gesture detected on an indirect input device such as
a touchpad. The gesture is usually initiated by one or more fingers
being held down without significant movement. The precise conditions
of when such a gesture is detected are implementation-dependent.
In particular, this gesture may be used to cancel kinetic scrolling.
A hold gesture consists of two stages: begin and end. Unlike pinch and
swipe there is no update stage.
There cannot be multiple simultaneous hold, pinch or swipe gestures on a
same pointer/seat, how compositors prevent these situations is
implementation-dependent.
A gesture may be cancelled by the compositor or the hardware.
Clients should not consider performing permanent or irreversible
actions until the end of a gesture has been received.
zwp_pointer_gesture_hold_v1
event begin(
serial: uint,
time: uint,
surface: object<wl_surface>,
fingers: uint,
)Available since version 3
- time — timestamp with millisecond granularity
- fingers — number of fingers
multi-finger hold begin
This event is sent when a hold gesture is detected on the device.
zwp_pointer_gesture_hold_v1
event end(
serial: uint,
time: uint,
cancelled: int,
)Available since version 3
- time — timestamp with millisecond granularity
- cancelled — 1 if the gesture was cancelled, 0 otherwise
multi-finger hold end
This event is sent when a hold gesture ceases to
be valid. This may happen when the holding fingers are lifted or
the gesture is cancelled, for example if the fingers move past an
implementation-defined threshold, the finger count changes or the hold
gesture changes into a different type of gesture.
When a gesture is cancelled, the client may need to undo state changes
caused by this gesture. What causes a gesture to be cancelled is
implementation-dependent.
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.
Version 1
Compositor Support
Version 1hyprland 0.52.1
jay 1.14.0
kwin 6.7
muffin 6.7.4
mutter 51
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.
wp_pointer_warp_v1
request warp_pointer(
surface: object<wl_surface>,
pointer: object<wl_pointer>,
x: fixed,
y: fixed,
serial: uint,
)- surface — surface to position the pointer on
- pointer — the pointer that should be repositioned
- serial — serial number of the enter event
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.
Copyright
Copyright © 2013-2014 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
- error — fatal presentation errors
- destroy — unbind from the presentation interface
- feedback — request presentation feedback information
- clock_id — clock ID for timestamps
Compositor Support
Version 2cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
weston 15.0.1
Version 1gamescope 3.15.14
louvre 2.14.1
wayfire 0.9.0
timed presentation related wl_surface requests
The main feature of this interface is accurate presentation
timing feedback to ensure smooth video playback while maintaining
audio/video synchronization. Some features use the concept of a
presentation clock, which is defined in the
presentation.clock_id event.
A content update for a wl_surface is submitted by a
wl_surface.commit request. Request 'feedback' associates with
the wl_surface.commit and provides feedback on the content
update, particularly the final realized presentation time.
When the final realized presentation time is available, e.g.
after a framebuffer flip completes, the requested
presentation_feedback.presented events are sent. The final
presentation time can differ from the compositor's predicted
display update time and the update's target time, especially
when the compositor misses its target vertical blanking period.
wp_presentation
enum error {
invalid_timestamp = 0,
invalid_flag = 1,
}- invalid_timestamp — invalid value in tv_nsec
- invalid_flag — invalid flag
fatal presentation errors
These fatal protocol errors may be emitted in response to
illegal presentation requests.
wp_presentation
request destroy()
Destructor
unbind from the presentation interface
Informs the server that the client will no longer be using
this protocol object. Existing objects created by this object
are not affected.
wp_presentation
request feedback(
surface: object<wl_surface>,
callback: new_id<wp_presentation_feedback>,
)- surface — target surface
- callback — new feedback object
request presentation feedback information
Request presentation feedback for the current content submission
on the given surface. This creates a new presentation_feedback
object, which will deliver the feedback information once. If
multiple presentation_feedback objects are created for the same
submission, they will all deliver the same information.
For details on what information is returned, see the
presentation_feedback interface.
wp_presentation
event clock_id(
clk_id: uint,
)- clk_id — platform clock identifier
clock ID for timestamps
This event tells the client in which clock domain the
compositor interprets the timestamps used by the presentation
extension. This clock is called the presentation clock.
The compositor sends this event when the client binds to the
presentation interface. The presentation clock does not change
during the lifetime of the client connection.
The clock identifier is platform dependent. On POSIX platforms, the
identifier value is one of the clockid_t values accepted by
clock_gettime(). clock_gettime() is defined by POSIX.1-2001.
Timestamps in this clock domain are expressed as tv_sec_hi,
tv_sec_lo, tv_nsec triples, each component being an unsigned
32-bit value. Whole seconds are in tv_sec which is a 64-bit
value combined from tv_sec_hi and tv_sec_lo, and the
additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999].
Note that clock_id applies only to the presentation clock,
and implies nothing about e.g. the timestamps used in the
Wayland core protocol input events.
Compositors should prefer a clock which does not jump and is
not slewed e.g. by NTP. The absolute value of the clock is
irrelevant. Precision of one millisecond or better is
recommended. Clients must be able to query the current clock
value directly, not by asking the compositor.
Version 2
- sync_output — presentation synchronized to this output
- kind — bitmask of flags in presented event
- presented — the content update was displayed
- discarded — the content update was not displayed
presentation time feedback event
A presentation_feedback object returns an indication that a
wl_surface content update has become visible to the user.
One object corresponds to one content update submission
(wl_surface.commit). There are two possible outcomes: the
content update is presented to the user, and a presentation
timestamp delivered; or, the user did not see the content
update because it was superseded or its surface destroyed,
and the content update is discarded.
Once a presentation_feedback object has delivered a 'presented'
or 'discarded' event it is automatically destroyed.
wp_presentation_feedback
event sync_output(
output: object<wl_output>,
)- output — presentation output
presentation synchronized to this output
As presentation can be synchronized to only one output at a
time, this event tells which output it was. This event is only
sent prior to the presented event.
As clients may bind to the same global wl_output multiple
times, this event is sent for each bound instance that matches
the synchronized output. If a client has not bound to the
right wl_output global at all, this event is not sent.
wp_presentation_feedback
enum kind {
vsync = 0x1,
hw_clock = 0x2,
hw_completion = 0x4,
zero_copy = 0x8,
}This is a bitfield
- vsync
presentation was vsync'd
The presentation was synchronized to the "vertical retrace" by
the display hardware such that tearing does not happen.
Relying on software scheduling is not acceptable for this
flag. If presentation is done by a copy to the active
frontbuffer, then it must guarantee that tearing cannot
happen.
- hw_clock
hardware provided the presentation timestamp
The display hardware provided measurements that the hardware
driver converted into a presentation timestamp. Sampling a
clock in software is not acceptable for this flag.
- hw_completion
hardware signalled the start of the presentation
The display hardware signalled that it started using the new
image content. The opposite of this is e.g. a timer being used
to guess when the display hardware has switched to the new
image content.
- zero_copy
presentation was done zero-copy
The presentation of this update was done zero-copy. This means
the buffer from the client was given to display hardware as
is, without copying it. Compositing with OpenGL counts as
copying, even if textured directly from the client buffer.
Possible zero-copy cases include direct scanout of a
fullscreen surface and a surface on a hardware overlay.
bitmask of flags in presented event
These flags provide information about how the presentation of
the related content update was done. The intent is to help
clients assess the reliability of the feedback and the visual
quality with respect to possible tearing and timings.
wp_presentation_feedback
event presented(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
refresh: uint,
seq_hi: uint,
seq_lo: uint,
flags: uint<kind>,
)Destructor
- tv_sec_hi — high 32 bits of the seconds part of the presentation timestamp
- tv_sec_lo — low 32 bits of the seconds part of the presentation timestamp
- tv_nsec — nanoseconds part of the presentation timestamp
- refresh — nanoseconds till next refresh
- seq_hi — high 32 bits of refresh counter
- seq_lo — low 32 bits of refresh counter
- flags — combination of 'kind' values
the content update was displayed
The associated content update was displayed to the user at the
indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of
the timestamp, see presentation.clock_id event.
The timestamp corresponds to the time when the content update
turned into light the first time on the surface's main output.
Compositors may approximate this from the framebuffer flip
completion events from the system, and the latency of the
physical display path if known.
This event is preceded by all related sync_output events
telling which output's refresh cycle the feedback corresponds
to, i.e. the main output for the surface. Compositors are
recommended to choose the output containing the largest part
of the wl_surface, or keeping the output they previously
chose. Having a stable presentation output association helps
clients predict future output refreshes (vblank).
The 'refresh' argument gives the compositor's prediction of how
many nanoseconds after tv_sec, tv_nsec the very next output
refresh may occur. This is to further aid clients in
predicting future refreshes, i.e., estimating the timestamps
targeting the next few vblanks. If such prediction cannot
usefully be done, the argument is zero.
For version 2 and later, if the output does not have a constant
refresh rate, explicit video mode switches excluded, then the
refresh argument must be either an appropriate rate picked by the
compositor (e.g. fastest rate), or 0 if no such rate exists.
For version 1, if the output does not have a constant refresh rate,
the refresh argument must be zero.
The 64-bit value combined from seq_hi and seq_lo is the value
of the output's vertical retrace counter when the content
update was first scanned out to the display. This value must
be compatible with the definition of MSC in
GLX_OML_sync_control specification. Note, that if the display
path has a non-zero latency, the time instant specified by
this counter may differ from the timestamp's.
If the output does not have a concept of vertical retrace or a
refresh cycle, or the output device is self-refreshing without
a way to query the refresh count, then the arguments seq_hi
and seq_lo must be zero.
Copyright
Copyright © 2014 Jonas Ådahl
Copyright © 2015 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.
protocol for relative pointer motion events
This protocol specifies a set of interfaces used for making clients able to
receive relative pointer events not obstructed by barriers (such as the
monitor edge or other pointer barriers).
To start receiving relative pointer events, a client must first bind the
global interface "wp_relative_pointer_manager" which, if a compositor
supports relative pointer motion events, is exposed by the registry. After
having created the relative pointer manager proxy object, the client uses
it to create the actual relative pointer object using the
"get_relative_pointer" request given a wl_pointer. The relative pointer
motion events will then, when applicable, be transmitted via the proxy of
the newly created relative pointer object. See the documentation of the
relative pointer interface for more details.
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 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
Version 1
Compositor Support
Version 1cage 0.3.0
cosmic 1.0.0
gamescope 3.15.14
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
wayfire 0.9.0
weston 15.0.1
get relative pointer objects
A global interface used for getting the relative pointer object for a
given pointer.
zwp_relative_pointer_manager_v1
request destroy()
Destructor
destroy the relative pointer manager object
Used by the client to notify the server that it will no longer use this
relative pointer manager object.
Version 1
relative pointer object
A wp_relative_pointer object is an extension to the wl_pointer interface
used for emitting relative pointer events. It shares the same focus as
wl_pointer objects of the same seat and will only emit events when it has
focus.
zwp_relative_pointer_v1
event relative_motion(
utime_hi: uint,
utime_lo: uint,
dx: fixed,
dy: fixed,
dx_unaccel: fixed,
dy_unaccel: fixed,
)- utime_hi — high 32 bits of a 64 bit timestamp with microsecond granularity
- utime_lo — low 32 bits of a 64 bit timestamp with microsecond granularity
- dx — the x component of the motion vector
- dy — the y component of the motion vector
- dx_unaccel — the x component of the unaccelerated motion vector
- dy_unaccel — the y component of the unaccelerated motion vector
relative pointer motion
Relative x/y pointer motion from the pointer of the seat associated with
this object.
A relative motion is in the same dimension as regular wl_pointer motion
events, except they do not represent an absolute position. For example,
moving a pointer from (x, y) to (x', y') would have the equivalent
relative motion (x' - x, y' - y). If a pointer motion caused the
absolute pointer position to be clipped by for example the edge of the
monitor, the relative motion is unaffected by the clipping and will
represent the unclipped motion.
This event also contains non-accelerated motion deltas. The
non-accelerated delta is, when applicable, the regular pointer motion
delta as it was before having applied motion acceleration and other
transformations such as normalization.
Note that the non-accelerated delta does not represent 'raw' events as
they were read from some device. Pointer motion acceleration is device-
and configuration-specific and non-accelerated deltas and accelerated
deltas may have the same value on some devices.
Relative motions are not coupled to wl_pointer.motion events, and can be
sent in combination with such events, but also independently. There may
also be scenarios where wl_pointer.motion is sent, but there is no
relative motion. The order of an absolute and relative motion event
originating from the same physical motion is not guaranteed.
If the client needs button events or focus state, it can receive them
from a wl_pointer object of the same seat that the wp_relative_pointer
object is associated with.
Copyright
Copyright © 2021 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
client security context manager
This interface allows a client to register a new Wayland connection to
the compositor and attach a security context to it.
This is intended to be used by sandboxes. Sandbox engines attach a
security context to all connections coming from inside the sandbox. The
compositor can then restrict the features that the sandboxed connections
can use.
Compositors should forbid nesting multiple security contexts by not
exposing wp_security_context_manager_v1 global to clients with a security
context attached, or by sending the nested protocol error. Nested
security contexts are dangerous because they can potentially allow
privilege escalation of a sandboxed client.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
wp_security_context_manager_v1
enum error {
invalid_listen_fd = 1,
nested = 2,
}- invalid_listen_fd — listening socket FD is invalid
- nested — nested security contexts are forbidden
wp_security_context_manager_v1
request create_listener(
id: new_id<wp_security_context_v1>,
listen_fd: fd,
close_fd: fd,
)- listen_fd — listening socket FD
- close_fd — FD signaling when done
create a new security context
Creates a new security context with a socket listening FD.
The compositor will accept new client connections on listen_fd.
listen_fd must be ready to accept new connections when this request is
sent by the client. In other words, the client must call bind(2) and
listen(2) before sending the FD.
close_fd is a FD that will signal hangup when the compositor should stop
accepting new connections on listen_fd.
The compositor must continue to accept connections on listen_fd when
the Wayland client which created the security context disconnects.
After sending this request, closing listen_fd and close_fd remains the
only valid operation on them.
Version 1
client security context
The security context allows a client to register a new client and attach
security context metadata to the connections.
When both are set, the combination of the application ID and the sandbox
engine must uniquely identify an application. The same application ID
will be used across instances (e.g. if the application is restarted, or
if the application is started multiple times).
When both are set, the combination of the instance ID and the sandbox
engine must uniquely identify a running instance of an application.
wp_security_context_v1
enum error {
already_used = 1,
already_set = 2,
invalid_metadata = 3,
}- already_used — security context has already been committed
- already_set — metadata has already been set
- invalid_metadata — metadata is invalid
Copyright
Copyright © 2022 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
single pixel buffer factory
This protocol extension allows clients to create single-pixel buffers.
Compositors supporting this protocol extension should also support the
viewporter protocol extension. Clients may use viewporter to scale a
single-pixel buffer to a desired size.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
Compositor Support
Version 1cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
muffin 6.7.4
mutter 51
phoc 0.55
river 0.3.13
sway 1.11
wayfire 0.9.0
weston 15.0.1
wp_single_pixel_buffer_manager_v1
request create_u32_rgba_buffer(
id: new_id<wl_buffer>,
r: uint,
g: uint,
b: uint,
a: uint,
)- r — value of the buffer's red channel
- g — value of the buffer's green channel
- b — value of the buffer's blue channel
- a — value of the buffer's alpha channel
create a 1×1 buffer from 32-bit RGBA values
Create a single-pixel buffer from four 32-bit RGBA values.
Unless specified in another protocol extension, the RGBA values use
pre-multiplied alpha.
The width and height of the buffer are 1.
The r, g, b and a arguments valid range is from UINT32_MIN (0)
to UINT32_MAX (0xffffffff).
These arguments should be interpreted as a percentage, i.e.
Copyright
Copyright 2014 © Stephen "Lyude" Chandler Paul
Copyright 2015-2024 © 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.
Wayland protocol for graphics tablets
This description provides a high-level overview of the interplay between
the interfaces defined this protocol. For details, see the protocol
specification.
More than one tablet may exist, and device-specifics matter. Tablets are
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
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
this indirection, we can avoid merging zwp_tablet_v2 into the actual Wayland
protocol, a long-term benefit.
The zwp_tablet_seat_v2 sends a "tablet added" event for each tablet
connected. That event is followed by descriptive events about the
hardware; currently that includes events for name, vid/pid and
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
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
events is terminated by a zwp_tablet_v2.done event to signal that a client
may now finalize any initialization for that tablet.
Events from tablets require a tool in proximity. Tools are also managed
by the tablet seat; a "tool added" event is sent whenever a tool is new
to the compositor. That event is followed by a number of descriptive
events about the hardware; currently that includes capabilities,
hardware id and serial number, and tool type. Similar to the tablet
interface, a zwp_tablet_tool_v2.done event is sent to terminate that initial
sequence.
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
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,
it's the usual motion, axis, button, etc. events. The protocol's
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
"tip touching the surface". For tablets without real proximity
detection, the sequence is: proximity_in, motion, down, frame.
When the tool leaves proximity, a proximity_out event is sent. If any
button is still down, a button release event is sent before this
proximity event. These button events are sent in the same frame as the
proximity event to signal to the client that the buttons were held when
the tool left proximity.
If the tool moves out of the surface but stays in proximity (i.e.
between windows), compositor-specific grab policies apply. This usually
means that the proximity-out is delayed until all buttons are released.
Moving a tool physically from one tablet to the other has no real effect
on the protocol, since we already have the tool object from the "tool
added" event. All the information is already there and the proximity
events on both tablets are all a client needs to reconstruct what
happened.
Some extra axes are normalized, i.e. the client knows the range as
specified in the protocol (e.g. [0, 65535]), the granularity however is
unknown. The current normalized axes are pressure, distance, and slider.
Other extra axes are in physical units as specified in the protocol.
The current extra axes with physical units are tilt, rotation and
wheel rotation.
Since tablets work independently of the pointer controlled by the mouse,
the focus handling is independent too and controlled by proximity.
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
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.
Tools are generally independent of tablets and it is
compositor-specific policy when a tool can be removed. Common approaches
will likely include some form of removing a tool when all tablets the
tool was used on are removed.
Version 2
Compositor Support
Version 2jay 1.14.0
kwin 6.7
mutter 51
Version 1cosmic 1.0.0
hyprland 0.52.1
labwc 0.20.2
muffin 6.7.4
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
wayfire 0.9.0
controller object for graphic tablet devices
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
actual tablets, use zwp_tablet_manager_v2.get_tablet_seat.
Version 2
zwp_tablet_seat_v2
event tablet_added(
id: new_id<zwp_tablet_v2>,
)- id — the newly added graphics tablet
new device notification
This event is sent whenever a new tablet becomes available on this
seat. This event only provides the object id of the tablet, any
static information about the tablet (device name, vid/pid, etc.) is
sent through the zwp_tablet_v2 interface.
zwp_tablet_seat_v2
event tool_added(
id: new_id<zwp_tablet_tool_v2>,
)- id — the newly added tablet tool
a new tool has been used with a tablet
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
of the tool; any static information about the tool (capabilities,
type, etc.) is sent through the zwp_tablet_tool_v2 interface.
zwp_tablet_seat_v2
event pad_added(
id: new_id<zwp_tablet_pad_v2>,
)new pad notification
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
sent immediately after the zwp_tablet_seat_v2.tablet_added.
However, some standalone pad devices logically attach to tablets at
runtime, and the client must wait for zwp_tablet_pad_v2.enter to know
the tablet a pad is attached to.
This event only provides the object id of the pad. All further
features (buttons, strips, rings) are sent through the zwp_tablet_pad_v2
interface.
Version 2
a physical tablet tool
An object that represents a physical tool that has been, or is
currently in use with a tablet in this seat. Each zwp_tablet_tool_v2
object stays valid until the client destroys it; the compositor
reuses the zwp_tablet_tool_v2 object to indicate that the object's
respective physical tool has come into proximity of a tablet again.
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
this capability, then the object represents a specific physical tool
and can be identified even when used on multiple tablets.
A tablet tool has a number of static characteristics, e.g. tool type,
hardware_serial and capabilities. These capabilities are sent in an
event sequence after the zwp_tablet_seat_v2.tool_added event before any
actual events from this tool. This initial event sequence is
terminated by a zwp_tablet_tool_v2.done event.
Tablet tool events are grouped by zwp_tablet_tool_v2.frame events.
Any events received before a zwp_tablet_tool_v2.frame event should be
considered part of the same hardware state change.
zwp_tablet_tool_v2
request set_cursor(
serial: uint,
surface: nullable object<wl_surface>,
hotspot_x: int,
hotspot_y: int,
)- serial — serial of the proximity_in event
- hotspot_x — surface-local x coordinate
- hotspot_y — surface-local y coordinate
set the tablet tool's surface
Sets the surface of the cursor used for this tool on the given
tablet. This request only takes effect if the tool is in proximity
of one of the requesting client's surfaces or the surface parameter
is the current pointer surface. If there was a previous surface set
with this request it is replaced. If surface is NULL, the cursor
image is hidden.
The parameters hotspot_x and hotspot_y define the position of the
pointer surface relative to the pointer location. Its top-left corner
is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the
coordinates of the pointer location, in surface-local coordinates.
On surface.attach requests to the pointer surface, hotspot_x and
hotspot_y are decremented by the x and y parameters passed to the
request. Attach must be confirmed by wl_surface.commit as usual.
The hotspot can also be updated by passing the currently set pointer
surface to this request with new values for hotspot_x and hotspot_y.
The current and pending input regions of the wl_surface are cleared,
and wl_surface.set_input_region is ignored until the wl_surface is no
longer used as the cursor. When the use as a cursor ends, the current
and pending input regions become undefined, and the wl_surface is
unmapped.
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
zwp_tablet_tool_v2. If the surface already has another role or has
previously been used as cursor surface for a different tool, a
protocol error is raised.
zwp_tablet_tool_v2
request destroy()
Destructor
destroy the tool object
This destroys the client's resource for this tool object.
zwp_tablet_tool_v2
enum type {
pen = 0x140,
eraser = 0x141,
brush = 0x142,
pencil = 0x143,
airbrush = 0x144,
finger = 0x145,
mouse = 0x146,
lens = 0x147,
}- pen — Pen
- eraser — Eraser
- brush — Brush
- pencil — Pencil
- airbrush — Airbrush
- finger — Finger
- mouse — Mouse
- lens — Lens
a physical tool type
Describes the physical type of a tool. The physical type of a tool
generally defines its base usage.
The mouse tool represents a mouse-shaped tool that is not a relative
device but bound to the tablet's surface, providing absolute
coordinates.
The lens tool is a mouse-shaped tool with an attached lens to
provide precision focus.
zwp_tablet_tool_v2
event type(
tool_type: uint<type>,
)- tool_type — the physical tool type
tool type
The tool type is the high-level type of the tool and usually decides
the interaction expected from this tool.
This event is sent in the initial burst of events before the
zwp_tablet_tool_v2.done event.
zwp_tablet_tool_v2
event hardware_serial(
hardware_serial_hi: uint,
hardware_serial_lo: uint,
)- hardware_serial_hi — the unique serial number of the tool, most significant bits
- hardware_serial_lo — the unique serial number of the tool, least significant bits
unique hardware serial number of the tool
If the physical tool can be identified by a unique 64-bit serial
number, this event notifies the client of this serial number.
If multiple tablets are available in the same seat and the tool is
uniquely identifiable by the serial number, that tool may move
between tablets.
Otherwise, if the tool has no serial number and this event is
missing, the tool is tied to the tablet it first comes into
proximity with. Even if the physical tool is used on multiple
tablets, separate zwp_tablet_tool_v2 objects will be created, one per
tablet.
This event is sent in the initial burst of events before the
zwp_tablet_tool_v2.done event.
zwp_tablet_tool_v2
event hardware_id_wacom(
hardware_id_hi: uint,
hardware_id_lo: uint,
)- hardware_id_hi — the hardware id, most significant bits
- hardware_id_lo — the hardware id, least significant bits
hardware id notification in Wacom's format
This event notifies the client of a hardware id available on this tool.
The hardware id is a device-specific 64-bit id that provides extra
information about the tool in use, beyond the wl_tool.type
enumeration. The format of the id is specific to tablets made by
Wacom Inc. For example, the hardware id of a Wacom Grip
Pen (a stylus) is 0x802.
This event is sent in the initial burst of events before the
zwp_tablet_tool_v2.done event.
zwp_tablet_tool_v2
enum capability {
tilt = 1,
pressure = 2,
distance = 3,
rotation = 4,
slider = 5,
wheel = 6,
}- tilt — Tilt axes
- pressure — Pressure axis
- distance — Distance axis
- rotation — Z-rotation axis
- slider — Slider axis
- wheel — Wheel axis
capability flags for a tool
Describes extra capabilities on a tablet.
Any tool must provide x and y values, extra axes are
device-specific.
zwp_tablet_tool_v2
event capability(
capability: uint<capability>,
)- capability — the capability
tool capability notification
This event notifies the client of any capabilities of this tool,
beyond the main set of x/y axes and tip up/down detection.
One event is sent for each extra capability available on this tool.
This event is sent in the initial burst of events before the
zwp_tablet_tool_v2.done event.
zwp_tablet_tool_v2
event done()
tool description events sequence complete
This event signals the end of the initial burst of descriptive
events. A client may consider the static description of the tool to
be complete and finalize initialization of the tool.
zwp_tablet_tool_v2
event removed()
tool removed
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
proximity later, a new zwp_tablet_tool_v2 object will be created.
It is compositor-dependent when a tool is removed. A compositor may
remove a tool on proximity out, tablet removal or any other reason.
A compositor may also keep a tool alive until shutdown.
If the tool is currently in proximity, a proximity_out event will be
sent before the removed event. See zwp_tablet_tool_v2.proximity_out for
the handling of any buttons logically down.
When this event is received, the client must zwp_tablet_tool_v2.destroy
the object.
zwp_tablet_tool_v2
event proximity_in(
serial: uint,
tablet: object<zwp_tablet_v2>,
surface: object<wl_surface>,
)- tablet — The tablet the tool is in proximity of
- surface — The current surface the tablet tool is over
proximity in event
Notification that this tool is focused on a certain surface.
This event can be received when the tool has moved from one surface to
another, or when the tool has come back into proximity above the
surface.
If any button is logically down when the tool comes into proximity,
the respective button event is sent after the proximity_in event but
within the same frame as the proximity_in event.
zwp_tablet_tool_v2
event proximity_out()
proximity out event
Notification that this tool has either left proximity, or is no
longer focused on a certain surface.
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
leaving proximity. These events are sent before the proximity_out
event but within the same zwp_tablet_v2.frame.
If the tool stays within proximity of the tablet, but the focus
changes from one surface to another, a button release event may not
be sent until the button is actually released or the tool leaves the
proximity of the tablet.
zwp_tablet_tool_v2
event down(
serial: uint,
)tablet tool is making contact
Sent whenever the tablet tool comes in contact with the surface of the
tablet.
If the tool is already in contact with the tablet when entering the
input region, the client owning said region will receive a
zwp_tablet_v2.proximity_in event, followed by a zwp_tablet_v2.down
event and a zwp_tablet_v2.frame event.
Note that this event describes logical contact, not physical
contact. On some devices, a compositor may not consider a tool in
logical contact until a minimum physical pressure threshold is
exceeded.
zwp_tablet_tool_v2
event up()
tablet tool is no longer making contact
Sent whenever the tablet tool stops making contact with the surface of
the tablet, or when the tablet tool moves out of the input region
and the compositor grab (if any) is dismissed.
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
ongoing grab on the surface, the client owning said region will
receive a zwp_tablet_v2.up event, followed by a zwp_tablet_v2.proximity_out
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
is dismissed in the future.
Note that this event describes logical contact, not physical
contact. On some devices, a compositor may not consider a tool out
of logical contact until physical pressure falls below a specific
threshold.
zwp_tablet_tool_v2
event motion(
x: fixed,
y: fixed,
)- x — surface-local x coordinate
- y — surface-local y coordinate
motion event
Sent whenever a tablet tool moves.
zwp_tablet_tool_v2
event pressure(
pressure: uint,
)- pressure — The current pressure value
pressure change event
Sent whenever the pressure axis on a tool changes. The value of this
event is normalized to a value between 0 and 65535.
Note that pressure may be nonzero even when a tool is not in logical
contact. See the down and up events for more details.
zwp_tablet_tool_v2
event distance(
distance: uint,
)- distance — The current distance value
distance change event
Sent whenever the distance axis on a tool changes. The value of this
event is normalized to a value between 0 and 65535.
Note that distance may be nonzero even when a tool is not in logical
contact. See the down and up events for more details.
zwp_tablet_tool_v2
event tilt(
tilt_x: fixed,
tilt_y: fixed,
)- tilt_x — The current value of the X tilt axis
- tilt_y — The current value of the Y tilt axis
tilt change event
Sent whenever one or both of the tilt axes on a tool change. Each tilt
value is in degrees, relative to the z-axis of the tablet.
The angle is positive when the top of a tool tilts along the
positive x or y axis.
zwp_tablet_tool_v2
event rotation(
degrees: fixed,
)- degrees — The current rotation of the Z axis
z-rotation change event
Sent whenever the z-rotation axis on the tool changes. The
rotation value is in degrees clockwise from the tool's
logical neutral position.
zwp_tablet_tool_v2
event slider(
position: int,
)- position — The current position of slider
Slider position change event
Sent whenever the slider position on the tool changes. The
value is normalized between -65535 and 65535, with 0 as the logical
neutral position of the slider.
The slider is available on e.g. the Wacom Airbrush tool.
zwp_tablet_tool_v2
event wheel(
degrees: fixed,
clicks: int,
)- degrees — The wheel delta in degrees
- clicks — The wheel delta in discrete clicks
Wheel delta event
Sent whenever the wheel on the tool emits an event. This event
contains two values for the same axis change. The degrees value is
in the same orientation as the wl_pointer.vertical_scroll axis. The
clicks value is in discrete logical clicks of the mouse wheel. This
value may be zero if the movement of the wheel was less
than one logical click.
Clients should choose either value and avoid mixing degrees and
clicks. The compositor may accumulate values smaller than a logical
click and emulate click events when a certain threshold is met.
Thus, zwp_tablet_tool_v2.wheel events with non-zero clicks values may
have different degrees values.
zwp_tablet_tool_v2
enum button_state {
released = 0,
pressed = 1,
}- released — button is not pressed
- pressed — button is pressed
physical button state
Describes the physical state of a button that produced the button event.
zwp_tablet_tool_v2
event button(
serial: uint,
button: uint,
state: uint<button_state>,
)- button — The button whose state has changed
- state — Whether the button was pressed or released
zwp_tablet_tool_v2
event frame(
time: uint,
)- time — The time of the event with millisecond granularity
frame event
Marks the end of a series of axis and/or button updates from the
tablet. The Wayland protocol requires axis updates to be sent
sequentially, however all events within a frame should be considered
one hardware event.
Version 2
- destroy — destroy the tablet object
- name — tablet device name
- id — tablet device vendor/product id
- path — path to the device
- done — tablet description events sequence complete
- removed — tablet removed event
- bustype — bus type
- bustype — tablet device bus type
graphics tablet device
The zwp_tablet_v2 interface represents one graphics tablet device. The
tablet interface itself does not generate events; all events are
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
pid/vid. These capabilities are sent in an event sequence after the
zwp_tablet_seat_v2.tablet_added event. This initial event sequence is
terminated by a zwp_tablet_v2.done event.
zwp_tablet_v2
request destroy()
Destructor
destroy the tablet object
This destroys the client's resource for this tablet object.
zwp_tablet_v2
event name(
name: string,
)tablet device name
A descriptive name for the tablet device.
If the device has no descriptive name, this event is not sent.
This event is sent in the initial burst of events before the
zwp_tablet_v2.done event.
zwp_tablet_v2
event id(
vid: uint,
pid: uint,
)- vid — vendor id
- pid — product id
tablet device vendor/product id
The vendor and product IDs for the tablet device.
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
vendor and product ID. If no zwp_tablet_v2.bustype is sent, the ID
is to be interpreted as USB vendor and product ID.
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 event is sent in the initial burst of events before the
zwp_tablet_v2.done event.
zwp_tablet_v2
event path(
path: string,
)- path — path to local device
path to the device
A system-specific device path that indicates which device is behind
this zwp_tablet_v2. This information may be used to gather additional
information about the device, e.g. through libwacom.
A device may have more than one device path. If so, multiple
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.
The format of the path is unspecified, it may be a device node, a
sysfs path, or some other identifier. It is up to the client to
identify the string provided.
This event is sent in the initial burst of events before the
zwp_tablet_v2.done event.
zwp_tablet_v2
event done()
tablet description events sequence complete
This event is sent immediately to signal the end of the initial
burst of descriptive events. A client may consider the static
description of the tablet to be complete and finalize initialization
of the tablet.
zwp_tablet_v2
event removed()
tablet removed event
Sent when the tablet has been removed from the system. When a tablet
is removed, some tools may be removed.
When this event is received, the client must zwp_tablet_v2.destroy
the object.
zwp_tablet_v2
enum bustype {
usb = 3,
bluetooth = 5,
virtual = 6,
serial = 17,
i2c = 24,
}Available since version 2
- usb — USB
- bluetooth — Bluetooth
- virtual — Virtual
- serial — Serial
- i2c — I2C
bus type
Describes the bus types this tablet is connected to.
zwp_tablet_v2
event bustype(
bustype: uint<bustype>,
)Available since version 2
tablet device bus type
The bustype argument is one of the BUS_ defines in the Linux kernel's
linux/input.h
If the device has no known bustype or the bustype cannot be
queried, this event is not sent.
This event is sent in the initial burst of events before the
zwp_tablet_v2.done event.
Version 2
pad ring
A circular interaction area, such as the touch ring on the Wacom Intuos
Pro series tablets.
Events on a ring are logically grouped by the zwp_tablet_pad_ring_v2.frame
event.
zwp_tablet_pad_ring_v2
request set_feedback(
description: string,
serial: uint,
)- description — ring description
- serial — serial of the mode switch event
set compositor feedback
Request that the compositor use the provided feedback string
associated with this ring. This request should be issued immediately
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
action. See zwp_tablet_pad_group_v2.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for
the actions associated with the ring; compositors may use this
information to offer visual feedback about the button layout
(eg. on-screen displays).
The provided string 'description' is a UTF-8 encoded string to be
associated with this ring, and is considered user-visible; general
internationalization rules apply.
The serial argument will be that of the last
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
ignored.
zwp_tablet_pad_ring_v2
enum source {
finger = 1,
}ring axis source
Describes the source types for ring events. This indicates to the
client how a ring event was physically generated; a client may
adjust the user interface accordingly. For example, events
from a "finger" source may trigger kinetic scrolling.
zwp_tablet_pad_ring_v2
event angle(
degrees: fixed,
)- degrees — the current angle in degrees
angle changed
Sent whenever the angle on a ring changes.
The angle is provided in degrees clockwise from the logical
north of the ring in the pad's current rotation.
Version 2
pad strip
A linear interaction area, such as the strips found in Wacom Cintiq
models.
Events on a strip are logically grouped by the zwp_tablet_pad_strip_v2.frame
event.
zwp_tablet_pad_strip_v2
request set_feedback(
description: string,
serial: uint,
)- description — strip description
- serial — serial of the mode switch event
set compositor feedback
Requests the compositor to use the provided feedback string
associated with this strip. This request should be issued immediately
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
action. See zwp_tablet_pad_group_v2.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for
the actions associated with the strip, and compositors may use this
information to offer visual feedback about the button layout
(eg. on-screen displays).
The provided string 'description' is a UTF-8 encoded string to be
associated with this ring, and is considered user-visible; general
internationalization rules apply.
The serial argument will be that of the last
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
ignored.
zwp_tablet_pad_strip_v2
enum source {
finger = 1,
}strip axis source
Describes the source types for strip events. This indicates to the
client how a strip event was physically generated; a client may
adjust the user interface accordingly. For example, events
from a "finger" source may trigger kinetic scrolling.
zwp_tablet_pad_strip_v2
event position(
position: uint,
)- position — the current position
position changed
Sent whenever the position on a strip changes.
The position is normalized to a range of [0, 65535], the 0-value
represents the top-most and/or left-most position of the strip in
the pad's current rotation.
Version 2
- destroy — destroy the pad object
- buttons — buttons announced
- ring — ring announced
- strip — strip announced
- modes — mode-switch ability announced
- done — tablet group description events sequence complete
- mode_switch — mode switch event
- dial — dial announced
a set of buttons, rings and strips
A pad group describes a distinct (sub)set of buttons, rings and strips
present in the tablet. The criteria of this grouping is usually positional,
eg. if a tablet has buttons on the left and right side, 2 groups will be
presented. The physical arrangement of groups is undisclosed and may
change on the fly.
Pad groups will announce their features during pad initialization. Between
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,
plus the number of supported modes.
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
persistent across device plugs. The current mode is user-switchable, it
will be announced through the zwp_tablet_pad_group_v2.mode_switch event both
whenever it is switched, and after zwp_tablet_pad_v2.enter.
The current mode logically applies to all elements in the pad group,
although it is at clients' discretion whether to actually perform different
actions, and/or issue the respective .set_feedback requests to notify the
compositor. See the zwp_tablet_pad_group_v2.mode_switch event for more details.
zwp_tablet_pad_group_v2
event buttons(
buttons: array,
)- buttons — buttons in this group
buttons announced
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
in one group at a time.
This event is first sent in the initial burst of events before the
zwp_tablet_pad_group_v2.done event.
Some buttons are reserved by the compositor. These buttons may not be
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.
If the compositor happens to reserve all buttons in a group, this event
will be sent with an empty array.
zwp_tablet_pad_group_v2
event done()
tablet group description events sequence complete
This event is sent immediately to signal the end of the initial
burst of descriptive events. A client may consider the static
description of the tablet to be complete and finalize initialization
of the tablet group.
zwp_tablet_pad_group_v2
event mode_switch(
time: uint,
serial: uint,
mode: uint,
)- time — the time of the event with millisecond granularity
- mode — the new mode of the pad
mode switch event
Notification that the mode was switched.
A mode applies to all buttons, rings, strips and dials in a group
simultaneously, but a client is not required to assign different actions
for each mode. For example, a client may have mode-specific button
mappings but map the ring to vertical scrolling in all modes. Mode
indices start at 0.
Switching modes is compositor-dependent. The compositor may provide
visual cues to the user about the mode, e.g. by toggling LEDs on
the tablet device. Mode-switching may be software-controlled or
controlled by one or more physical buttons. For example, on a Wacom
Intuos Pro, the button inside the ring may be assigned to switch
between modes.
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
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
previous mode, the client should immediately issue a
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
in the previous mode, the client should immediately issue a
zwp_tablet_ring_v2.set_feedback, zwp_tablet_strip_v2.set_feedback or
zwp_tablet_dial_v2.set_feedback request for each changed ring, strip or dial.
Version 2
a set of buttons, rings, strips and dials
A pad device is a set of buttons, rings, strips and dials
usually physically present on the tablet device itself. Some
exceptions exist where the pad device is physically detached, e.g. the
Wacom ExpressKey Remote.
Pad devices have no axes that control the cursor and are generally
auxiliary devices to the tool devices used on the tablet surface.
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
zwp_tablet_seat_v2.pad_added event before any actual events from this pad.
This initial event sequence is terminated by a zwp_tablet_pad_v2.done
event.
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
notified through the zwp_tablet_pad_v2.group event; the compositor will
emit one event per group before emitting zwp_tablet_pad_v2.done.
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,
although different groups may have different active modes.
zwp_tablet_pad_v2
request set_feedback(
button: uint,
description: string,
serial: uint,
)- button — button index
- description — button description
- serial — serial of the mode switch event
set compositor feedback
Requests the compositor to use the provided feedback string
associated with this button. This request should be issued immediately
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
action. See zwp_tablet_pad_group_v2.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for
the actions associated with each button, and compositors may use
this information to offer visual feedback on the button layout
(e.g. on-screen displays).
Button indices start at 0. Setting the feedback string on a button
that is reserved by the compositor (i.e. not belonging to any
zwp_tablet_pad_group_v2) does not generate an error but the compositor
is free to ignore the request.
The provided string 'description' is a UTF-8 encoded string to be
associated with this ring, and is considered user-visible; general
internationalization rules apply.
The serial argument will be that of the last
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
be ignored.
zwp_tablet_pad_v2
event path(
path: string,
)- path — path to local device
path to the device
A system-specific device path that indicates which device is behind
this zwp_tablet_pad_v2. This information may be used to gather additional
information about the device, e.g. through libwacom.
The format of the path is unspecified, it may be a device node, a
sysfs path, or some other identifier. It is up to the client to
identify the string provided.
This event is sent in the initial burst of events before the
zwp_tablet_pad_v2.done event.
zwp_tablet_pad_v2
event buttons(
buttons: uint,
)- buttons — the number of buttons
buttons announced
Sent on zwp_tablet_pad_v2 initialization to announce the available
buttons.
This event is sent in the initial burst of events before the
zwp_tablet_pad_v2.done event. This event is only sent when at least one
button is available.
zwp_tablet_pad_v2
event done()
pad description event sequence complete
This event signals the end of the initial burst of descriptive
events. A client may consider the static description of the pad to
be complete and finalize initialization of the pad.
zwp_tablet_pad_v2
enum button_state {
released = 0,
pressed = 1,
}- released — the button is not pressed
- pressed — the button is pressed
physical button state
Describes the physical state of a button that caused the button
event.
zwp_tablet_pad_v2
event button(
time: uint,
button: uint,
state: uint<button_state>,
)- time — the time of the event with millisecond granularity
- button — the index of the button that changed state
physical button state
Sent whenever the physical state of a button changes.
zwp_tablet_pad_v2
event enter(
serial: uint,
tablet: object<zwp_tablet_v2>,
surface: object<wl_surface>,
)- serial — serial number of the enter event
- tablet — the tablet the pad is attached to
- surface — surface the pad is focused on
enter event
Notification that this pad is focused on the specified surface.
zwp_tablet_pad_v2
event leave(
serial: uint,
surface: object<wl_surface>,
)- serial — serial number of the leave event
- surface — surface the pad is no longer focused on
leave event
Notification that this pad is no longer focused on the specified
surface.
zwp_tablet_pad_v2
event removed()
pad removed event
Sent when the pad has been removed from the system. When a tablet
is removed its pad(s) will be removed too.
When this event is received, the client must destroy all rings, strips
and groups that were offered by this pad, and issue zwp_tablet_pad_v2.destroy
the pad itself.
Version 2
zwp_tablet_pad_dial_v2
request set_feedback(
description: string,
serial: uint,
)- description — dial description
- serial — serial of the mode switch event
set compositor feedback
Requests the compositor to use the provided feedback string
associated with this dial. This request should be issued immediately
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
action. See zwp_tablet_pad_group_v2.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for
the actions associated with the dial, and compositors may use this
information to offer visual feedback about the button layout
(eg. on-screen displays).
The provided string 'description' is a UTF-8 encoded string to be
associated with this ring, and is considered user-visible; general
internationalization rules apply.
The serial argument will be that of the last
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
ignored.
zwp_tablet_pad_dial_v2
event delta(
value120: int,
)- value120 — rotation distance as fraction of 120
delta movement
Sent whenever the position on a dial changes.
This event carries the wheel delta as multiples or fractions
of 120 with each multiple of 120 representing one logical wheel detent.
For example, an axis_value120 of 30 is one quarter of
a logical wheel step in the positive direction, a value120 of
-240 are two logical wheel steps in the negative direction within the
same hardware event. See the wl_pointer.axis_value120 for more details.
The value120 must not be zero.
Copyright
Copyright © 2021 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
river 0.3.13
sway 1.11
weston 15.0.1
protocol for tearing control
For some use cases like games or drawing tablets it can make sense to
reduce latency by accepting tearing with the use of asynchronous page
flips. This global is a factory interface, allowing clients to inform
which type of presentation the content of their surfaces is suitable for.
Graphics APIs like EGL or Vulkan, that manage the buffer queue and commits
of a wl_surface themselves, are likely to be using this extension
internally. If a client is using such an API for a wl_surface, it should
not directly use this extension on that surface, to avoid raising a
tearing_control_exists protocol error.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
per-surface tearing control interface
An additional interface to a wl_surface object, which allows the client
to hint to the compositor if the content on the surface is suitable for
presentation with tearing.
The default presentation hint is vsync. See presentation_hint for more
details.
If the associated wl_surface is destroyed, this object becomes inert and
should be destroyed.
wp_tearing_control_v1
enum presentation_hint {
vsync = 0,
async = 1,
}- vsync
tearing-free presentation
The content of this surface is meant to be synchronized to the
vertical blanking period. This should not result in visible tearing
and may result in a delay before a surface commit is presented.
- async
asynchronous presentation
The content of this surface is meant to be presented with minimal
latency and tearing is acceptable.
presentation hint values
This enum provides information for if submitted frames from the client
may be presented with tearing.
Copyright
Copyright © 2012, 2013 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
text input
An object used for text input. Adds support for text input and input
methods to applications. A text_input object is created from a
wl_text_input_manager and corresponds typically to a text entry in an
application.
Requests are used to activate/deactivate the text_input object and set
state information like surrounding and selected text or the content type.
The information about entered text is sent to the text_input object via
the pre-edit and commit events. Using this interface removes the need
for applications to directly process hardware key events and compose text
out of them.
Text is generally UTF-8 encoded, indices and lengths are in bytes.
Serials are used to synchronize the state between the text input and
an input method. New serials are sent by the text input in the
commit_state request and are used by the input method to indicate
the known text input state in events like preedit_string, commit_string,
and keysym. The text input can then ignore events from the input method
which are based on an outdated state (for example after a reset).
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
zwp_text_input_v1
request activate(
seat: object<wl_seat>,
surface: object<wl_surface>,
)request activation
Requests the text_input object to be activated (typically when the
text entry gets focus).
The seat argument is a wl_seat which maintains the focus for this
activation. The surface argument is a wl_surface assigned to the
text_input object and tracked for focus lost. The enter event
is emitted on successful activation.
zwp_text_input_v1
request deactivate(
seat: object<wl_seat>,
)request deactivation
Requests the text_input object to be deactivated (typically when the
text entry lost focus). The seat argument is a wl_seat which was used
for activation.
zwp_text_input_v1
request reset()
reset
Should be called by an editor widget when the input state should be
reset, for example after the text was changed outside of the normal
input method flow.
zwp_text_input_v1
request set_surrounding_text(
text: string,
cursor: uint,
anchor: uint,
)sets the surrounding text
Sets the plain surrounding text around the input position. Text is
UTF-8 encoded. Cursor is the byte offset within the
surrounding text. Anchor is the byte offset of the
selection anchor within the surrounding text. If there is no selected
text anchor, then it is the same as cursor.
zwp_text_input_v1
enum content_hint {
none = 0x0,
default = 0x7,
password = 0xc0,
auto_completion = 0x1,
auto_correction = 0x2,
auto_capitalization = 0x4,
lowercase = 0x8,
uppercase = 0x10,
titlecase = 0x20,
hidden_text = 0x40,
sensitive_data = 0x80,
latin = 0x100,
multiline = 0x200,
}This is a bitfield
- none — no special behaviour
- default — auto completion, correction and capitalization
- password — hidden and sensitive text
- auto_completion — suggest word completions
- auto_correction — suggest word corrections
- auto_capitalization — switch to uppercase letters at the start of a sentence
- lowercase — prefer lowercase letters
- uppercase — prefer uppercase letters
- titlecase — prefer casing for titles and headings (can be language dependent)
- hidden_text — characters should be hidden
- sensitive_data — typed text should not be stored
- latin — just latin characters should be entered
- multiline — the text input is multiline
content hint
Content hint is a bitmask to allow to modify the behavior of the text
input.
zwp_text_input_v1
enum content_purpose {
normal = 0,
alpha = 1,
digits = 2,
number = 3,
phone = 4,
url = 5,
email = 6,
name = 7,
password = 8,
date = 9,
time = 10,
datetime = 11,
terminal = 12,
}- normal — default input, allowing all characters
- alpha — allow only alphabetic characters
- digits — allow only digits
- number — input a number (including decimal separator and sign)
- phone — input a phone number
- url — input an URL
- email — input an email address
- name — input a name of a person
- password — input a password (combine with password or sensitive_data hint)
- date — input a date
- time — input a time
- datetime — input a date and time
- terminal — input for a terminal
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.
zwp_text_input_v1
request set_content_type(
hint: uint<content_hint>,
purpose: uint<content_purpose>,
)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.
When no content type is explicitly set, a normal content purpose with
default hints (auto completion, auto correction, auto capitalization)
should be assumed.
zwp_text_input_v1
request set_preferred_language(
language: string,
)sets preferred language
Sets a specific language. This allows for example a virtual keyboard to
show a language specific layout. The "language" argument is an RFC-3066
format language tag.
It could be used for example in a word processor to indicate the
language of the currently edited document or in an instant message
application which tracks languages of contacts.
zwp_text_input_v1
event enter(
surface: object<wl_surface>,
)enter event
Notify the text_input object when it received focus. Typically in
response to an activate request.
zwp_text_input_v1
event leave()
leave event
Notify the text_input object when it lost focus. Either in response
to a deactivate request or when the assigned surface lost focus or was
destroyed.
zwp_text_input_v1
event modifiers_map(
map: array,
)modifiers map
Transfer an array of 0-terminated modifier names. The position in
the array is the index of the modifier as used in the modifiers
bitmask in the keysym event.
zwp_text_input_v1
event preedit_string(
serial: uint,
text: string,
commit: string,
)- serial — serial of the latest known text input state
pre-edit
Notify when a new composing text (pre-edit) should be set around the
current cursor position. Any previously set composing text should
be removed.
The commit text can be used to replace the preedit text on reset
(for example on unfocus).
The text input should also handle all preedit_style and preedit_cursor
events occurring directly before preedit_string.
zwp_text_input_v1
enum preedit_style {
default = 0,
none = 1,
active = 2,
inactive = 3,
highlight = 4,
underline = 5,
selection = 6,
incorrect = 7,
}- default — default style for composing text
- none — style should be the same as in non-composing text
zwp_text_input_v1
event preedit_styling(
index: uint,
length: uint,
style: uint<preedit_style>,
)pre-edit styling
Sets styling information on composing text. The style is applied for
length bytes from index relative to the beginning of the composing
text (as byte offset). Multiple styles can
be applied to a composing text by sending multiple preedit_styling
events.
This event is handled as part of a following preedit_string event.
zwp_text_input_v1
event preedit_cursor(
index: int,
)pre-edit cursor
Sets the cursor position inside the composing text (as byte
offset) relative to the start of the composing text. When index is a
negative number no cursor is shown.
This event is handled as part of a following preedit_string event.
zwp_text_input_v1
event commit_string(
serial: uint,
text: string,
)- serial — serial of the latest known text input state
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). It could also be an empty text
when some text should be removed (see delete_surrounding_text) or when
the input cursor should be moved (see cursor_position).
Any previously set composing text should be removed.
zwp_text_input_v1
event cursor_position(
index: int,
anchor: int,
)set cursor to new position
Notify when the cursor or anchor position should be modified.
This event should be handled as part of a following commit_string
event.
zwp_text_input_v1
event delete_surrounding_text(
index: int,
length: uint,
)delete surrounding text
Notify when the text around the current cursor position should be
deleted.
Index is relative to the current cursor (in bytes).
Length is the length of deleted text (in bytes).
This event should be handled as part of a following commit_string
event.
zwp_text_input_v1
event keysym(
serial: uint,
time: uint,
sym: uint,
state: uint,
modifiers: uint,
)- serial — serial of the latest known text input state
keysym
Notify when a key event was sent. Key events should not be used
for normal text input operations, which should be done with
commit_string, delete_surrounding_text, etc. The key event follows
the wl_keyboard key event convention. Sym is an XKB keysym, state a
wl_keyboard key_state. Modifiers are a mask for effective modifiers
(where the modifier indices are set by the modifiers_map event)
zwp_text_input_v1
event language(
serial: uint,
language: string,
)- serial — serial of the latest known text input state
language
Sets the language of the input text. The "language" argument is an
RFC-3066 format language tag.
zwp_text_input_v1
enum text_direction {
auto = 0,
ltr = 1,
rtl = 2,
}- auto — automatic text direction based on text and language
- ltr — left-to-right
- rtl — right-to-left
zwp_text_input_v1
event text_direction(
serial: uint,
direction: uint<text_direction>,
)- serial — serial of the latest known text input state
text direction
Sets the text direction of input text.
It is mainly needed for showing an input cursor on the correct side of
the editor when there is no input done yet and making sure neutral
direction text is laid out properly.
Version 1
Compositor Support
Version 1hyprland 0.52.1
mir 2.26
treeland 0.8.0
weston 15.0.1
text input manager
A factory for text_input objects. This object is a global singleton.
Copyright
Copyright © 2012, 2013 Intel Corporation
Copyright © 2015, 2016 Jan Arne Petersen
Copyright © 2017, 2018 Red Hat, Inc.
Copyright © 2018 Purism SPC
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Version 2
text input
The zwp_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
zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused
surface must commit zwp_text_input_v3.enable and
zwp_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.
zwp_text_input_v3
request destroy()
Destructor
Destroy the wp_text_input
Destroy the wp_text_input object. Also disables all surfaces enabled
through this wp_text_input object.
zwp_text_input_v3
request enable()
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 focused text input changes
to a new one, including within the current surface. Use
zwp_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.
Requests to enable a text input when another text input is enabled
on the same seat 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, and delete_surrounding_text 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 zwp_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
zwp_text_input_v3.commit request.
zwp_text_input_v3
request disable()
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 zwp_text_input_v3.commit request.
zwp_text_input_v3
request set_surrounding_text(
text: string,
cursor: int,
anchor: int,
)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 zwp_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.
zwp_text_input_v3
enum change_cause {
input_method = 0,
other = 1,
}- input_method — input method caused the change
- other — something else than the input method caused the change
text change reason
Reason for the change of surrounding text or cursor posision.
zwp_text_input_v3
request set_text_change_cause(
cause: uint<change_cause>,
)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 zwp_text_input_v3.commit request.
The initial value of cause is input_method.
zwp_text_input_v3
enum content_hint {
none = 0x0,
completion = 0x1,
spellcheck = 0x2,
auto_capitalization = 0x4,
lowercase = 0x8,
uppercase = 0x10,
titlecase = 0x20,
hidden_text = 0x40,
sensitive_data = 0x80,
latin = 0x100,
multiline = 0x200,
on_screen_input_provided = 0x400,
no_emoji = 0x800,
preedit_shown = 0x1000,
}This is a bitfield
- none — no special behavior
- completion — suggest word completions
- spellcheck — suggest word corrections
- auto_capitalization — switch to uppercase letters at the start of a sentence
- lowercase — prefer lowercase letters
- uppercase — prefer uppercase letters
- titlecase — prefer casing for titles and headings (can be language dependent)
- hidden_text — characters should be hidden
- sensitive_data — typed text should not be stored
- latin — just Latin characters should be entered
- multiline — the text input is multiline
- on_screen_input_provided — an on-screen way to fill in the input is already provided by the client
Available since version 2
- no_emoji — prefer not offering emoji support
Available since version 2
- preedit_shown — the text input will display preedit text in place
Available since version 2
content hint
Content hint is a bitmask to allow to modify the behavior of the text
input.
zwp_text_input_v3
enum content_purpose {
normal = 0,
alpha = 1,
digits = 2,
number = 3,
phone = 4,
url = 5,
email = 6,
name = 7,
password = 8,
pin = 9,
date = 10,
time = 11,
datetime = 12,
terminal = 13,
}- normal — default input, allowing all characters
- alpha — allow only alphabetic characters
- digits — allow only digits
- number — input a number (including decimal separator and sign)
- phone — input a phone number
- url — input an URL
- email — input an email address
- name — input a name of a person
- password — input a password (combine with sensitive_data hint)
- pin — input is a numeric password (combine with sensitive_data hint)
- date — input a date
- time — input a time
- datetime — input a date and time
- terminal — input for a terminal
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.
zwp_text_input_v3
request set_content_type(
hint: uint<content_hint>,
purpose: uint<content_purpose>,
)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 zwp_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.
zwp_text_input_v3
request set_cursor_rectangle(
x: int,
y: int,
width: int,
height: int,
)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 zwp_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.
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.
zwp_text_input_v3
request commit()
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 zwp_text_input_v3 object and use the count as the serial in done
events.
zwp_text_input_v3
event enter(
surface: object<wl_surface>,
)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.
zwp_text_input_v3
event leave(
surface: object<wl_surface>,
)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.
zwp_text_input_v3
event preedit_string(
text: nullable string,
cursor_begin: int,
cursor_end: int,
)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 zwp_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.
zwp_text_input_v3
event commit_string(
text: nullable string,
)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 zwp_text_input_v3.done event.
The initial value of text is an empty string.
zwp_text_input_v3
event delete_surrounding_text(
before_length: uint,
after_length: uint,
)- before_length — length of text before current cursor position
- after_length — length of text after current cursor position
delete surrounding text
Notify when the text around the current cursor position should be
deleted.
Before_length and after_length are the number of bytes before and after
the current cursor index (excluding the selection) to delete.
If a preedit text is present, in effect before_length is counted from
the beginning of it, and after_length from its end (see done event
sequence).
Values set with this event are double-buffered. They must be applied
and reset to initial on the next zwp_text_input_v3.done event.
The initial values of both before_length and after_length are 0.
zwp_text_input_v3
event done(
serial: uint,
)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:
Replace existing preedit string with the cursor.
Delete requested surrounding text.
Insert commit string with the cursor at its end.
Calculate surrounding text to send.
Insert new preedit text in cursor position.
Place cursor inside preedit text.
Perform the requested action.
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
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 zwp_text_input_v3 object. All pending state requests
(set_surrounding_text, set_content_type and set_cursor_rectangle) on
the zwp_text_input_v3 object should be sent and committed after
receiving a zwp_text_input_v3.done event with a matching serial.
zwp_text_input_v3
enum error {
invalid_action = 0,
}Available since version 2
- invalid_action — an invalid or duplicate action was specified
zwp_text_input_v3
enum action {
none = 0,
submit = 1,
}Available since version 2
- none — no action
- submit — the action is submitted
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.
zwp_text_input_v3
event action(
action: uint<action>,
serial: uint,
)Available since version 2
- action — action performed
- serial — serial number of the action event
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.
zwp_text_input_v3
event language(
language: string,
)Available since version 2
- language — new language set by IME
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.
zwp_text_input_v3
request set_available_actions(
available_actions: array,
)Available since version 2
- available_actions — available actions
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.
zwp_text_input_v3
request show_input_panel()
Available since version 2
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.
zwp_text_input_v3
request hide_input_panel()
Available since version 2
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.
zwp_text_input_v3
enum preedit_hint {
whole = 1,
selection = 2,
prediction = 3,
prefix = 4,
suffix = 5,
spelling_error = 6,
compose_error = 7,
}- whole — simple pre-edit text style, typically underlined
- selection — hint for a selected piece of text, e.g. per-character navigation and composition
- prediction — predicted text, not typed by the user
- prefix — prefixed text not being currently edited, e.g. prior to a 'selection' section
- suffix — suffixed text not being currently edited, e.g. after a 'selection' section
- spelling_error — spelling error
- compose_error — wrong composition, e.g. user input that can not be transliterated
preedit style hint
Style hints for the preedit string.
zwp_text_input_v3
event preedit_hint(
start: uint,
end: uint,
hint: uint<preedit_hint>,
)Available since version 2
- start — starting point of the affected substring
- end — end point of the affected substring
- hint — hint to apply
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.
Version 2
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
mir 2.26
muffin 6.7.4
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
text input manager
A factory for text-input objects. This object is a global singleton.
Copyright
Copyright © 2013-2016 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
weston 15.0.1
surface cropping and scaling
The global interface exposing surface cropping and scaling
capabilities is used to instantiate an interface extension for a
wl_surface object. This extended interface will then allow
cropping and scaling the surface contents, effectively
disconnecting the direct relationship between the buffer and the
surface size.
wp_viewporter
request destroy()
Destructor
unbind from the cropping and scaling interface
Informs the server that the client will not be using this
protocol object anymore. This does not affect any other objects,
wp_viewport objects included.
wp_viewporter
enum error {
viewport_exists = 0,
}- viewport_exists — the surface already has a viewport object associated
wp_viewporter
request get_viewport(
id: new_id<wp_viewport>,
surface: object<wl_surface>,
)- id — the new viewport interface id
- surface — the surface
extend surface interface for crop and scale
Instantiate an interface extension for the given wl_surface to
crop and scale its content. If the given wl_surface already has
a wp_viewport object associated, the viewport_exists
protocol error is raised.
Version 1
crop and scale interface to a wl_surface
An additional interface to a wl_surface object, which allows the
client to specify the cropping and scaling of the surface
contents.
This interface works with two concepts: the source rectangle (src_x,
src_y, src_width, src_height), and the destination size (dst_width,
dst_height). The contents of the source rectangle are scaled to the
destination size, and content outside the source rectangle is ignored.
This state is double-buffered, see wl_surface.commit.
The two parts of crop and scale state are independent: the source
rectangle, and the destination size. Initially both are unset, that
is, no scaling is applied. The whole of the current wl_buffer is
used as the source, and the surface size is as defined in
wl_surface.attach.
If the destination size is set, it causes the surface size to become
dst_width, dst_height. The source (rectangle) is scaled to exactly
this size. This overrides whatever the attached wl_buffer size is,
unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
has no content and therefore no size. Otherwise, the size is always
at least 1x1 in surface local coordinates.
If the source rectangle is set, it defines what area of the wl_buffer is
taken as the source. If the source rectangle is set and the destination
size is not set, then src_width and src_height must be integers, and the
surface size becomes the source rectangle size. This results in cropping
without scaling. If src_width or src_height are not integers and
destination size is not set, the bad_size protocol error is raised when
the surface state is applied.
The coordinate transformations from buffer pixel coordinates up to
the surface-local coordinates happen in the following order:
buffer_transform (wl_surface.set_buffer_transform)
buffer_scale (wl_surface.set_buffer_scale)
crop and scale (wp_viewport.set*)
This means, that the source rectangle coordinates of crop and scale
are given in the coordinates after the buffer transform and scale,
i.e. in the coordinates that would be the surface-local coordinates
if the crop and scale was not applied.
If src_x or src_y are negative, the bad_value protocol error is raised.
Otherwise, if the source rectangle is partially or completely outside of
the non-NULL wl_buffer, then the out_of_buffer protocol error is raised
when the surface state is applied. A NULL wl_buffer does not raise the
out_of_buffer error.
If the wl_surface associated with the wp_viewport is destroyed,
all wp_viewport requests except 'destroy' raise the protocol error
no_surface.
If the wp_viewport object is destroyed, the crop and scale
state is removed from the wl_surface. The change will be applied
on the next wl_surface.commit.
wp_viewport
enum error {
bad_value = 0,
bad_size = 1,
out_of_buffer = 2,
no_surface = 3,
}- bad_value — negative or zero values in width or height
- bad_size — destination size is not integer
- out_of_buffer — source rectangle extends outside of the content area
- no_surface — the wl_surface was destroyed
wp_viewport
request set_source(
x: fixed,
y: fixed,
width: fixed,
height: fixed,
)- x — source rectangle x
- y — source rectangle y
- width — source rectangle width
- height — source rectangle height
set the source rectangle for cropping
Set the source rectangle of the associated wl_surface. See
wp_viewport for the description, and relation to the wl_buffer
size.
If all of x, y, width and height are -1.0, the source rectangle is
unset instead. Any other set of values where width or height are zero
or negative, or x or y are negative, raise the bad_value protocol
error.
The crop and scale state is double-buffered, see wl_surface.commit.
wp_viewport
request set_destination(
width: int,
height: int,
)- width — surface width
- height — surface height
set the surface size for scaling
Set the destination size of the associated wl_surface. See
wp_viewport for the description, and relation to the wl_buffer
size.
If width is -1 and height is -1, the destination size is unset
instead. Any other pair of values for width and height that
contains zero or negative values raises the bad_value protocol
error.
The crop and scale state is double-buffered, see wl_surface.commit.
Copyright
Copyright © 2015, 2016 Red Hat
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Primary selection protocol
This protocol provides the ability to have a primary selection device to
match that of the X server. This primary selection is a shortcut to the
common clipboard selection, where text just needs to be selected in order
to allow copying it elsewhere. The de facto way to perform this action
is the middle mouse button, although it is not limited to this one.
Clients wishing to honor primary selection should create a primary
selection source and set it as the selection through
wp_primary_selection_device.set_selection whenever the text selection
changes. In order to minimize calls in pointer-driven text selection,
it should happen only once after the operation finished. Similarly,
a NULL source should be set when text is unselected.
wp_primary_selection_offer objects are first announced through the
wp_primary_selection_device.data_offer event. Immediately after this event,
the primary data offer will emit wp_primary_selection_offer.offer events
to let know of the mime types being offered.
When the primary selection changes, the client with the keyboard focus
will receive wp_primary_selection_device.selection events. Only the client
with the keyboard focus will receive such events with a non-NULL
wp_primary_selection_offer. Across keyboard focus changes, previously
focused clients will receive wp_primary_selection_device.events with a
NULL wp_primary_selection_offer.
In order to request the primary selection data, the client must pass
a recent serial pertaining to the press event that is triggering the
operation, if the compositor deems the serial valid and recent, the
wp_primary_selection_source.send event will happen in the other end
to let the transfer begin. The client owning the primary selection
should write the requested data, and close the file descriptor
immediately.
If the primary selection owner client disappeared during the transfer,
the client reading the data will receive a
wp_primary_selection_device.selection event with a NULL
wp_primary_selection_offer, the client should take this as a hint
to finish the reads related to the no longer existing offer.
The primary selection owner should be checking for errors during
writes, merely cancelling the ongoing transfer if any happened.
Version 1
- create_source — create a new primary selection source
- get_device — create a new primary selection device
- destroy — destroy the primary selection device manager
Compositor Support
Version 1cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
X primary selection emulation
The primary selection device manager is a singleton global object that
provides access to the primary selection. It allows to create
wp_primary_selection_source objects, as well as retrieving the per-seat
wp_primary_selection_device objects.
Version 1
zwp_primary_selection_device_v1
request set_selection(
source: nullable object<zwp_primary_selection_source_v1>,
serial: uint,
)- serial — serial of the event that triggered this request
set the primary selection
Replaces the current selection. The previous owner of the primary
selection will receive a wp_primary_selection_source.cancelled event.
To unset the selection, set the source to NULL.
zwp_primary_selection_device_v1
event data_offer(
offer: new_id<zwp_primary_selection_offer_v1>,
)introduce a new wp_primary_selection_offer
Introduces a new wp_primary_selection_offer object that may be used
to receive the current primary selection. Immediately following this
event, the new wp_primary_selection_offer object will send
wp_primary_selection_offer.offer events to describe the offered mime
types.
zwp_primary_selection_device_v1
event selection(
id: nullable object<zwp_primary_selection_offer_v1>,
)advertise a new primary selection
The wp_primary_selection_device.selection event is sent to notify the
client of a new primary selection. This event is sent after the
wp_primary_selection.data_offer event introducing this object, and after
the offer has announced its mimetypes through
wp_primary_selection_offer.offer.
The data_offer is valid until a new offer or NULL is received
or until the client loses keyboard focus. The client must destroy the
previous selection data_offer, if any, upon receiving this event.
Version 1
- receive — request that the data is transferred
- destroy — destroy the primary selection offer
- offer — advertise offered mime type
offer to transfer primary selection contents
A wp_primary_selection_offer represents an offer to transfer the contents
of the primary selection clipboard to the client. Similar to
wl_data_offer, the offer also describes the mime types that the data can
be converted to and provides the mechanisms for transferring the data
directly to the client.
zwp_primary_selection_offer_v1
request receive(
mime_type: string,
fd: fd,
)request that the data is transferred
To transfer the contents of the primary selection clipboard, the client
issues this request and indicates the mime type that it wants to
receive. The transfer happens through the passed file descriptor
(typically created with the pipe system call). The source client writes
the data in the mime type representation requested and then closes the
file descriptor.
The receiving client reads from the read end of the pipe until EOF and
closes its end, at which point the transfer is complete.
zwp_primary_selection_offer_v1
event offer(
mime_type: string,
)advertise offered mime type
Sent immediately after creating announcing the
wp_primary_selection_offer through
wp_primary_selection_device.data_offer. One event is sent per offered
mime type.
Version 1
- offer — add an offered mime type
- destroy — destroy the primary selection source
- send — send the primary selection contents
- cancelled — request for primary selection contents was canceled
offer to replace the contents of the primary selection
The source side of a wp_primary_selection_offer, it provides a way to
describe the offered data and respond to requests to transfer the
requested contents of the primary selection clipboard.
zwp_primary_selection_source_v1
request offer(
mime_type: string,
)add an offered mime type
This request adds a mime type to the set of mime types advertised to
targets. Can be called several times to offer multiple types.
zwp_primary_selection_source_v1
event send(
mime_type: string,
fd: fd,
)send the primary selection contents
Request for the current primary selection contents from the client.
Send the specified mime type over the passed file descriptor, then
close it.
zwp_primary_selection_source_v1
event cancelled()
request for primary selection contents was canceled
This primary selection source is no longer valid. The client should
clean up and destroy this primary selection source.
Copyright
Copyright © 2020 Aleix Pol Gonzalez aleixpol@kde.org
Copyright © 2020 Carlos Garnacho carlosg@gnome.org
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.
Protocol for requesting activation of surfaces
The way for a client to pass focus to another toplevel is as follows.
The client that intends to activate another toplevel uses the
xdg_activation_v1.get_activation_token request to get an activation token.
This token is then forwarded to the client, which is supposed to activate
one of its surfaces, through a separate band of communication.
One established way of doing this is through the XDG_ACTIVATION_TOKEN
environment variable of a newly launched child process. The child process
should unset the environment variable again right after reading it out in
order to avoid propagating it to other child processes.
Another established way exists for Applications implementing the D-Bus
interface org.freedesktop.Application, which should get their token under
activation-token on their platform_data.
In general activation tokens may be transferred across clients through
means not described in this protocol.
The client to be activated will then pass the token
it received to the xdg_activation_v1.activate request. The compositor can
then use this token to decide how to react to the activation request.
The token the activating client gets may be ineffective either already at
the time it receives it, for example if it was not focused, for focus
stealing prevention. The activating client will have no way to discover
the validity of the token, and may still forward it to the to be activated
client.
The created activation token may optionally get information attached to it
that can be used by the compositor to identify the application that we
intend to activate. This can for example be used to display a visual hint
about what application is being started.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
wayfire 0.9.0
interface for activating surfaces
A global interface used for informing the compositor about applications
being activated or started, or for applications to request to be
activated.
xdg_activation_v1
request destroy()
Destructor
destroy the xdg_activation object
Notify the compositor that the xdg_activation object will no longer be
used.
The child objects created via this interface are unaffected and should
be destroyed separately.
xdg_activation_v1
request activate(
token: string,
surface: object<wl_surface>,
)- token — the activation token of the initiating client
- surface — the wl_surface to activate
notify new interaction being available
Requests surface activation. It's up to the compositor to display
this information as desired, for example by placing the surface above
the rest.
The compositor may know who requested this by checking the activation
token and might decide not to follow through with the activation if it's
considered unwanted.
Compositors can ignore unknown activation tokens when an invalid
token is passed.
Version 1
- error
- set_serial — specifies the seat and serial of the activating event
- set_app_id — specifies the application being activated
- set_surface — specifies the surface requesting activation
- commit — issues the token request
- done — the exported activation token
- destroy — destroy the xdg_activation_token_v1 object
an exported activation handle
An object for setting up a token and receiving a token handle that can
be passed as an activation token to another client.
The object is created using the xdg_activation_v1.get_activation_token
request. This object should then be populated with the app_id, surface
and serial information and committed. The compositor shall then issue a
done event with the token. In case the request's parameters are invalid,
the compositor will provide an invalid token.
xdg_activation_token_v1
request set_serial(
serial: uint,
seat: object<wl_seat>,
)- serial — the serial of the event that triggered the activation
- seat — the wl_seat of the event
specifies the seat and serial of the activating event
Provides information about the seat and serial event that requested the
token.
The serial can come from an input or focus event. For instance, if a
click triggers the launch of a third-party client, the launcher client
should send a set_serial request with the serial and seat from the
wl_pointer.button event.
Some compositors might refuse to activate toplevels when the token
doesn't have a valid and recent enough event serial.
Must be sent before commit. This information is optional.
xdg_activation_token_v1
request set_app_id(
app_id: string,
)- app_id — the application id of the client being activated.
specifies the application being activated
The requesting client can specify an app_id to associate the token
being created with it.
Must be sent before commit. This information is optional.
xdg_activation_token_v1
request set_surface(
surface: object<wl_surface>,
)- surface — the requesting surface
specifies the surface requesting activation
This request sets the surface requesting the activation. Note, this is
different from the surface that will be activated.
Some compositors might refuse to activate toplevels when the token
doesn't have a requesting surface.
Must be sent before commit. This information is optional.
xdg_activation_token_v1
request commit()
issues the token request
Requests an activation token based on the different parameters that
have been offered through set_serial, set_surface and set_app_id.
xdg_activation_token_v1
event done(
token: string,
)- token — the exported activation token
the exported activation token
The 'done' event contains the unique token of this activation request
and notifies that the provider is done.
Copyright
Copyright © 2018 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
Compositor Support
Version 1cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
labwc 0.20.2
louvre 2.14.1
mir 2.26
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
window decoration manager
This interface allows a compositor to announce support for server-side
decorations.
A window decoration is a set of window controls as deemed appropriate by
the party managing them, such as user interface components used to move,
resize and change a window's state.
A client can use this protocol to request being decorated by a supporting
compositor.
If compositor and client do not negotiate the use of a server-side
decoration using this protocol, clients continue to self-decorate as they
see fit.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
zxdg_decoration_manager_v1
request destroy()
Destructor
destroy the decoration manager object
Destroy the decoration manager. This doesn't destroy objects created
with the manager.
zxdg_decoration_manager_v1
request get_toplevel_decoration(
id: new_id<zxdg_toplevel_decoration_v1>,
toplevel: object<xdg_toplevel>,
)create a new toplevel decoration object
Create a new decoration object associated with the given toplevel.
For objects of version 1, creating an xdg_toplevel_decoration from an
xdg_toplevel which has a buffer attached or committed is a client
error, and any attempts by a client to attach or manipulate a buffer
prior to the first xdg_toplevel_decoration.configure event must also be
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.
Version 2
decoration object for a toplevel surface
The decoration object allows the compositor to toggle server-side window
decorations for a toplevel surface. The client can request to switch to
another mode.
The xdg_toplevel_decoration object must be destroyed before its
xdg_toplevel.
zxdg_toplevel_decoration_v1
enum error {
unconfigured_buffer = 0,
already_constructed = 1,
orphaned = 2,
invalid_mode = 3,
}- unconfigured_buffer — xdg_toplevel has a buffer attached before configure
- already_constructed — xdg_toplevel already has a decoration object
- orphaned — xdg_toplevel destroyed before the decoration object
- invalid_mode — invalid mode
zxdg_toplevel_decoration_v1
request destroy()
Destructor
destroy the decoration object
Switch back to a mode without any server-side decorations at the next
commit, unless a new xdg_toplevel_decoration is created for the surface
first.
zxdg_toplevel_decoration_v1
enum mode {
client_side = 1,
server_side = 2,
}- client_side — no server-side window decoration
- server_side — server-side window decoration
window decoration modes
These values describe window decoration modes.
zxdg_toplevel_decoration_v1
request set_mode(
mode: uint<mode>,
)- mode — the decoration mode
set the decoration mode
Set the toplevel surface decoration mode. This informs the compositor
that the client prefers the provided decoration mode.
After requesting a decoration mode, the compositor will respond by
emitting an xdg_surface.configure event. The client should then update
its content, drawing it without decorations if the received mode is
server-side decorations. The client must also acknowledge the configure
when committing the new content (see xdg_surface.ack_configure).
The compositor can decide not to use the client's mode and enforce a
different mode instead.
Clients whose decoration mode depend on the xdg_toplevel state may send
a set_mode request in response to an xdg_surface.configure event and wait
for the next xdg_surface.configure event to prevent unwanted state.
Such clients are responsible for preventing configure loops and must
make sure not to send multiple successive set_mode requests with the
same decoration mode.
If an invalid mode is supplied by the client, the invalid_mode protocol
error is raised by the compositor.
zxdg_toplevel_decoration_v1
request unset_mode()
unset the decoration mode
Unset the toplevel surface decoration mode. This informs the compositor
that the client doesn't prefer a particular decoration mode.
This request has the same semantics as set_mode.
zxdg_toplevel_decoration_v1
event configure(
mode: uint<mode>,
)- mode — the decoration mode
notify a decoration mode change
The configure event configures the effective decoration mode. The
configured state should not be applied immediately. Clients must send an
ack_configure in response to this event. See xdg_surface.configure and
xdg_surface.ack_configure for details.
A configure event can be sent at any time. The specified mode must be
obeyed by the client.
Copyright
Copyright © 2023 Carlos Garnacho
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
muffin 6.7.4
mutter 51
phoc 0.55
create dialogs related to other toplevels
The xdg_wm_dialog_v1 interface is exposed as a global object allowing
to register surfaces with a xdg_toplevel role as "dialogs" relative to
another toplevel.
The compositor may let this relation influence how the surface is
placed, displayed or interacted with.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
xdg_wm_dialog_v1
enum error {
already_used = 0,
}- already_used — the xdg_toplevel object has already been used to create a xdg_dialog_v1
Version 1
dialog object
A xdg_dialog_v1 object is an ancillary object tied to a xdg_toplevel. Its
purpose is hinting the compositor that the toplevel is a "dialog" (e.g. a
temporary window) relative to another toplevel (see
xdg_toplevel.set_parent). If the xdg_toplevel is destroyed, the xdg_dialog_v1
becomes inert.
Through this object, the client may provide additional hints about
the purpose of the secondary toplevel. This interface has no effect
on toplevels that are not attached to a parent toplevel.
xdg_dialog_v1
request set_modal()
mark dialog as modal
Hints that the dialog has "modal" behavior. Modal dialogs typically
require to be fully addressed by the user (i.e. closed) before resuming
interaction with the parent toplevel, and may require a distinct
presentation.
Clients must implement the logic to filter events in the parent
toplevel on their own.
Compositors may choose any policy in event delivery to the parent
toplevel, from delivering all events unfiltered to using them for
internal consumption.
Copyright
Copyright © 2015-2016 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.
Protocol for exporting xdg surface handles
This protocol specifies a way for making it possible to reference a surface
of a different client. With such a reference, a client can, by using the
interfaces provided by this protocol, manipulate the relationship between
its own surfaces and the surface of some other client. For example, stack
some of its own surface above the other clients surface.
In order for a client A to get a reference of a surface of client B, client
B must first export its surface using xdg_exporter.export_toplevel. Upon
doing this, client B will receive a handle (a unique string) that it may
share with client A in some way (for example D-Bus). After client A has
received the handle from client B, it may use xdg_importer.import_toplevel
to create a reference to the surface client B just exported. See the
corresponding requests for details.
A possible use case for this is out-of-process dialogs. For example when a
sandboxed client without file system access needs the user to select a file
on the file system, given sandbox environment support, it can export its
surface, passing the exported surface handle to an unsandboxed process that
can show a file browser dialog and stack it above the sandboxed client's
surface.
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 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
Version 1
Compositor Support
Version 1cosmic 1.0.0
kwin 6.7
labwc 0.20.2
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
sway 1.11
wayfire 0.9.0
interface for exporting surfaces
A global interface used for exporting surfaces that can later be imported
using xdg_importer.
zxdg_exporter_v2
request destroy()
Destructor
destroy the xdg_exporter object
Notify the compositor that the xdg_exporter object will no longer be
used.
zxdg_exporter_v2
enum error {
invalid_surface = 0,
}- invalid_surface — surface is not an xdg_toplevel
error values
These errors can be emitted in response to invalid xdg_exporter
requests.
zxdg_exporter_v2
request export_toplevel(
id: new_id<zxdg_exported_v2>,
surface: object<wl_surface>,
)- id — the new xdg_exported object
- surface — the surface to export
export a toplevel surface
The export_toplevel request exports the passed surface so that it can later be
imported via xdg_importer. When called, a new xdg_exported object will
be created and xdg_exported.handle will be sent immediately. See the
corresponding interface and event for details.
A surface may be exported multiple times, and each exported handle may
be used to create an xdg_imported multiple times. Only xdg_toplevel
equivalent surfaces may be exported, otherwise an invalid_surface
protocol error is sent.
Version 1
Compositor Support
Version 1cosmic 1.0.0
kwin 6.7
labwc 0.20.2
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
sway 1.11
wayfire 0.9.0
interface for importing surfaces
A global interface used for importing surfaces exported by xdg_exporter.
With this interface, a client can create a reference to a surface of
another client.
zxdg_importer_v2
request destroy()
Destructor
destroy the xdg_importer object
Notify the compositor that the xdg_importer object will no longer be
used.
zxdg_importer_v2
request import_toplevel(
id: new_id<zxdg_imported_v2>,
handle: string,
)- id — the new xdg_imported object
- handle — the exported surface handle
import a toplevel surface
The import_toplevel request imports a surface from any client given a handle
retrieved by exporting said surface using xdg_exporter.export_toplevel.
When called, a new xdg_imported object will be created. This new object
represents the imported surface, and the importing client can
manipulate its relationship using it. See xdg_imported for details.
Version 1
- destroy — unexport the exported surface
- handle — the exported surface handle
an exported surface handle
An xdg_exported object represents an exported reference to a surface. The
exported surface may be referenced as long as the xdg_exported object not
destroyed. Destroying the xdg_exported invalidates any relationship the
importer may have established using xdg_imported.
zxdg_exported_v2
request destroy()
Destructor
unexport the exported surface
Revoke the previously exported surface. This invalidates any
relationship the importer may have set up using the xdg_imported created
given the handle sent via xdg_exported.handle.
zxdg_exported_v2
event handle(
handle: string,
)- handle — the exported surface handle
the exported surface handle
The handle event contains the unique handle of this exported surface
reference. It may be shared with any client, which then can use it to
import the surface by calling xdg_importer.import_toplevel. A handle
may be used to import the surface multiple times.
Version 1
an imported surface handle
An xdg_imported object represents an imported reference to surface exported
by some client. A client can use this interface to manipulate
relationships between its own surfaces and the imported surface.
zxdg_imported_v2
enum error {
invalid_surface = 0,
}- invalid_surface — surface is not an xdg_toplevel
error values
These errors can be emitted in response to invalid xdg_imported
requests.
zxdg_imported_v2
request destroy()
Destructor
destroy the xdg_imported object
Notify the compositor that it will no longer use the xdg_imported
object. Any relationship that may have been set up will at this point
be invalidated.
zxdg_imported_v2
request set_parent_of(
surface: object<wl_surface>,
)- surface — the child surface
set as the parent of some surface
Set the imported surface as the parent of some surface of the client.
The passed surface must be an xdg_toplevel equivalent, otherwise an
invalid_surface protocol error is sent. Calling this function sets up
a surface to surface relation with the same stacking and positioning
semantics as xdg_toplevel.set_parent.
zxdg_imported_v2
event destroyed()
the imported surface handle has been destroyed
The imported surface handle has been destroyed and any relationship set
up has been invalidated. This may happen for various reasons, for
example if the exported surface or the exported surface handle has been
destroyed, if the handle used for importing was invalid.
Copyright
Copyright © 2017 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.
Protocol to describe output regions
This protocol aims at describing outputs in a way which is more in line
with the concept of an output on desktop oriented systems.
Some information are more specific to the concept of an output for
a desktop oriented system and may not make sense in other applications,
such as IVI systems for example.
Typically, the global compositor space on a desktop system is made of
a contiguous or overlapping set of rectangular regions.
The logical_position and logical_size events defined in this protocol
might provide information identical to their counterparts already
available from wl_output, in which case the information provided by this
protocol should be preferred to their equivalent in wl_output. The goal is
to move the desktop specific concepts (such as output location within the
global compositor space, etc.) out of the core wl_output protocol.
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 'z' prefix and the version number in the protocol and
interface names are removed and the interface version number is
reset.
Version 3
Compositor Support
Version 3cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
mir 2.26
muffin 6.7.4
mutter 51
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
manage xdg_output objects
A global factory interface for xdg_output objects.
zxdg_output_manager_v1
request destroy()
Destructor
destroy the xdg_output_manager object
Using this request a client can tell the server that it is not
going to use the xdg_output_manager object anymore.
Any objects already created through this instance are not affected.
Version 3
- destroy — destroy the xdg_output object
- logical_position — position of the output within the global compositor space
- logical_size — size of the output in the global compositor space
- done — all information about the output have been sent
- name — name of this output
- description — human-readable description of this output
compositor logical output region
An xdg_output describes part of the compositor geometry.
This typically corresponds to a monitor that displays part of the
compositor space.
For objects version 3 onwards, after all xdg_output properties have been
sent (when the object is created and when properties are updated), a
wl_output.done event is sent. This allows changes to the output
properties to be seen as atomic, even if they happen via multiple events.
zxdg_output_v1
request destroy()
Destructor
destroy the xdg_output object
Using this request a client can tell the server that it is not
going to use the xdg_output object anymore.
zxdg_output_v1
event logical_position(
x: int,
y: int,
)- x — x position within the global compositor space
- y — y position within the global compositor space
position of the output within the global compositor space
The position event describes the location of the wl_output within
the global compositor space.
The logical_position event is sent after creating an xdg_output
(see xdg_output_manager.get_xdg_output) and whenever the location
of the output changes within the global compositor space.
zxdg_output_v1
event logical_size(
width: int,
height: int,
)- width — width in global compositor space
- height — height in global compositor space
size of the output in the global compositor space
The logical_size event describes the size of the output in the
global compositor space.
Most regular Wayland clients should not pay attention to the
logical size and would rather rely on xdg_shell interfaces.
Some clients such as Xwayland, however, need this to configure
their surfaces in the global compositor space as the compositor
may apply a different scale from what is advertised by the output
scaling property (to achieve fractional scaling, for example).
For example, for a wl_output mode 3840×2160 and a scale factor 2:
A compositor not scaling the monitor viewport in its compositing space
will advertise a logical size of 3840×2160,
A compositor scaling the monitor viewport with scale factor 2 will
advertise a logical size of 1920×1080,
A compositor scaling the monitor viewport using a fractional scale of
1.5 will advertise a logical size of 2560×1440.
For example, for a wl_output mode 1920×1080 and a 90 degree rotation,
the compositor will advertise a logical size of 1080x1920.
The logical_size event is sent after creating an xdg_output
(see xdg_output_manager.get_xdg_output) and whenever the logical
size of the output changes, either as a result of a change in the
applied scale or because of a change in the corresponding output
mode(see wl_output.mode) or transform (see wl_output.transform).
zxdg_output_v1
event done()
Deprecated since version 3
all information about the output have been sent
This event is sent after all other properties of an xdg_output
have been sent.
This allows changes to the xdg_output properties to be seen as
atomic, even if they happen via multiple events.
For objects version 3 onwards, this event is deprecated. Compositors
are not required to send it anymore and must send wl_output.done
instead.
zxdg_output_v1
event name(
name: string,
)Available since version 2
name of this output
Many compositors will assign names to their outputs, show them to the
user, allow them to be configured by name, etc. The client may wish to
know this name as well to offer the user similar behaviors.
The naming convention is compositor defined, but limited to
alphanumeric characters and dashes (-). Each name is unique among all
wl_output globals, but if a wl_output global is destroyed the same name
may be reused later. The names will also remain consistent across
sessions with the same hardware and software configuration.
Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
not assume that the name is a reflection of an underlying DRM
connector, X11 connection, etc.
The name event is sent after creating an xdg_output (see
xdg_output_manager.get_xdg_output). This event is only sent once per
xdg_output, and the name does not change over the lifetime of the
wl_output global.
This event is deprecated, instead clients should use wl_output.name.
Compositors must still support this event.
zxdg_output_v1
event description(
description: string,
)Available since version 2
- description — output description
human-readable description of this output
Many compositors can produce human-readable descriptions of their
outputs. The client may wish to know this description as well, to
communicate the user for various purposes.
The description is a UTF-8 string with no convention defined for its
contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
output via :1'.
The description event is sent after creating an xdg_output (see
xdg_output_manager.get_xdg_output) and whenever the description
changes. The description is optional, and may not be sent at all.
For objects of version 2 and lower, this event is only sent once per
xdg_output, and the description does not change over the lifetime of
the wl_output global.
This event is deprecated, instead clients should use
wl_output.description. Compositors must still support this event.
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.
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.
Version 1
Compositor Support
Version 1jay 1.14.0
kwin 6.7
mutter 51
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.
xdg_session_manager_v1
enum error {
in_use = 1,
invalid_session_id = 2,
invalid_reason = 3,
}- in_use — a requested session is already in use
- invalid_session_id — invalid session identifier
- invalid_reason — invalid reason
xdg_session_manager_v1
enum reason {
launch = 1,
recover = 2,
session_restore = 3,
}- launch
an app is newly launched
A new app instance is launched, for example from an app launcher.
- recover
an app recovered
An app instance is recovering from for example a compositor or app crash.
- session_restore
an app restored
An app instance is restored, for example part of a restored session, or
restored from having been temporarily terminated due to resource
constraints.
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.
xdg_session_manager_v1
request destroy()
Destructor
Destroy this object
Destroy the manager object. The existing session objects will be
unaffected.
xdg_session_manager_v1
request get_session(
id: new_id<xdg_session_v1>,
reason: uint<reason>,
session_id: nullable string,
)- reason — reason for session
- session_id — the session to restore
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.
Version 1
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.
xdg_session_v1
enum error {
name_in_use = 1,
already_mapped = 2,
invalid_name = 3,
already_added = 4,
}- name_in_use — toplevel name is already in use
- already_mapped — toplevel was already mapped when restored
- invalid_name — provided toplevel name is invalid
- already_added — toplevel already added
xdg_session_v1
request destroy()
Destructor
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.
xdg_session_v1
request remove()
Destructor
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.
xdg_session_v1
request add_toplevel(
id: new_id<xdg_toplevel_session_v1>,
toplevel: object<xdg_toplevel>,
name: string,
)- name — name identifying the toplevel
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.
xdg_session_v1
request restore_toplevel(
id: new_id<xdg_toplevel_session_v1>,
toplevel: object<xdg_toplevel>,
name: string,
)- name — name identifying the toplevel
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.
xdg_session_v1
request remove_toplevel(
name: string,
)- name — name identifying the toplevel
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).
xdg_session_v1
event created(
session_id: string,
)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.
xdg_session_v1
event restored()
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.
xdg_session_v1
event replaced()
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.
Version 1
- destroy — Destroy the object
- rename — change the name of toplevel session
- restored — a toplevel's session has been restored
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.
xdg_toplevel_session_v1
request destroy()
Destructor
Destroy the object
Destroy the object. This has no effect over window management of the
associated toplevel.
xdg_toplevel_session_v1
request rename(
name: string,
)- name — new name to identify the toplevel
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.
Copyright
Copyright © 2008-2013 Kristian Høgsberg
Copyright © 2013 Rafael Antognolli
Copyright © 2013 Jasper St. Pierre
Copyright © 2010-2013 Intel Corporation
Copyright © 2015-2017 Samsung Electronics Co., Ltd
Copyright © 2015-2017 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.
Version 7
Compositor Support
Version 7hyprland 0.52.1
jay 1.14.0
mutter 51
niri 26.04
Version 6cosmic 1.0.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
phoc 0.55
wayfire 0.9.0
Version 5cage 0.3.0
mir 2.26
muffin 6.7.4
river 0.3.13
sway 1.11
treeland 0.8.0
weston 15.0.1
create desktop-style surfaces
The xdg_wm_base interface is exposed as a global object enabling clients
to turn their wl_surfaces into windows in a desktop environment. It
defines the basic functionality needed for clients and the compositor to
create windows that can be dragged, resized, maximized, etc, as well as
creating transient windows such as popup menus.
xdg_wm_base
enum error {
role = 0,
defunct_surfaces = 1,
not_the_topmost_popup = 2,
invalid_popup_parent = 3,
invalid_surface_state = 4,
invalid_positioner = 5,
unresponsive = 6,
}- role — given wl_surface has another role
- defunct_surfaces — xdg_wm_base was destroyed before children
- not_the_topmost_popup — the client tried to map or destroy a non-topmost popup
- invalid_popup_parent — the client specified an invalid popup parent surface
- invalid_surface_state — the client provided an invalid surface state
- invalid_positioner — the client provided an invalid positioner
- unresponsive — the client didn’t respond to a ping event in time
xdg_wm_base
request destroy()
Destructor
destroy xdg_wm_base
Destroy this xdg_wm_base object.
Destroying a bound xdg_wm_base object while there are surfaces
still alive created by this xdg_wm_base object instance is illegal
and will result in a defunct_surfaces error.
xdg_wm_base
request pong(
serial: uint,
)- serial — serial of the ping event
respond to a ping event
A client must respond to a ping event with a pong request or
the client may be deemed unresponsive. See xdg_wm_base.ping
and xdg_wm_base.error.unresponsive.
xdg_wm_base
event ping(
serial: uint,
)- serial — pass this to the pong request
check if the client is alive
The ping event asks the client if it's still alive. Pass the
serial specified in the event back to the compositor by sending
a "pong" request back with the specified serial. See xdg_wm_base.pong.
Compositors can use this to determine if the client is still
alive. It's unspecified what will happen if the client doesn't
respond to the ping request, or in what timeframe. Clients should
try to respond in a reasonable amount of time. The “unresponsive”
error is provided for compositors that wish to disconnect unresponsive
clients.
A compositor is free to ping in any way it wants, but a client must
always respond to any xdg_wm_base object it created.
Version 7
child surface positioner
The xdg_positioner provides a collection of rules for the placement of a
child surface relative to a parent surface. Rules can be defined to ensure
the child surface remains within the visible area's borders, and to
specify how the child surface 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 child surface must intersect with or
be at least partially adjacent to its parent surface.
See the various requests for details about possible rules.
At the time of the request, the compositor makes a copy of the rules
specified by the xdg_positioner. Thus, after the request is complete the
xdg_positioner object can be destroyed or reused; further changes to the
object will have no effect on previous usages.
For an xdg_positioner object to be considered complete, it must have a
non-zero size set by set_size, and a non-zero anchor rectangle set by
set_anchor_rect. Passing an incomplete xdg_positioner object when
positioning a surface raises an invalid_positioner error.
xdg_positioner
request set_size(
width: int,
height: int,
)- width — width of positioned rectangle
- height — height of positioned rectangle
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 a zero or negative size is set the invalid_input error is raised.
xdg_positioner
request set_anchor_rect(
x: int,
y: int,
width: int,
height: int,
)- x — x position of anchor rectangle
- y — y position of anchor rectangle
- width — width of anchor rectangle
- height — height of anchor rectangle
set the anchor rectangle within the parent surface
Specify the anchor rectangle within the parent surface that the child
surface will be placed relative to. The rectangle is relative to the
window geometry as defined by xdg_surface.set_window_geometry of the
parent surface.
When the xdg_positioner object is used to position a child surface, the
anchor rectangle may not extend outside the window geometry of the
positioned child's parent surface.
If a negative size is set the invalid_input error is raised.
xdg_positioner
enum anchor {
none = 0,
top = 1,
bottom = 2,
left = 3,
right = 4,
top_left = 5,
bottom_left = 6,
top_right = 7,
bottom_right = 8,
}xdg_positioner
request set_anchor(
anchor: uint<anchor>,
)set anchor rectangle anchor
Defines the anchor point for the anchor rectangle. The specified anchor
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
'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.
xdg_positioner
enum gravity {
none = 0,
top = 1,
bottom = 2,
left = 3,
right = 4,
top_left = 5,
bottom_left = 6,
top_right = 7,
bottom_right = 8,
}xdg_positioner
request set_gravity(
gravity: uint<gravity>,
)- gravity — gravity direction
set child surface gravity
Defines in what direction a surface should be positioned, relative to
the anchor point of the parent surface. If a corner gravity is
specified (e.g. 'bottom_right' or 'top_left'), then the child 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.
xdg_positioner
enum constraint_adjustment {
none = 0,
slide_x = 1,
slide_y = 2,
flip_x = 4,
flip_y = 8,
resize_x = 16,
resize_y = 32,
}This is a bitfield
- none
don't move the child 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.
- slide_x
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.
- slide_y
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.
- flip_x
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.
- flip_y
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.
- resize_x
horizontally resize the surface
Resize the surface horizontally so that it is completely
unconstrained.
- resize_y
vertically resize the surface
Resize the surface vertically so that it is completely unconstrained.
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.
xdg_positioner
request set_constraint_adjustment(
constraint_adjustment: uint<constraint_adjustment>,
)- constraint_adjustment — bit mask of constraint adjustments
set the adjustment to be done when constrained
Specify how the window 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.
xdg_positioner
request set_offset(
x: int,
y: int,
)- x — surface position x offset
- y — surface position y offset
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.
xdg_positioner
request set_reactive()
Available since version 3
continuously reconstrain the surface
When set reactive, the surface is reconstrained if the conditions used
for constraining changed, e.g. the parent window moved.
If the conditions changed and the popup was reconstrained, an
xdg_popup.configure event is sent with updated geometry, followed by an
xdg_surface.configure event.
xdg_positioner
request set_parent_size(
parent_width: int,
parent_height: int,
)Available since version 3
- parent_width — future window geometry width of parent
- parent_height — future window geometry height of parent
set parent size
Set the parent window geometry the compositor should use when
positioning the popup. The compositor may use this information to
determine the future state the popup should be constrained using. If
this doesn't match the dimension of the parent the popup is eventually
positioned against, the behavior is undefined.
The arguments are given in the surface-local coordinate space.
xdg_positioner
request set_parent_configure(
serial: uint,
)Available since version 3
- serial — serial of parent configure event
set parent configure this is a response to
Set the serial of an xdg_surface.configure event this positioner will be
used in response to. The compositor may use this information together
with set_parent_size to determine what future state the popup should be
constrained using.
Version 7
desktop user interface surface base interface
An interface that may be implemented by a wl_surface, for
implementations that provide a desktop-style user interface.
It provides a base set of functionality required to construct user
interface elements requiring management by the compositor, such as
toplevel windows, menus, etc. The types of functionality are split into
xdg_surface roles.
Creating an xdg_surface does not set the role for a wl_surface. In order
to map an xdg_surface, the client must create a role-specific object
using, e.g., get_toplevel, get_popup. The wl_surface for any given
xdg_surface can have at most one role, and may not be assigned any role
not based on xdg_surface.
A role must be assigned before any other requests are made to the
xdg_surface object.
The client must call wl_surface.commit on the corresponding wl_surface
for the xdg_surface state to take effect.
Creating an xdg_surface from a wl_surface which has a buffer attached or
committed is a client error, and any attempts by a client to attach or
manipulate a buffer prior to the first xdg_surface.configure call must
also be treated as errors.
After creating a role-specific object and setting it up (e.g. by sending
the title, app ID, size constraints, parent, etc), the client must
perform an initial commit without any buffer attached. The compositor
will reply with initial wl_surface state such as
wl_surface.preferred_buffer_scale followed by an xdg_surface.configure
event. The client must acknowledge it and is then allowed to attach a
buffer to map the surface.
Mapping an xdg_surface-based role surface is defined as making it
possible for the surface to be shown by the compositor. Note that
a mapped surface is not guaranteed to be visible once it is mapped.
For an xdg_surface to be mapped by the compositor, the following
conditions must be met:
(1) the client has assigned an xdg_surface-based role to the surface
(2) the client has set and committed the xdg_surface state and the
role-dependent state to the surface
(3) the client has committed a buffer to the surface
A newly-unmapped surface is considered to have met condition (1) out
of the 3 required conditions for mapping a surface if its role surface
has not been destroyed, i.e. the client must perform the initial commit
again before attaching a buffer.
xdg_surface
enum error {
not_constructed = 1,
already_constructed = 2,
unconfigured_buffer = 3,
invalid_serial = 4,
invalid_size = 5,
defunct_role_object = 6,
}- not_constructed — Surface was not fully constructed
- already_constructed — Surface was already constructed
- unconfigured_buffer — Attaching a buffer to an unconfigured surface
- invalid_serial — Invalid serial number when acking a configure event
- invalid_size — Width or height was zero or negative
- defunct_role_object — Surface was destroyed before its role object
xdg_surface
request destroy()
Destructor
destroy the xdg_surface
Destroy the xdg_surface object. An xdg_surface must only be destroyed
after its role object has been destroyed, otherwise
a defunct_role_object error is raised.
- parent — parent surface for this popup
- positioner — positioner for this popup
assign the xdg_popup surface role
This creates an xdg_popup object for the given xdg_surface and gives
the associated wl_surface the xdg_popup role.
If null is passed as a parent, a parent surface must be specified using
some other protocol, before committing the initial state.
See the documentation of xdg_popup for more details about what an
xdg_popup is and how it is used.
xdg_surface
request set_window_geometry(
x: int,
y: int,
width: int,
height: int,
)- x — x coordinate of the top-left corner of the window inside this surface
- y — y coordinate of the top-left corner of the window inside this surface
- width — width of the window
- height — height of the window
set the new window geometry
The window geometry of a surface is its "visible bounds" from the
user's perspective. Client-side decorations often have invisible
portions like drop-shadows which should be ignored for the
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.
When maintaining a position, the compositor should treat the (x, y)
coordinate of the window geometry as the top left corner of the window.
A client changing the (x, y) window geometry coordinate should in
general not alter the position of the window.
Once the window geometry of the surface is set, it is not possible to
unset it, and it will remain the same until set_window_geometry is
called again, even if a new subsurface or buffer is attached.
If never set, the value is the full bounds of the surface,
including any subsurfaces. This updates dynamically on every
commit. This unset is meant for extremely simple clients.
The arguments are given in the surface-local coordinate space of
the wl_surface associated with this xdg_surface, and may extend outside
of the wl_surface itself to mark parts of the subsurface tree as part of
the window geometry.
When applied, the effective window geometry will be the set window
geometry clamped to the bounding rectangle of the combined
geometry of the surface of the xdg_surface and the associated
subsurfaces.
The effective geometry will not be recalculated unless a new call to
set_window_geometry is done and the new pending surface state is
subsequently applied.
The width and height of the effective window geometry must be
greater than zero. Setting an invalid size will raise an
invalid_size error.
xdg_surface
request ack_configure(
serial: uint,
)- serial — the serial from the configure event
ack a configure event
When a configure event is received, if a client commits the
surface in response to the configure event, then the client
must make an ack_configure request sometime before the commit
request, passing along the serial of the configure event.
For instance, for toplevel surfaces the compositor might use this
information to move a surface to the top left only when the client has
drawn itself for the maximized or fullscreen state.
If the client receives multiple configure events before it
can respond to one, it only has to ack the last configure event.
Acking a configure event that was never sent raises an invalid_serial
error.
A client is not required to commit immediately after sending
an ack_configure request - it may even ack_configure several times
before its next surface commit.
A client may send multiple ack_configure requests before committing, but
only the last request sent before a commit indicates which configure
event the client really is responding to.
Sending an ack_configure request consumes the serial number sent with
the request, as well as serial numbers sent by all configure events
sent on this xdg_surface prior to the configure event referenced by
the committed serial.
It is an error to issue multiple ack_configure requests referencing a
serial from the same configure event, or to issue an ack_configure
request referencing a serial from a configure event issued before the
event identified by the last ack_configure request for the same
xdg_surface. Doing so will raise an invalid_serial error.
xdg_surface
event configure(
serial: uint,
)- serial — serial of the configure event
suggest a surface change
The configure event marks the end of a configure sequence. A configure
sequence is a set of one or more events configuring the state of the
xdg_surface, including the final xdg_surface.configure event.
Where applicable, xdg_surface surface roles will during a configure
sequence extend this event as a latched state sent as events before the
xdg_surface.configure event. Such events should be considered to make up
a set of atomically applied configuration states, where the
xdg_surface.configure commits the accumulated state.
Clients should arrange their surface for the new states, and then send
an ack_configure request with the serial sent in this configure event at
some point before committing the new surface.
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.
Version 7
toplevel surface
This interface defines an xdg_surface role which allows a surface to,
among other things, set window-like properties such as maximize,
fullscreen, and minimize, set application-specific metadata like title and
id, and well as trigger user interactive operations such as interactive
resize and move.
An xdg_toplevel by default is responsible for providing the full intended
visual representation of the toplevel, which depending on the window
state, may mean things like a title bar, window controls and drop shadow.
Unmapping an xdg_toplevel means that the surface cannot be shown
by the compositor until it is explicitly mapped again.
All active operations (e.g., move, resize) are canceled and all
attributes (e.g. title, state, stacking, ...) are discarded for
an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
the state it had right after xdg_surface.get_toplevel. The client
can re-map the toplevel by performing a commit without any buffer
attached, waiting for a configure event and handling it as usual (see
xdg_surface description).
Attaching a null buffer to a toplevel unmaps the surface.
xdg_toplevel
request destroy()
Destructor
destroy the xdg_toplevel
This request destroys the role surface and unmaps the surface;
see "Unmapping" behavior in interface section for details.
xdg_toplevel
enum error {
invalid_resize_edge = 0,
invalid_parent = 1,
invalid_size = 2,
}- invalid_resize_edge — provided value is
not a valid variant of the resize_edge enum
- invalid_parent — invalid parent toplevel
- invalid_size — client provided an invalid min or max size
xdg_toplevel
request set_parent(
parent: nullable object<xdg_toplevel>,
)- parent — parent surface for this surface
set the parent of this surface
Set the "parent" of this surface. This surface should be stacked
above the parent surface and all other ancestor surfaces.
Parent surfaces should be set on dialogs, toolboxes, or other
"auxiliary" surfaces, so that the parent is raised when the dialog
is raised.
Setting a null parent for a child surface unsets its parent. Setting
a null parent for a surface which currently has no parent is a no-op.
Only mapped surfaces can have child surfaces. Setting a parent which
is not mapped is equivalent to setting a null parent. If a surface
becomes unmapped, its children's parent is set to the parent of
the now-unmapped surface. If the now-unmapped surface has no parent,
its children's parent is unset. If the now-unmapped surface becomes
mapped again, its parent-child relationship is not restored.
The parent toplevel must not be one of the child toplevel's
descendants, and the parent must be different from the child toplevel,
otherwise the invalid_parent protocol error is raised.
xdg_toplevel
request set_title(
title: string,
)- title — title of the surface
set surface title
Set a short title for the surface.
This string may be used to identify the surface in a task bar,
window list, or other user interface elements provided by the
compositor.
The string must be encoded in UTF-8.
xdg_toplevel
request set_app_id(
app_id: string,
)- app_id — application identifier surface belongs to
set application ID
Set an application identifier for the surface.
The app ID identifies the general class of applications to which
the surface belongs. The compositor can use this to group multiple
surfaces together, or to determine how to launch a new application.
For D-Bus activatable applications, the app ID is used as the D-Bus
service name.
The compositor shell will try to group application surfaces together
by their app ID. As a best practice, it is suggested to select app
ID's that match the basename of the application's .desktop file.
For example, "org.freedesktop.FooViewer" where the .desktop file is
"org.freedesktop.FooViewer.desktop".
Like other properties, a set_app_id request can be sent after the
xdg_toplevel has been mapped to update the property.
See the desktop-entry specification [0] for more details on
application identifiers and how they relate to well-known D-Bus
names and .desktop files.
[0] https://standards.freedesktop.org/desktop-entry-spec/
- seat — the wl_seat of the user event
- serial — the serial of the user event
- x — the x position to pop up the window menu at
- y — the y position to pop up the window menu at
show the window menu
Clients implementing client-side decorations might want to show
a context menu when right-clicking on the decorations, giving the
user a menu that they can use to maximize or minimize the window.
This request asks the compositor to pop up such a window menu at
the given position, relative to the local surface coordinates of
the parent surface. There are no guarantees as to what menu items
the window menu contains, or even if a window menu will be drawn
at all.
This request must be used in response to some sort of user action
like a button press, key press, or touch down event.
xdg_toplevel
request move(
seat: object<wl_seat>,
serial: uint,
)- seat — the wl_seat of the user event
- serial — the serial of the user event
start an interactive move
Start an interactive, user-driven move of the surface.
This request must be used in response to some sort of user action
like a button press, key press, or touch down event. The passed
serial is used to determine the type of interactive move (touch,
pointer, etc).
The server may ignore move requests depending on the state of
the surface (e.g. fullscreen or maximized), or if the passed serial
is no longer valid.
If triggered, the surface will lose the focus of the device
(wl_pointer, wl_touch, etc) used for the move. It is up to the
compositor to visually indicate that the move is taking place, such as
updating a pointer cursor, during the move. There is no guarantee
that the device focus will return when the move is completed.
xdg_toplevel
enum resize_edge {
none = 0,
top = 1,
bottom = 2,
left = 4,
top_left = 5,
bottom_left = 6,
right = 8,
top_right = 9,
bottom_right = 10,
}edge values for resizing
These values are used to indicate which edge of a surface
is being dragged in a resize operation.
xdg_toplevel
request resize(
seat: object<wl_seat>,
serial: uint,
edges: uint<resize_edge>,
)- seat — the wl_seat of the user event
- serial — the serial of the user event
- edges — which edge or corner is being dragged
start an interactive resize
Start a user-driven, interactive resize of the surface.
This request must be used in response to some sort of user action
like a button press, key press, or touch down event. The passed
serial is used to determine the type of interactive resize (touch,
pointer, etc).
The server may ignore resize requests depending on the state of
the surface (e.g. fullscreen or maximized).
If triggered, the client will receive configure events with the
"resize" state enum value and the expected sizes. See the "resize"
enum value for more details about what is required. The client
must also acknowledge configure events using "ack_configure". After
the resize is completed, the client will receive another "configure"
event without the resize state.
If triggered, the surface also will lose the focus of the device
(wl_pointer, wl_touch, etc) used for the resize. It is up to the
compositor to visually indicate that the resize is taking place,
such as updating a pointer cursor, during the resize. There is no
guarantee that the device focus will return when the resize is
completed.
The edges parameter specifies how the surface should be resized, and
is one of the values of the resize_edge enum. Values not matching
a variant of the enum will cause the invalid_resize_edge protocol error.
The compositor may use this information to update the surface position
for example when dragging the top left corner. The compositor may also
use this information to adapt its behavior, e.g. choose an appropriate
cursor image.
xdg_toplevel
enum state {
maximized = 1,
fullscreen = 2,
resizing = 3,
activated = 4,
tiled_left = 5,
tiled_right = 6,
tiled_top = 7,
tiled_bottom = 8,
suspended = 9,
constrained_left = 10,
constrained_right = 11,
constrained_top = 12,
constrained_bottom = 13,
}- maximized — the surface is maximized
the surface is maximized
The surface is maximized. The window geometry specified in the configure
event must be obeyed by the client, or the xdg_wm_base.invalid_surface_state
error is raised.
The client should draw without shadow or other
decoration outside of the window geometry.
- fullscreen — the surface is fullscreen
the surface is fullscreen
The surface is fullscreen. The window geometry specified in the
configure event is a maximum; the client cannot resize beyond it. For
a surface to cover the whole fullscreened area, the geometry
dimensions must be obeyed by the client. For more details, see
xdg_toplevel.set_fullscreen.
- resizing — the surface is being resized
the surface is being resized
The surface is being resized. The window geometry specified in the
configure event is a maximum; the client cannot resize beyond it.
Clients that have aspect ratio or cell sizing configuration can use
a smaller size, however.
- activated — the surface is now activated
the surface is now activated
Client window decorations should be painted as if the window is
active. Do not assume this means that the window actually has
keyboard or pointer focus.
- tiled_left
Available since version 2
the surface’s left edge is tiled
The window is currently in a tiled layout and the left edge is
considered to be adjacent to another part of the tiling grid.
The client should draw without shadow or other decoration outside of
the window geometry on the left edge.
- tiled_right
Available since version 2
the surface’s right edge is tiled
The window is currently in a tiled layout and the right edge is
considered to be adjacent to another part of the tiling grid.
The client should draw without shadow or other decoration outside of
the window geometry on the right edge.
- tiled_top
Available since version 2
the surface’s top edge is tiled
The window is currently in a tiled layout and the top edge is
considered to be adjacent to another part of the tiling grid.
The client should draw without shadow or other decoration outside of
the window geometry on the top edge.
- tiled_bottom
Available since version 2
the surface’s bottom edge is tiled
The window is currently in a tiled layout and the bottom edge is
considered to be adjacent to another part of the tiling grid.
The client should draw without shadow or other decoration outside of
the window geometry on the bottom edge.
- suspended
Available since version 6
surface repaint is suspended
The surface is currently not ordinarily being repainted; for
example because its content is occluded by another window, or its
outputs are switched off due to screen locking.
- constrained_left
Available since version 7
the surface’s left edge is constrained
The left edge of the window is currently constrained, meaning it
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
window.
- constrained_right
Available since version 7
the surface’s right edge is constrained
The right edge of the window is currently constrained, meaning it
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
window.
- constrained_top
Available since version 7
the surface’s top edge is constrained
The top edge of the window is currently constrained, meaning it
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
window.
- constrained_bottom
Available since version 7
the surface’s bottom edge is constrained
The bottom edge of the window is currently constrained, meaning it
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
window.
types of state on the surface
The different state values used on the surface. This is designed for
state values like maximized, fullscreen. It is paired with the
configure event to ensure that both the client and the compositor
setting the state can be synchronized.
States set in this way are double-buffered, see wl_surface.commit.
xdg_toplevel
request set_max_size(
width: int,
height: int,
)- width — maximum width of the window
- height — maximum height of the window
set the maximum size
Set a maximum size for the window.
The client can specify a maximum size so that the compositor does
not try to configure the window beyond this size.
The width and height arguments are in window geometry coordinates.
See xdg_surface.set_window_geometry.
Values set in this way are double-buffered, see wl_surface.commit.
The compositor can use this information to allow or disallow
different states like maximize or fullscreen and draw accurate
animations.
Similarly, a tiling window manager may use this information to
place and resize client windows in a more effective way.
The client should not rely on the compositor to obey the maximum
size. The compositor may decide to ignore the values set by the
client and request a larger size.
If never set, or a value of zero in the request, means that the
client has no expected maximum size in the given dimension.
As a result, a client wishing to reset the maximum size
to an unspecified state can use zero for width and height in the
request.
Requesting a maximum size to be smaller than the minimum size of
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
strictly negative values for width or height will result in an
invalid_size error.
xdg_toplevel
request set_min_size(
width: int,
height: int,
)- width — minimum width of the window
- height — minimum height of the window
set the minimum size
Set a minimum size for the window.
The client can specify a minimum size so that the compositor does
not try to configure the window below this size.
The width and height arguments are in window geometry coordinates.
See xdg_surface.set_window_geometry.
Values set in this way are double-buffered, see wl_surface.commit.
The compositor can use this information to allow or disallow
different states like maximize or fullscreen and draw accurate
animations.
Similarly, a tiling window manager may use this information to
place and resize client windows in a more effective way.
The client should not rely on the compositor to obey the minimum
size. The compositor may decide to ignore the values set by the
client and request a smaller size.
If never set, or a value of zero in the request, means that the
client has no expected minimum size in the given dimension.
As a result, a client wishing to reset the minimum size
to an unspecified state can use zero for width and height in the
request.
Requesting a minimum size to be larger than the maximum size of
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
strictly negative values for width and height will result in an
invalid_size error.
xdg_toplevel
request set_maximized()
maximize the window
Maximize the surface.
After requesting that the surface should be maximized, the compositor
will respond by emitting a configure event. Whether this configure
actually sets the window maximized is subject to compositor policies.
The client must then update its content, drawing in the configured
state. The client must also acknowledge the configure when committing
the new content (see ack_configure).
It is up to the compositor to decide how and where to maximize the
surface, for example which output and what region of the screen should
be used.
If the surface was already maximized, the compositor will still emit
a configure event with the "maximized" state.
If the surface is in a fullscreen state, this request has no direct
effect. It may alter the state the surface is returned to when
unmaximized unless overridden by the compositor.
xdg_toplevel
request unset_maximized()
unmaximize the window
Unmaximize the surface.
After requesting that the surface should be unmaximized, the compositor
will respond by emitting a configure event. Whether this actually
un-maximizes the window is subject to compositor policies.
If available and applicable, the compositor will include the window
geometry dimensions the window had prior to being maximized in the
configure event. The client must then update its content, drawing it in
the configured state. The client must also acknowledge the configure
when committing the new content (see ack_configure).
It is up to the compositor to position the surface after it was
unmaximized; usually the position the surface had before maximizing, if
applicable.
If the surface was already not maximized, the compositor will still
emit a configure event without the "maximized" state.
If the surface is in a fullscreen state, this request has no direct
effect. It may alter the state the surface is returned to when
unmaximized unless overridden by the compositor.
xdg_toplevel
request set_fullscreen(
output: nullable object<wl_output>,
)- output — preferred output to place surface on
set the window as fullscreen on an output
Make the surface fullscreen.
After requesting that the surface should be fullscreened, the
compositor will respond by emitting a configure event. Whether the
client is actually put into a fullscreen state is subject to compositor
policies. The client must also acknowledge the configure when
committing the new content (see ack_configure).
The output passed by the request indicates the client's preference as
to which display it should be set fullscreen on. If this value is NULL,
it's up to the compositor to choose which display will be used to map
this surface.
If the surface doesn't cover the whole output, the compositor will
position the surface in the center of the output and compensate with
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
attempts to blend into the surrounding area (e.g. solid black).
If the fullscreened surface is not opaque, the compositor must make
sure that other screen content not part of the same surface tree (made
up of subsurfaces, popups or similarly coupled surfaces) are not
visible below the fullscreened surface.
xdg_toplevel
request unset_fullscreen()
unset the window as fullscreen
Make the surface no longer fullscreen.
After requesting that the surface should be unfullscreened, the
compositor will respond by emitting a configure event.
Whether this actually removes the fullscreen state of the client is
subject to compositor policies.
Making a surface unfullscreen sets states for the surface based on the following:
the state(s) it may have had before becoming fullscreen
any state(s) decided by the compositor
any state(s) requested by the client while the surface was fullscreen
The compositor may include the previous window geometry dimensions in
the configure event, if applicable.
The client must also acknowledge the configure when committing the new
content (see ack_configure).
xdg_toplevel
request set_minimized()
set the window as minimized
Request that the compositor minimize your surface. There is no
way to know if the surface is currently minimized, nor is there
any way to unset minimization on this surface.
If you are looking to throttle redrawing when minimized, please
instead use the wl_surface.frame event for this, as this will
also work with live previews on windows in Alt-Tab, Expose or
similar compositor features.
xdg_toplevel
event configure(
width: int,
height: int,
states: array,
)- width — suggested width of window
- height — suggested height of window
- states — suggested states of the window
suggest a surface change
This configure event asks the client to resize its toplevel surface or
to change its state. The configured state should not be applied
immediately. See xdg_surface.configure for details.
The width and height arguments specify a hint to the window
about how its surface should be resized in window geometry
coordinates. See set_window_geometry.
If the width or height arguments are zero, it means the client
should decide its own window dimension. This may happen when the
compositor needs to configure the state of the surface but doesn't
have any information about any previous or expected dimension.
The states listed in the event specify how the width/height
arguments should be interpreted, and possibly how it should be
drawn.
The states are sent as an array of 32-bit unsigned integers in
native endianness. State values are defined in the state enum.
Clients must send an ack_configure in response to this event. See
xdg_surface.configure and xdg_surface.ack_configure for details.
xdg_toplevel
event close()
surface wants to be closed
The close event is sent by the compositor when the user
wants the surface to be closed. This should be equivalent to
the user clicking the close button in client-side decorations,
if your application has any.
This is only a request that the user intends to close the
window. The client may choose to ignore this request, or show
a dialog to ask the user to save their data, etc.
xdg_toplevel
event configure_bounds(
width: int,
height: int,
)Available since version 4
- width — suggested maximum width of surface
- height — suggested maximum height of surface
recommended window geometry bounds
The configure_bounds event may be sent prior to a xdg_toplevel.configure
event to communicate the bounds a window geometry size is recommended
to constrain to.
The passed width and height are in surface coordinate space. If width
and height are 0, it means bounds is unknown and equivalent to as if no
configure_bounds event was ever sent for this surface.
The bounds can for example correspond to the size of a monitor excluding
any panels or other shell components, so that a surface isn't created in
a way that it cannot fit.
The bounds may change at any point, and in such a case, a new
xdg_toplevel.configure_bounds will be sent, followed by
xdg_toplevel.configure and xdg_surface.configure.
xdg_toplevel
enum wm_capabilities {
window_menu = 1,
maximize = 2,
fullscreen = 3,
minimize = 4,
}Available since version 5
- window_menu — show_window_menu is available
- maximize — set_maximized and unset_maximized are available
- fullscreen — set_fullscreen and unset_fullscreen are available
- minimize — set_minimized is available
xdg_toplevel
event wm_capabilities(
capabilities: array,
)Available since version 5
- capabilities — array of 32-bit capabilities
compositor capabilities
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for minimized toplevels, a button
triggering the set_minimized request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for minimized will ignore
set_minimized requests.
Compositors must send this event once before the first
xdg_surface.configure event. When the capabilities change, compositors
must send this event again and then send an xdg_surface.configure
event.
The configured state should not be applied immediately. See
xdg_surface.configure for details.
The capabilities are sent as an array of 32-bit unsigned integers in
native endianness. Capability values are defined in the wm_capabilities enum.
Version 7
short-lived, popup surfaces for menus
A popup surface is a short-lived, temporary surface. It can be used to
implement for example menus, popovers, tooltips and other similar user
interface concepts.
A popup can be made to take an explicit grab. See xdg_popup.grab for
details.
When the popup is dismissed, a popup_done event will be sent out, and at
the same time the surface will be unmapped. See the xdg_popup.popup_done
event for details.
Explicitly destroying the xdg_popup object will also dismiss the popup and
unmap the surface. Clients that want to dismiss the popup when another
surface of their own is clicked should dismiss the popup using the destroy
request.
A newly created xdg_popup will be stacked on top of all previously created
xdg_popup surfaces associated with the same xdg_toplevel.
The parent of an xdg_popup must be mapped (see the xdg_surface
description) before the xdg_popup itself.
The client must call wl_surface.commit on the corresponding wl_surface
for the xdg_popup state to take effect.
- invalid_grab — tried to grab after being mapped
Destructor
remove xdg_popup interface
This destroys the popup. Explicitly destroying the xdg_popup
object will also dismiss the popup, and unmap the surface.
If this xdg_popup is not the "topmost" popup, the
xdg_wm_base.not_the_topmost_popup protocol error will be sent.
- seat — the wl_seat of the user event
- serial — the serial of the user event
make the popup take an explicit grab
This request makes the created popup take an explicit grab. An explicit
grab will be dismissed when the user dismisses the popup, or when the
client destroys the xdg_popup. This can be done by the user clicking
outside the surface, using the keyboard, or even locking the screen
through closing the lid or a timeout.
If the compositor denies the grab, the popup will be immediately
dismissed.
This request must be used in response to some sort of user action like a
button press, key press, or touch down event. The serial number of the
event should be passed as 'serial'.
The parent of a grabbing popup must either be an xdg_toplevel surface or
another xdg_popup with an explicit grab. If the parent is another
xdg_popup it means that the popups are nested, with this popup now being
the topmost popup.
Nested popups must be destroyed in the reverse order they were created
in, e.g. the only popup you are allowed to destroy at all times is the
topmost one.
When compositors choose to dismiss a popup, they may dismiss every
nested grabbing popup as well. When a compositor dismisses popups, it
will follow the same dismissing order as required from the client.
If the topmost grabbing popup is destroyed, the grab will be returned to
the parent of the popup, if that parent previously had an explicit grab.
If the parent is a grabbing popup which has already been dismissed, this
popup will be immediately dismissed. If the parent is a popup that did
not take an explicit grab, an error will be raised.
During a popup grab, the client owning the grab will receive pointer
and touch events for all their surfaces as normal (similar to an
"owner-events" grab in X11 parlance), while the top most grabbing popup
will always have keyboard focus.
- x — x position relative to parent surface window geometry
- y — y position relative to parent surface window geometry
- width — window geometry width
- height — window geometry height
configure the popup surface
This event asks the popup surface to configure itself given the
configuration. The configured state should not be applied immediately.
See xdg_surface.configure for details.
The x and y arguments represent the position the popup was placed at
given the xdg_positioner rule, relative to the upper left corner of the
window geometry of the parent surface.
For version 2 or older, the configure event for an xdg_popup is only
ever sent once for the initial configuration. Starting with version 3,
it may be sent again if the popup is setup with an xdg_positioner with
set_reactive requested, or in response to xdg_popup.reposition requests.
popup interaction is done
The popup_done event is sent out when a popup is dismissed by the
compositor. The client should destroy the xdg_popup object at this
point.
Available since version 3
- token — reposition request token
recalculate the popup's location
Reposition an already-mapped popup. The popup will be placed given the
details in the passed xdg_positioner object, and a
xdg_popup.repositioned followed by xdg_popup.configure and
xdg_surface.configure will be emitted in response. Any parameters set
by the previous positioner will be discarded.
The passed token will be sent in the corresponding
xdg_popup.repositioned event. The new popup position will not take
effect until the corresponding configure event is acknowledged by the
client. See xdg_popup.repositioned for details. The token itself is
opaque, and has no other special meaning.
If multiple reposition requests are sent, the compositor may skip all
but the last one.
If the popup is repositioned in response to a configure event for its
parent, the client should send an xdg_positioner.set_parent_configure
and possibly an xdg_positioner.set_parent_size request to allow the
compositor to properly constrain the popup.
If the popup is repositioned together with a parent that is being
resized, but not in response to a configure event, the client should
send an xdg_positioner.set_parent_size request.
Available since version 3
- token — reposition request token
signal the completion of a repositioned request
The repositioned event is sent as part of a popup configuration
sequence, together with xdg_popup.configure and lastly
xdg_surface.configure to notify the completion of a reposition request.
The repositioned event is to notify about the completion of a
xdg_popup.reposition request. The token argument is the token passed
in the xdg_popup.reposition request.
Immediately after this event is emitted, xdg_popup.configure and
xdg_surface.configure will be sent with the updated size and position,
as well as a new configure serial.
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 xdg_surface.ack_configure for details.
Copyright
Copyright © 2016, 2023 Red Hat
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
- destroy — destroy the system bell object
- ring — ring the system bell
Compositor Support
Version 1hyprland 0.52.1
kwin 6.7
muffin 6.7.4
mutter 51
system bell
This global interface enables clients to ring the system bell.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
xdg_system_bell_v1
request ring(
surface: nullable object<wl_surface>,
)- surface — associated surface
ring the system bell
This requests rings the system bell on behalf of a client. How ringing
the bell is implemented is up to the compositor. It may be an audible
sound, a visual feedback of some kind, or any other thing including
nothing.
The passed surface should correspond to a toplevel like surface role,
or be null, meaning the client doesn't have a particular toplevel it
wants to associate the bell ringing with. See the xdg-shell protocol
extension for a toplevel like surface role.
Copyright
Copyright 2023 David Redondo
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1jay 1.14.0
kwin 6.7
mutter 51
Move a window during a drag
This protocol enhances normal drag and drop with the ability to move a
window at the same time. This allows having detachable parts of a window
that when dragged out of it become a new window and can be dragged over
an existing window to be reattached.
A typical workflow would be when the user starts dragging on top of a
detachable part of a window, the client would create a wl_data_source and
a xdg_toplevel_drag_v1 object and start the drag as normal via
wl_data_device.start_drag. Once the client determines that the detachable
window contents should be detached from the originating window, it creates
a new xdg_toplevel with these contents and issues a
xdg_toplevel_drag_v1.attach request before mapping it. From now on the new
window is moved by the compositor during the drag as if the client called
xdg_toplevel.move.
Dragging an existing window is similar. The client creates a
xdg_toplevel_drag_v1 object and attaches the existing toplevel before
starting the drag.
Clients use the existing drag and drop mechanism to detect when a window
can be docked or undocked. If the client wants to snap a window into a
parent window it should delete or unmap the dragged top-level. If the
contents should be detached again it attaches a new toplevel as described
above. If a drag operation is cancelled without being dropped, clients
should revert to the previous state, deleting any newly created windows
as appropriate. When a drag operation ends as indicated by
wl_data_source.dnd_drop_performed the dragged toplevel window's final
position is determined as if a xdg_toplevel_move operation ended.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
- error
- destroy — destroy an xdg_toplevel_drag_v1 object
- attach — Move a toplevel with the drag operation
Object representing a toplevel move during a drag
xdg_toplevel_drag_v1
enum error {
toplevel_attached = 0,
ongoing_drag = 1,
}- toplevel_attached — valid toplevel already attached
- ongoing_drag — drag has not ended
xdg_toplevel_drag_v1
request destroy()
Destructor
destroy an xdg_toplevel_drag_v1 object
Destroy this xdg_toplevel_drag_v1 object. This request must only be
called after the underlying wl_data_source drag has ended, as indicated
by the dnd_drop_performed or cancelled events. In any other case an
ongoing_drag error is raised.
xdg_toplevel_drag_v1
request attach(
toplevel: object<xdg_toplevel>,
x_offset: int,
y_offset: int,
)- x_offset — dragged surface x offset
- y_offset — dragged surface y offset
Move a toplevel with the drag operation
Request that the window will be moved with the cursor during the drag
operation. The offset is a hint to the compositor how the toplevel
should be positioned relative to the cursor hotspot in surface local
coordinates and relative to the geometry of the toplevel being attached.
See xdg_surface.set_window_geometry. For example it might only
be used when an unmapped window is attached. The attached window
does not participate in the selection of the drag target.
If the toplevel is unmapped while it is attached, it is automatically
detached from the drag. In this case this request has to be called again
if the window should be attached after it is remapped.
This request can be called multiple times but issuing it while a
toplevel with an active role is attached raises a toplevel_attached
error.
Copyright
Copyright © 2023-2024 Matthias Klumpp
Copyright © 2024 David Edmundson
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
protocol to assign icons to toplevels
This protocol allows clients to set icons for their toplevel surfaces
either via the XDG icon stock (using an icon name), or from pixel data.
A toplevel icon represents the individual toplevel (unlike the application
or launcher icon, which represents the application as a whole), and may be
shown in window switchers, window overviews and taskbars that list
individual windows.
This document adheres to RFC 2119 when using words like "must",
"should", "may", etc.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
- destroy — destroy the toplevel icon manager
- create_icon — create a new icon instance
- set_icon — set an icon on a toplevel window
- icon_size — describes a supported & preferred icon size
- done — all information has been sent
Compositor Support
Version 1jay 1.14.0
kwin 6.7
labwc 0.20.2
muffin 6.7.4
interface to manage toplevel icons
This interface allows clients to create toplevel window icons and set
them on toplevel windows to be displayed to the user.
xdg_toplevel_icon_manager_v1
request destroy()
Destructor
destroy the toplevel icon manager
Destroy the toplevel icon manager.
This does not destroy objects created with the manager.
xdg_toplevel_icon_manager_v1
request set_icon(
toplevel: object<xdg_toplevel>,
icon: nullable object<xdg_toplevel_icon_v1>,
)- toplevel — the toplevel to act on
set an icon on a toplevel window
This request assigns the icon 'icon' to 'toplevel', or clears the
toplevel icon if 'icon' was null.
This state is double-buffered and is applied on the next
wl_surface.commit of the toplevel.
After making this call, the xdg_toplevel_icon_v1 provided as 'icon'
can be destroyed by the client without 'toplevel' losing its icon.
The xdg_toplevel_icon_v1 is immutable from this point, and any
future attempts to change it must raise the
'xdg_toplevel_icon_v1.immutable' protocol error.
The compositor must set the toplevel icon from either the pixel data
the icon provides, or by loading a stock icon using the icon name.
See the description of 'xdg_toplevel_icon_v1' for details.
If 'icon' is set to null, the icon of the respective toplevel is reset
to its default icon (usually the icon of the application, derived from
its desktop-entry file, or a placeholder icon).
If this request is passed an icon with no pixel buffers or icon name
assigned, the icon must be reset just like if 'icon' was null.
xdg_toplevel_icon_manager_v1
event icon_size(
size: int,
)- size — the edge size of the square icon in surface-local coordinates, e.g. 64
describes a supported & preferred icon size
This event indicates an icon size the compositor prefers to be
available if the client has scalable icons and can render to any size.
When the 'xdg_toplevel_icon_manager_v1' object is created, the
compositor may send one or more 'icon_size' events to describe the list
of preferred icon sizes. If the compositor has no size preference, it
may not send any 'icon_size' event, and it is up to the client to
decide a suitable icon size.
A sequence of 'icon_size' events must be finished with a 'done' event.
If the compositor has no size preferences, it must still send the
'done' event, without any preceding 'icon_size' events.
Version 1
a toplevel window icon
This interface defines a toplevel icon.
An icon can have a name, and multiple buffers.
In order to be applied, the icon must have either a name, or at least
one buffer assigned. Applying an empty icon (with no buffer or name) to
a toplevel should reset its icon to the default icon.
It is up to compositor policy whether to prefer using a buffer or loading
an icon via its name. See 'set_name' and 'add_buffer' for details.
xdg_toplevel_icon_v1
enum error {
invalid_buffer = 1,
immutable = 2,
no_buffer = 3,
}- invalid_buffer — the provided buffer does not satisfy requirements
- immutable — the icon has already been assigned to a toplevel and must not be changed
- no_buffer — the provided buffer has been destroyed before the toplevel icon
xdg_toplevel_icon_v1
request set_name(
icon_name: string,
)set an icon name
This request assigns an icon name to this icon.
Any previously set name is overridden.
The compositor must resolve 'icon_name' according to the lookup rules
described in the XDG icon theme specification1 using the
environment's current icon theme.
If the compositor does not support icon names or cannot resolve
'icon_name' according to the XDG icon theme specification it must
fall back to using pixel buffer data instead.
If this request is made after the icon has been assigned to a toplevel
via 'set_icon', an 'immutable' error must be raised.
xdg_toplevel_icon_v1
request add_buffer(
buffer: object<wl_buffer>,
scale: int,
)- scale — the scaling factor of the icon, e.g. 1
add icon data from a pixel buffer
This request adds pixel data supplied as wl_buffer to the icon.
The client should add pixel data for all icon sizes and scales that
it can provide, or which are explicitly requested by the compositor
via 'icon_size' events on xdg_toplevel_icon_manager_v1.
The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm
and must be a square (width and height being equal).
If any of these buffer requirements are not fulfilled, a 'invalid_buffer'
error must be raised.
If this icon instance already has a buffer of the same size and scale
from a previous 'add_buffer' request, data from the last request
overrides the preexisting pixel data.
The wl_buffer must be kept alive for as long as the xdg_toplevel_icon
it is associated with is not destroyed, otherwise a 'no_buffer' error
is raised. The buffer contents must not be modified after it was
assigned to the icon. As a result, the region of the wl_shm_pool's
backing storage used for the wl_buffer must not be modified after this
request is sent. The wl_buffer.release event is unused.
If this request is made after the icon has been assigned to a toplevel
via 'set_icon', an 'immutable' error must be raised.
Copyright
Copyright © 2024 Xaver Hugl
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
Compositor Support
Version 1hyprland 0.52.1
jay 1.14.0
kwin 6.7
muffin 6.7.4
mutter 51
protocol for setting toplevel tags
In order to make some window properties like position, size,
"always on top" or user defined rules for window behavior persistent, the
compositor needs some way to identify windows even after the application
has been restarted.
This protocol allows clients to make this possible by setting a tag for
toplevels.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
xdg_toplevel_tag_manager_v1
request set_toplevel_tag(
toplevel: object<xdg_toplevel>,
tag: string,
)set tag
Set a tag for a toplevel. The tag may be shown to the user in UI, so
it's preferable for it to be human readable, but it must be suitable
for configuration files and should not be translated.
Suitable tags would for example be "main window", "settings",
"e-mail composer" or similar.
The tag does not need to be unique across applications, and the client
may set the same tag for multiple windows, for example if the user has
opened the same UI twice. How the potentially resulting conflicts are
handled is compositor policy.
The client should set the tag as part of the initial commit on the
associated toplevel, but it may set it at any time afterwards as well,
for example if the purpose of the toplevel changes.
xdg_toplevel_tag_manager_v1
request set_toplevel_description(
toplevel: object<xdg_toplevel>,
description: string,
)- description — translated description
set description
Set a description for a toplevel. This description may be shown to the
user in UI or read by a screen reader for accessibility purposes, and
should be translated.
It is recommended to make the description the translation of the tag.
The client should set the description as part of the initial commit on
the associated toplevel, but it may set it at any time afterwards as
well, for example if the purpose of the toplevel changes.
Copyright
Copyright © 2017 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.
Protocol for grabbing the keyboard from Xwayland
This protocol is application-specific to meet the needs of the X11
protocol through Xwayland. It provides a way for Xwayland to request
all keyboard events to be forwarded to a surface even when the
surface does not have keyboard focus.
In the X11 protocol, a client may request an "active grab" on the
keyboard. On success, all key events are reported only to the
grabbing X11 client. For details, see XGrabKeyboard(3).
The core Wayland protocol does not have a notion of an active
keyboard grab. When running in Xwayland, X11 applications may
acquire an active grab inside Xwayland but that cannot be translated
to the Wayland compositor who may set the input focus to some other
surface. In doing so, it breaks the X11 client assumption that all
key events are reported to the grabbing client.
This protocol specifies a way for Xwayland to request all keyboard
be directed to the given surface. The protocol does not guarantee
that the compositor will honor this request and it does not
prescribe user interfaces on how to handle the respond. For example,
a compositor may inform the user that all key events are now
forwarded to the given client surface, or it may ask the user for
permission to do so.
Compositors are required to restrict access to this application
specific protocol to Xwayland alone.
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 'z' prefix and the version number in the protocol and
interface names are removed and the interface version number is
reset.
Version 1
context object for keyboard grab manager
A global interface used for grabbing the keyboard.
zwp_xwayland_keyboard_grab_manager_v1
request grab_keyboard(
id: new_id<zwp_xwayland_keyboard_grab_v1>,
surface: object<wl_surface>,
seat: object<wl_seat>,
)- surface — surface to report keyboard events to
- seat — the seat for which the keyboard should be grabbed
grab the keyboard to a surface
The grab_keyboard request asks for a grab of the keyboard, forcing
the keyboard focus for the given seat upon the given surface.
The protocol provides no guarantee that the grab is ever satisfied,
and does not require the compositor to send an error if the grab
cannot ever be satisfied. It is thus possible to request a keyboard
grab that will never be effective.
The protocol:
does not guarantee that the grab itself is applied for a surface,
the grab request may be silently ignored by the compositor,
does not guarantee that any events are sent to this client even
if the grab is applied to a surface,
does not guarantee that events sent to this client are exhaustive,
a compositor may filter some events for its own consumption,
does not guarantee that events sent to this client are continuous,
a compositor may change and reroute keyboard events while the grab
is nominally active.
Version 1
- destroy — destroy the grabbed keyboard object
interface for grabbing the keyboard
A global interface used for grabbing the keyboard.
zwp_xwayland_keyboard_grab_v1
request destroy()
Destructor
destroy the grabbed keyboard object
Destroy the grabbed keyboard object. If applicable, the compositor
will ungrab the keyboard.
Copyright
Copyright © 2022 Joshua Ashton
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Protocol for associating X11 windows to wl_surfaces
This protocol adds a xwayland_surface role which allows an Xwayland
server to associate an X11 window to a wl_surface.
Before this protocol, this would be done via the Xwayland server
providing the wl_surface's resource id via the a client message with
the WL_SURFACE_ID atom on the X window.
This was problematic as a race could occur if the wl_surface
associated with a WL_SURFACE_ID for a window was destroyed before the
client message was processed by the compositor and another surface
(or other object) had taken its id due to recycling.
This protocol solves the problem by moving the X11 window to wl_surface
association step to the Wayland side, which means that the association
cannot happen out-of-sync with the resource lifetime of the wl_surface.
This protocol avoids duplicating the race on the other side by adding a
non-zero monotonic serial number which is entirely unique that is set on
both the wl_surface (via. xwayland_surface_v1's set_serial method) and
the X11 window (via. the WL_SURFACE_SERIAL client message) that can be
used to associate them, and synchronize the two timelines.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
Version 1
Compositor Support
Version 1cage 0.3.0
hyprland 0.52.1
wayfire 0.9.0
context object for Xwayland shell
xwayland_shell_v1 is a singleton global object that
provides the ability to create a xwayland_surface_v1 object
for a given wl_surface.
This interface is intended to be bound by the Xwayland server.
A compositor must not allow clients other than Xwayland to
bind to this interface. A compositor should hide this global
from other clients' wl_registry.
A client the compositor does not consider to be an Xwayland
server attempting to bind this interface will result in
an implementation-defined error.
An Xwayland server that has bound this interface must not
set the WL_SURFACE_ID atom on a window.
Version 1
interface for associating Xwayland windows to wl_surfaces
An Xwayland surface is a surface managed by an Xwayland server.
It is used for associating surfaces to Xwayland windows.
The Xwayland server associated with actions in this interface is
determined by the Wayland client making the request.
The client must call wl_surface.commit on the corresponding wl_surface
for the xwayland_surface_v1 state to take effect.
xwayland_surface_v1
enum error {
already_associated = 0,
invalid_serial = 1,
}- already_associated — given wl_surface is already associated with an X11 window
- invalid_serial — serial was not valid
xwayland_surface_v1
request set_serial(
serial_lo: uint,
serial_hi: uint,
)- serial_lo — The lower 32-bits of the serial number associated with the X11 window
- serial_hi — The upper 32-bits of the serial number associated with the X11 window
associates a Xwayland window to a wl_surface
Associates an Xwayland window to a wl_surface.
The association state is double-buffered, see wl_surface.commit.
The serial_lo and serial_hi parameters specify a non-zero
monotonic serial number which is entirely unique and provided by the
Xwayland server equal to the serial value provided by a client message
with a message type of the WL_SURFACE_SERIAL atom on the X11 window
for this surface to be associated to.
The serial value in the WL_SURFACE_SERIAL client message is specified
as having the lo-bits specified in l[0] and the hi-bits specified
in l[1].
If the serial value provided by serial_lo and serial_hi is not
valid, the invalid_serial protocol error will be raised.
An X11 window may be associated with multiple surfaces throughout its
lifespan. (eg. unmapping and remapping a window).
For each wl_surface, this state must not be committed more than once,
otherwise the already_associated protocol error will be raised.
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.
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.
Version 1
Compositor Support
Display cutouts area manager
This interface allows a compositor to announce support for
supplying cutout information to the client.
xx_cutouts_manager_v1
enum error {
invalid_role = 0,
defunct_cutouts_object = 1,
}- invalid_role — given wl_surface has incorrect role
- defunct_cutouts_object — wl_surface or surface role was destroyed before the cutouts object
xx_cutouts_manager_v1
request destroy()
Destructor
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.
xx_cutouts_manager_v1
request get_cutouts(
id: new_id<xx_cutouts_v1>,
surface: object<wl_surface>,
)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.
Version 1
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.
xx_cutouts_v1
enum type {
cutout = 0,
notch = 1,
waterfall = 2,
}- cutout
A generic cutout
This element type can be used by the compositor if it
doesn't want to provide a more specific type.
- notch
Small functional cutout area
A functional, irregular shape on one of the device's
edges. It often contains a camera.
- waterfall
A curved display edge
A curved display edge intended to make the device appear
like not having any bezel.
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.
xx_cutouts_v1
enum corner_position {
top_left = 0,
top_right = 1,
bottom_right = 2,
bottom_left = 3,
}Corner position
The position of a corner on a surface
xx_cutouts_v1
enum error {
invalid_element_id = 0,
}- invalid_element_id — Invalid element id in a set_unhandled request
xx_cutouts_v1
request destroy()
Destructor
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.
xx_cutouts_v1
event cutout_box(
x: int,
y: int,
width: int,
height: int,
type: uint<type>,
id: uint,
)- x — x coordinate of the box's top left corner
- y — y coordinate of the box's top left corner
- type — The type of cutout
- id — An identifier identifying the physical element
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.
xx_cutouts_v1
event cutout_corner(
position: uint<corner_position>,
radius: uint,
id: uint,
)- position — The position of the described corner
- radius — The corner's radius
- id — An identifier identifying the physical element
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.
xx_cutouts_v1
event configure()
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.
xx_cutouts_v1
request set_unhandled(
unhandled: array,
)- unhandled — array of unhandled element ids
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.
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.
Protocol for fractional scaling
This protocol allows compositors and clients to communicate the
coordinate space their surfaces act in.
Version 1
xx_fractional_scale_manager_v2
request destroy()
Destructor
release the global
Informs the server that the client will not be using this protocol
object anymore. This does not affect any other objects.
Version 1
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.
xx_fractional_scale_v2
event scale_factor(
scale_8_24: uint,
)- scale_8_24 — surface scale factor
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.
xx_fractional_scale_v2
request set_scale_factor(
scale_8_24: uint,
)- scale_8_24 — surface scale factor
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.
Copyright
Copyright © 2026 Aurelien Brabant
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.
client-managed global hotkeys
This protocol lets a client bind, and freely reconfigure, its own global
hotkeys: it describes a trigger and the compositor accepts it or rejects it
with a reason. A hotkey fires regardless of which surface holds keyboard
focus. The compositor remains the arbiter and may deny a commit or revoke a
binding at any time, but the client chooses the trigger.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
A bound hotkey always has exactly the trigger the client committed; the
compositor never substitutes one of its own.
A binding lives only as long as its xx_hotkey_v1 object and the client
connection; nothing is persisted by the protocol.
Whether a trigger is exclusive is compositor policy. A compositor may treat
triggers as exclusive and reject a clashing commit with "already_bound", or
may grant the same trigger to several bindings, in which case each bound
hotkey receives the events. Clients must cope with either.
Security considerations:
A global hotkey lets an unfocused client observe that a specific trigger
fired. Compositors are the security boundary and should apply policy when
deciding whether to accept a commit. As a default, we suggest the following
pseudo-code. This is not a wire requirement: every compositor is free to apply
a different policy and can expose settings to allow the user to configure it.
fn acceptable(trigger) {
if trigger.modifiers contains any of {ctrl, alt, super}:
return true # modified triggers are always acceptable
match trigger:
button(code):
return code is an auxiliary button
# side, extra, forward, back, task
key(keysym):
if keysym is a modifier keysym:
return true # a lone modifier, see set_key_trigger
if keysym is a keypad key:
return true # commonly a dedicated macro cluster
if keysym is a dead key:
return false # no character mapping, but composes text
if keysym has a character mapping:
return false # letters, digits, punctuation, space, Enter, Tab, ...
return true # purely functional: function, media, navigation keys
}
The protocol's one hard guarantee is containment: a compositor must not
deliver events for a trigger the client did not successfully bind, and never
forwards the raw input stream.
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.
Version 1
global hotkey factory
Identifies the application and creates global hotkeys.
xx_hotkey_manager_v1
enum error {
invalid_app_id = 0,
}- invalid_app_id — the app id was empty, set more than once, or set after a hotkey was committed
illegal request sequences
Fatal protocol errors.
xx_hotkey_manager_v1
enum modifiers {
shift = 1,
ctrl = 2,
alt = 4,
super = 8,
}This is a bitfield
- shift — the Shift modifier
- ctrl — the Control modifier
- alt — the Alt modifier
- super — the Super/Logo modifier
modifier keys required by a trigger
A bitmask of the modifiers that must be held for the trigger to fire.
The match is exact: a trigger does not fire while a modifier outside
its mask is held, so Super+Space does not fire on Super+Shift+Space.
Bits outside this enum raise the "invalid_trigger" error.
These are fixed, keymap-independent semantic bits. A compositor matches
each bit against the corresponding modifier in its keyboard state as the
keymap defines it; for the xkb_v1 keymap format that is shift ->
XKB_MOD_NAME_SHIFT, ctrl -> XKB_MOD_NAME_CTRL, alt -> XKB_MOD_NAME_ALT
("Mod1"), super -> XKB_MOD_NAME_LOGO ("Mod4").
A client needs neither a wl_keyboard nor a keymap to describe a trigger.
Lock modifiers (Caps Lock, Num Lock, Scroll Lock) are never part of a
binding and are ignored when matching.
xx_hotkey_manager_v1
request destroy()
Destructor
destroy the manager
Destroy the manager object. Hotkey objects created through this manager
are unaffected and remain valid.
xx_hotkey_manager_v1
request set_app_id(
app_id: string,
)- app_id — advisory application identifier (should be the desktop file ID)
set the application identifier
Identify the application, for use in compositor policy and user-facing
audit interfaces. It applies to every hotkey created by this manager.
Optional; if sent, it must not be empty, must be sent at most once, and
must be sent before the first commit, so that every policy decision
sees the same identity.
Where the application has a desktop entry, app_id should be its desktop
file ID as defined by the freedesktop.org Desktop Entry specification,
matching the convention used by xdg_toplevel.set_app_id.
It is advisory and may be spoofed; a compositor that needs a trustworthy
identity should obtain it through the security-context mechanism.
Version 1
a single global hotkey
Represents one global hotkey. The object is built up with set_* requests
and applied with commit; a trigger is required, everything else is
optional. Requests have no effect on the binding until commit is sent.
Exactly one "bound" or "denied" event is sent per commit, in the order the
commits were issued. While the hotkey is bound, "triggered" and "released"
are sent as the trigger is activated. The compositor may send "revoked" at
any time to withdraw the binding.
xx_hotkey_v1
enum error {
invalid_trigger = 0,
no_trigger = 1,
}- invalid_trigger — a null keysym, or unknown modifier bits
- no_trigger — commit was sent before any trigger was described
illegal request sequences
Fatal protocol errors. A trigger that is merely unacceptable to the
compositor is reported through "denied" and is not an error.
xx_hotkey_v1
enum deny_reason {
already_bound = 0,
not_permitted = 1,
}- already_bound — held by another hotkey the compositor treats as exclusive
- not_permitted — the trigger is disallowed by compositor policy
why a commit was rejected
A reason code describing why the commit got denied. The object remains
valid, any previously established binding is unaffected, and the client
may describe a different trigger and commit again.
A compositor is not obliged to distinguish "already_bound" from
"not_permitted" and may report the latter for both.
xx_hotkey_v1
request destroy()
Destructor
release the hotkey
Release the binding and destroy the object.
Destroying the object with a commit still in flight cancels it.
xx_hotkey_v1
request set_description(
description: string,
)- description — localized action description
set the human-readable description
Set a human-readable, localized description of what the hotkey does
(e.g. "Toggle the launcher"), for display in compositor user interface.
Optional.
xx_hotkey_v1
request set_seat(
seat: nullable object<wl_seat>,
)- seat — target seat, or null for all of the client's seats
restrict the hotkey to one seat
Restrict the hotkey to the given seat, or pass null for all of the
client's seats, virtual ones included. Optional; the default is null.
If the given seat is removed, the compositor sends "revoked".
xx_hotkey_v1
request set_key_trigger(
keysym: uint,
modifiers: uint<xx_hotkey_manager_v1.modifiers>,
)- keysym — keysym of the trigger key
- modifiers — bitmask of required modifiers
trigger on a key
Describe the trigger as a key pressed while the given modifiers are
held. Replaces any trigger previously described. Takes effect on the
next commit.
The keysym uses the numbering shared with the keymap delivered over
wl_keyboard (for the xkb_v1 keymap format, an XKB_KEY_* value), in its
unshifted form (XKB_KEY_b, not XKB_KEY_B). The compositor matches it
against the keysym each key produces at its first shift level in any of
the user's layout groups, ignoring the effect Shift has on the key, so
that Shift is handled through the modifier mask like every other
modifier and a binding keeps firing after a layout group switch. A
binding whose keysym no group of the current keymap produces stays
bound and simply does not fire until the keymap changes again.
The trigger fires on key press; the compositor does not wait to see
whether another key follows. The press and the matching release are
consumed and must not be delivered to the focused surface.
The keysym may be one that contributes to modifier state, such as
XKB_KEY_Super_L; whether it does is decided by the seat's keymap. Such a
trigger is a tap: it fires when the key is released, and only if no
other key, button or axis event occurred while it was held. A
compositor may additionally require that it was held no longer than
some interval. The modifier mask is evaluated as the state before the
key was pressed, so a lone left Super key is (XKB_KEY_Super_L, 0) and
(XKB_KEY_Shift_L, ctrl) is a tap on Shift while Control is held.
A tap is never consumed: the key must still update modifier state and
reach the focused surface, so binding it does not stop it composing
other shortcuts. "triggered" and "released" are sent together on
release, so a tap cannot drive press-and-hold.
A null keysym raises the "invalid_trigger" error.
xx_hotkey_v1
request set_button_trigger(
button: uint,
modifiers: uint<xx_hotkey_manager_v1.modifiers>,
)- button — button code, as in wl_pointer.button
- modifiers — bitmask of required modifiers
trigger on a pointer button
Describe the trigger as a pointer button pressed while the given
modifiers are held. Replaces any trigger previously described. Takes
effect on the next commit.
The button is a button code in the same space as wl_pointer.button.
The press and the matching release are consumed and must not be
delivered to the surface under the pointer.
xx_hotkey_v1
request commit()
apply the hotkey
Apply the state built up on this object. The compositor replies with
exactly one "bound" or "denied" event per commit, in order.
Sending commit before a trigger has been described raises the
"no_trigger" error.
Commit may be sent again to apply a changed trigger, description or
seat, keeping the binding's identity. Values set with set_* requests are
retained across commits, accepted or denied, and each commit applies
all of them; committing with nothing changed is accepted with "bound".
An established binding survives a rejected commit: the previous state
stays active, so a denied reconfiguration never leaves the user with no
hotkey.
xx_hotkey_v1
event bound()
the hotkey is now active
The commit was accepted and the binding is active with the trigger that
was committed. "triggered" and "released" events may follow.
xx_hotkey_v1
event denied(
reason: uint<deny_reason>,
message: string,
)- reason — why it was rejected
- message — optional human-readable detail for display (may be empty)
the commit was rejected
The committed trigger was not bound. Any previously established binding
remains active with its previous trigger.
message is an optional, advisory, human-readable explanation in the
compositor's locale, intended for verbatim display. It may be empty.
Clients must not parse it; all programmatic behavior keys off reason.
xx_hotkey_v1
event revoked(
message: string,
)- message — optional human-readable detail for display (may be empty)
a previously active hotkey was withdrawn
A binding that was previously "bound" is no longer active. No further
input events will be sent for it. The client should destroy this object
and must not silently commit the same trigger again; whether to retry
is the user's decision.
message has the same meaning as in the "denied" event.
xx_hotkey_v1
event triggered(
serial: uint,
time: uint,
)- serial — input serial for the activation
- time — timestamp in milliseconds
the hotkey fired
The bound trigger fired. This event is sent once each time it fires; the
compositor does not auto-repeat the hotkey.
serial is an input serial that counts as a recent user interaction. A
client may pass it to xdg_activation_token_v1.set_serial to raise or
focus a surface, and a compositor should honor activation carried by it.
time is the event timestamp, on the same millisecond clock as
wl_pointer and wl_keyboard input events.
xx_hotkey_v1
event released(
serial: uint,
time: uint,
)- serial — input serial for the activation
- time — timestamp in milliseconds
the hotkey was released
The key or button of a previously triggered hotkey was released,
regardless of modifier state. This enables press-and-hold uses such as
push-to-talk; clients that only act on the initial firing may ignore
it.
serial and time have the same meaning as in the "triggered" event.
Copyright
Copyright © 2025-2026 Julian Orth
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.
image-copy-capture extension to support color management
This protocol provides extensions to the ext-image-capture-source-v1 and
ext-image-copy-capture-v1 protocols to allow clients to capture frames in
color spaces other than srgb/gamma22.
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.
Version 1
global to add color-management support for image captures
This global allows clients to retrieve information about the preferred
image description of a capture source and to define the image description
of a capture frame.
xx_image_capture_color_manager_v1
enum error {
image_description_not_ready = 1,
already_captured = 2,
}- image_description_not_ready — the image description is not ready
- already_captured — capture request has been sent
Version 1
capture source color properties
This object describes the color properties of a capture source.
The xx_image_capture_source_colors_v1 is associated with the compositor
object backing the source. Therefore the client destroying the
ext_image_capture_source_v1 object has no impact. The object becomes inert
when the compositor object backing the source is destroyed. How the client
can detect this depends on the source.
xx_image_capture_source_colors_v1
event preferred_changed(
identity_hi: uint,
identity_lo: uint,
)- identity_hi — image description id number (high 32 bits)
- identity_lo — image description id number (low 32 bits)
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 capture frames. This event is sent whenever
the compositor changes the capture source'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 wants to know what the preferred
image description is, it shall use the
xx_image_capture_source_colors_v1.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
xx_image_capture_color_manager_v1.set_frame_image_description, but there
might be performance and color accuracy improvements by providing the
capture frame's contents in the preferred image description. Therefore
clients that can, should capture frames in the preferred image
description.
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.
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.
Version 1
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.
xx_session_manager_v1
enum reason {
launch = 1,
recover = 2,
session_restore = 3,
}- launch
an app is newly launched
A new app instance is launched, for example from an app launcher.
- recover
an app recovered
An app instance is recovering from for example a compositor or app crash.
- session_restore
an app restored
An app instance is restored, for example part of a restored session, or
restored from having been temporarily terminated due to resource
constraints.
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.
xx_session_manager_v1
request get_session(
id: new_id<xx_session_v1>,
reason: uint<reason>,
session: nullable string,
)- reason — reason for session
- session — the session to restore
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.
Version 1
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.
xx_session_v1
enum error {
invalid_restore = 1,
name_in_use = 2,
already_mapped = 3,
}- invalid_restore — restore cannot be performed after initial toplevel commit
- name_in_use — toplevel name is already in used
- already_mapped — toplevel was already mapped when restored
xx_session_v1
request destroy()
Destructor
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.
xx_session_v1
request remove()
Destructor
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.
xx_session_v1
request add_toplevel(
id: new_id<xx_toplevel_session_v1>,
toplevel: object<xdg_toplevel>,
name: string,
)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.
xx_session_v1
request restore_toplevel(
id: new_id<xx_toplevel_session_v1>,
toplevel: object<xdg_toplevel>,
name: string,
)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.
xx_session_v1
event created(
id: string,
)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.
xx_session_v1
event restored()
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.
xx_session_v1
event replaced()
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.
Version 1
- destroy — Destroy the object
- remove — remove a surface from the session
- restored — a toplevel's session has been restored
xx_toplevel_session_v1
request destroy()
Destructor
Destroy the object
Destroy the object. This has no effect window management of the
associated toplevel.
xx_toplevel_session_v1
request remove()
Destructor
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.
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.
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.
Version 3
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.
xx_text_input_v3
request destroy()
Destructor
Destroy the xx_text_input
Destroy the xx_text_input object. Also disables all surfaces enabled
through this xx_text_input object.
xx_text_input_v3
request enable()
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.
xx_text_input_v3
request disable()
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.
xx_text_input_v3
request set_surrounding_text(
text: string,
cursor: int,
anchor: int,
)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.
xx_text_input_v3
enum change_cause {
input_method = 0,
other = 1,
}- input_method — input method caused the change
- other — something else than the input method caused the change
text change reason
Reason for the change of surrounding text or cursor posision.
xx_text_input_v3
request set_text_change_cause(
cause: uint<change_cause>,
)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.
xx_text_input_v3
enum content_hint {
none = 0x0,
completion = 0x1,
spellcheck = 0x2,
auto_capitalization = 0x4,
lowercase = 0x8,
uppercase = 0x10,
titlecase = 0x20,
hidden_text = 0x40,
sensitive_data = 0x80,
latin = 0x100,
multiline = 0x200,
}This is a bitfield
- none — no special behavior
- completion — suggest word completions
- spellcheck — suggest word corrections
- auto_capitalization — switch to uppercase letters at the start of a sentence
- lowercase — prefer lowercase letters
- uppercase — prefer uppercase letters
- titlecase — prefer casing for titles and headings (can be language dependent)
- hidden_text — characters should be hidden
- sensitive_data — typed text should not be stored
- latin — just Latin characters should be entered
- multiline — the text input is multiline
content hint
Content hint is a bitmask to allow to modify the behavior of the text
input.
xx_text_input_v3
enum content_purpose {
normal = 0,
alpha = 1,
digits = 2,
number = 3,
phone = 4,
url = 5,
email = 6,
name = 7,
password = 8,
pin = 9,
date = 10,
time = 11,
datetime = 12,
terminal = 13,
}- normal — default input, allowing all characters
- alpha — allow only alphabetic characters
- digits — allow only digits
- number — input a number (including decimal separator and sign)
- phone — input a phone number
- url — input an URL
- email — input an email address
- name — input a name of a person
- password — input a password (combine with sensitive_data hint)
- pin — input is a numeric password (combine with sensitive_data hint)
- date — input a date
- time — input a time
- datetime — input a date and time
- terminal — input for a terminal
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.
xx_text_input_v3
request set_content_type(
hint: uint<content_hint>,
purpose: uint<content_purpose>,
)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.
xx_text_input_v3
request set_cursor_rectangle(
x: int,
y: int,
width: int,
height: int,
)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.
xx_text_input_v3
request commit()
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.
xx_text_input_v3
event enter(
surface: object<wl_surface>,
)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.
xx_text_input_v3
event leave(
surface: object<wl_surface>,
)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.
xx_text_input_v3
event preedit_string(
text: nullable string,
cursor_begin: int,
cursor_end: int,
)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.
xx_text_input_v3
event commit_string(
text: nullable string,
)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.
xx_text_input_v3
event delete_surrounding_text(
before_length: uint,
after_length: uint,
)- before_length — length of text before current cursor position
- after_length — length of text after current cursor position
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.
xx_text_input_v3
event move_cursor(
cursor: int,
anchor: int,
)Available since version 2
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.
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.
xx_text_input_v3
event done(
serial: uint,
)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:
Replace existing preedit string with the cursor.
Delete requested surrounding text.
Insert commit string with the cursor at its end.
Move the cursor and selection.
Calculate surrounding text to send.
Insert new preedit text in cursor position.
Place cursor inside preedit text.
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.
xx_text_input_v3
enum action {
none = 1,
finish = 0,
}Available since version 2
- none
no action
This enum value exists only to provide a default to make double-buffering implementation easier. It should not be used explicitly.
- finish
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.
action
A possible action to perform on a text input.
xx_text_input_v3
event perform_action(
action: uint<action>,
)Available since version 2
- action — action performed
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.
xx_text_input_v3
request set_available_actions(
available_actions: array,
)Available since version 2
- available_actions — available actions
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.
xx_text_input_v3
enum supported_features {
none = 0x0,
move_cursor = 0x1,
}This is a bitfieldAvailable since version 2
- none — no extra functionality supported
- move_cursor — the move_cursor request
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.
xx_text_input_v3
request announce_supported_features(
features: uint<supported_features>,
)Available since version 2
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.
Version 3
text input manager
A factory for text-input objects. This object is a global singleton.
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.
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.
Version 1
manage zones for clients
The 'xx_zone_manager' interface defines base requests for obtaining and
managing zones for a client.
xx_zone_manager_v1
request destroy()
Destructor
Destroy this object
This has no effect other than to destroy the xx_zone_manager object.
xx_zone_manager_v1
request get_zone(
id: new_id<xx_zone_v1>,
output: nullable object<wl_output>,
)- output — the preferred output to place the zone on, or NULL
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.
xx_zone_manager_v1
request get_zone_from_handle(
id: new_id<xx_zone_v1>,
handle: string,
)- handle — the handle of a zone
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.
Version 1
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.
All item coordinates used by this interface refer to the top-left
corner of the item's frame, that is the item surface extended by the
extents reported in the 'frame_extents' event. If the item has no
frame, they refer to the top-left corner of the item surface. To
obtain the position of the surface content, a client adds the left
and top frame extents to the item position.
xx_zone_item_v1
request destroy()
Destructor
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.
xx_zone_item_v1
event frame_extents(
top: int,
bottom: int,
left: int,
right: int,
)- top — current height of the frame bordering the top of the item
- bottom — current height of the frame bordering the bottom of the item
- left — current width of the frame bordering the left of the item
- right — current width of the frame bordering the right of the item
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.
xx_zone_item_v1
request set_position(
x: int,
y: int,
)- x — x position relative to zone
- y — y position relative to zone
set a preferred item position
Request a preferred position (x, y) for the frame of the specified
item 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 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, once the request has been applied. If the
item already is at the requested (or sanitized) position, the request
is considered successful and a 'position' event must still be emitted.
If the current item has no zone associated with it, a 'position_failed'
event must be emitted instead.
If the compositor refused to move the item at all, not even to sanitized
coordinates (e.g. because compositor policy does not allow the item to
be moved in its current state), a 'position_failed' event must be
emitted as well.
xx_zone_item_v1
event position(
x: int,
y: int,
)- x — current x position relative to zone
- y — current y position relative to zone
notify about the position of an item
This event notifies the client of the current position (x, y) of
the item's frame 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.
xx_zone_item_v1
event position_failed()
a set_position request has failed
The compositor did not apply a 'set_position' request at all, not
even with sanitized coordinates, and the item remains at its previous
position.
This event will also be emitted if 'set_position' was called while the
item had no zone associated with it.
xx_zone_item_v1
event closed()
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.
Version 1
- destroy — destroy the xx_zone object
- size — size of the zone
- handle — the zone handle
- done — all information about the zone has been sent
- error
- add_item — associate an item with this zone
- remove_item — disassociate an item from this zone
- item_blocked — an item could not be associated with this zone
- item_entered — notify about an item having joined this zone
- item_left — notify about an item having left this zone
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'.
xx_zone_v1
request destroy()
Destructor
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.
xx_zone_v1
event size(
width: int,
height: int,
)- width — zone width in logical pixels
- height — zone height in logical pixels
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.
xx_zone_v1
event handle(
handle: string,
)- handle — the exported zone handle
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.
xx_zone_v1
event done()
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.
xx_zone_v1
enum error {
invalid = 0,
}- invalid — an invalid value has been submitted
xx_zone_v1
request add_item(
item: object<xx_zone_item_v1>,
)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.
xx_zone_v1
request remove_item(
item: object<xx_zone_item_v1>,
)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.
xx_zone_v1
event item_blocked(
item: object<xx_zone_item_v1>,
)- item — the item that was prevented from joining this zone
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.
xx_zone_v1
event item_entered(
item: object<xx_zone_item_v1>,
)- item — the item that has joined the zone
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.
xx_zone_v1
event item_left(
item: object<xx_zone_item_v1>,
)- item — the item that has left the zone
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'.
Copyright
Copyright 2016 The Chromium Authors.
Copyright 2017 Intel Corporation
Copyright 2018 Collabora, Ltd
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
Compositor Support
protocol for providing explicit synchronization
This global is a factory interface, allowing clients to request
explicit synchronization for buffers on a per-surface basis.
See zwp_linux_surface_synchronization_v1 for more information.
This interface is derived from Chromium's
zcr_linux_explicit_synchronization_v1.
Note: this protocol is superseded by linux-drm-syncobj.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
zwp_linux_explicit_synchronization_v1
request get_synchronization(
id: new_id<zwp_linux_surface_synchronization_v1>,
surface: object<wl_surface>,
)- id — the new synchronization interface id
- surface — the surface
extend surface interface for explicit synchronization
Instantiate an interface extension for the given wl_surface to provide
explicit synchronization.
If the given wl_surface already has an explicit synchronization object
associated, the synchronization_exists protocol error is raised.
Graphics APIs, like EGL or Vulkan, that manage the buffer queue and
commits of a wl_surface themselves, are likely to be using this
extension internally. If a client is using such an API for a
wl_surface, it should not directly use this extension on that surface,
to avoid raising a synchronization_exists protocol error.
Version 2
per-surface explicit synchronization support
This object implements per-surface explicit synchronization.
Synchronization refers to co-ordination of pipelined operations performed
on buffers. Most GPU clients will schedule an asynchronous operation to
render to the buffer, then immediately send the buffer to the compositor
to be attached to a surface.
In implicit synchronization, ensuring that the rendering operation is
complete before the compositor displays the buffer is an implementation
detail handled by either the kernel or userspace graphics driver.
By contrast, in explicit synchronization, dma_fence objects mark when the
asynchronous operations are complete. When submitting a buffer, the
client provides an acquire fence which will be waited on before the
compositor accesses the buffer. The Wayland server, through a
zwp_linux_buffer_release_v1 object, will inform the client with an event
which may be accompanied by a release fence, when the compositor will no
longer access the buffer contents due to the specific commit that
requested the release event.
Each surface can be associated with only one object of this interface at
any time.
In version 1 of this interface, explicit synchronization is only
guaranteed to be supported for buffers created with any version of the
wp_linux_dmabuf buffer factory. Version 2 additionally guarantees
explicit synchronization support for opaque EGL buffers, which is a type
of platform specific buffers described in the EGL_WL_bind_wayland_display
extension. Compositors are free to support explicit synchronization for
additional buffer types.
zwp_linux_surface_synchronization_v1
request destroy()
Destructor
destroy synchronization object
Destroy this explicit synchronization object.
Any fence set by this object with set_acquire_fence since the last
commit will be discarded by the server. Any fences set by this object
before the last commit are not affected.
zwp_linux_buffer_release_v1 objects created by this object are not
affected by this request.
zwp_linux_surface_synchronization_v1
enum error {
invalid_fence = 0,
duplicate_fence = 1,
duplicate_release = 2,
no_surface = 3,
unsupported_buffer = 4,
no_buffer = 5,
}- invalid_fence — the fence specified by the client could not be imported
- duplicate_fence — multiple fences added for a single surface commit
- duplicate_release — multiple releases added for a single surface commit
- no_surface — the associated wl_surface was destroyed
- unsupported_buffer — the buffer does not support explicit synchronization
- no_buffer — no buffer was attached
zwp_linux_surface_synchronization_v1
request set_acquire_fence(
fd: fd,
)set the acquire fence
Set the acquire fence that must be signaled before the compositor
may sample from the buffer attached with wl_surface.attach. The fence
is a dma_fence kernel object.
The acquire fence is double-buffered state, and will be applied on the
next wl_surface.commit request for the associated surface. Thus, it
applies only to the buffer that is attached to the surface at commit
time.
If the provided fd is not a valid dma_fence fd, then an INVALID_FENCE
error is raised.
If a fence has already been attached during the same commit cycle, a
DUPLICATE_FENCE error is raised.
If the associated wl_surface was destroyed, a NO_SURFACE error is
raised.
If at surface commit time the attached buffer does not support explicit
synchronization, an UNSUPPORTED_BUFFER error is raised.
If at surface commit time there is no buffer attached, a NO_BUFFER
error is raised.
Version 1
buffer release explicit synchronization
This object is instantiated in response to a
zwp_linux_surface_synchronization_v1.get_release request.
It provides an alternative to wl_buffer.release events, providing a
unique release from a single wl_surface.commit request. The release event
also supports explicit synchronization, providing a fence FD for the
client to synchronize against.
Exactly one event, either a fenced_release or an immediate_release, will
be emitted for the wl_surface.commit request. The compositor can choose
release by release which event it uses.
This event does not replace wl_buffer.release events; servers are still
required to send those events.
Once a buffer release object has delivered a 'fenced_release' or an
'immediate_release' event it is automatically destroyed.
zwp_linux_buffer_release_v1
event fenced_release(
fence: fd,
)Destructor
- fence — fence for last operation on buffer
release buffer with fence
Sent when the compositor has finalised its usage of the associated
buffer for the relevant commit, providing a dma_fence which will be
signaled when all operations by the compositor on that buffer for that
commit have finished.
Once the fence has signaled, and assuming the associated buffer is not
pending release from other wl_surface.commit requests, no additional
explicit or implicit synchronization is required to safely reuse or
destroy the buffer.
This event destroys the zwp_linux_buffer_release_v1 object.
zwp_linux_buffer_release_v1
event immediate_release()
Destructor
release buffer immediately
Sent when the compositor has finalised its usage of the associated
buffer for the relevant commit, and either performed no operations
using it, or has a guarantee that all its operations on that buffer for
that commit have finished.
Once this event is received, and assuming the associated buffer is not
pending release from other wl_surface.commit requests, no additional
explicit or implicit synchronization is required to safely reuse or
destroy the buffer.
This event destroys the zwp_linux_buffer_release_v1 object.
Copyright
Copyright © 2025 System76
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.
toggle various accessibility features
This protocols provides way to toggle various accessibility features
in the COSMIC desktop environment for shell components.
Version 3
Compositor Support
a11y global
Manager to toggle accessibility features.
cosmic_a11y_manager_v1
event magnifier(
active: uint<active_state>,
)- active — If the screen magnifier is enabled
State of the screen magnifier
State of the screen magnifier.
This event will be emitted by the compositor when binding the protocol
and whenever the state changes.
cosmic_a11y_manager_v1
request set_magnifier(
active: uint<active_state>,
)- active — If the screen magnifier should be enabled
Set the screen magnifier on or off
Sets the state of the screen magnifier.
The client must not assume any requested changes are actually applied and should wait
until the next magnifier event before updating it's UI.
cosmic_a11y_manager_v1
event screen_filter(
inverted: uint<active_state>,
filter: uint<filter>,
)Available since version 2Deprecated since version 3
- inverted — If the screen colors are inverted
- filter — Which if any screen filter is enabled
State of screen filtering
Parameters used for screen filtering.
This event will be emitted by the compositor when binding the protocol
and whenever the state changes.
If a screen filter is used not known to the protocol or the bound version
filter will be set to unknown.
Since version 3 this event will not be emitted anymore, instead use screen_filter2.
cosmic_a11y_manager_v1
request set_screen_filter(
inverted: uint<active_state>,
filter: uint<filter>,
)Available since version 2Deprecated since version 3
- inverted — If the screen colors should be inverted
- filter — Which if any filter should be used
Set screen filtering
Set the parameters for screen filtering.
If the filter is set to unknown, the compositor MUST not change the current state
of the filter. This is to allow clients to update the inverted state, even if they
don't know about the current active filter.
The client must not assume any requested changes are actually applied and should wait
until the next screen_filter event before updating it's UI.
Send this request will raised a "deprecated" protocol error, if version 3 or higher was bound.
Use set_screen_filter2 instead.
cosmic_a11y_manager_v1
enum filter {
disabled = 0,
unknown = 1,
greyscale = 2,
daltonize_protanopia = 3,
daltonize_deuteranopia = 4,
daltonize_tritanopia = 5,
}Available since version 2
cosmic_a11y_manager_v1
event screen_filter2(
inverted: uint<active_state>,
filter: uint<filter>,
filter_state: uint<active_state>,
)Available since version 3
- inverted — If the screen colors are inverted
- filter — Which if any screen filter is selected
- filter_state — If the screen filter is active
State of screen filtering
Parameters used for screen filtering.
This event will be emitted by the compositor when binding the protocol
and whenever the state changes.
If a screen filter is used not known to the protocol or the bound version
filter will be set to unknown.
The compositor must never send "disabled" as the "filter" argument.
cosmic_a11y_manager_v1
request set_screen_filter2(
inverted: uint<active_state>,
filter: uint<filter>,
filter_state: uint<active_state>,
)Available since version 3
- inverted — If the screen colors should be inverted
- filter — Which if filter should be used
- filter_state — If the screen filter should be active
Set screen filtering
Set the parameters for screen filtering.
If the filter is set to unknown, the compositor MUST not change the currently set
filter. This is to allow clients to update the inverted state or toggle the screen filter,
even if they don't know about the currently selected filter.
The client must not assume any requested changes are actually applied and should wait
until the next screen_filter event before updating it's UI.
The "deprecated" protocol error is raised, if "disabled" is set for "filter".
Copyright
Copyright © 2024 System76
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.
communicate corner radius of windows
This protocol provides a way for clients to communicate the
corner radius of their toplevels, should they use rounded corners.
This hint can then be used by the compositor to draw fitting outlines
or prevent overdrawing of other server-side drawn interfaces.
Version 2
Compositor Support
corner radius global
Manager for creating corner-radius objects for existing surfaces
cosmic_corner_radius_manager_v1
request destroy()
Destructor
Destroy the global
Informs the server, that the client will no longer use this global.
Any previously created corner-radius objects remain valid until destroyed.
cosmic_corner_radius_manager_v1
enum error {
corner_radius_exists = 0,
no_role = 1,
}- corner_radius_exists — the surface already has a corner-radius object
- no_role — the surface already has a corner-radius object
Version 1
corner radius toplevel
The corner-radius object provides a way to specify a corner-radius
for it's associated toplevel.
If the xdg_toplevel associated with the cosmic_corner_radius_toplevel_v1
object has been destroyed, this object becomes inert. Any further requests
other than destroy will raise the toplevel_destroyed protocol error.
cosmic_corner_radius_toplevel_v1
request destroy()
Destructor
Destroy the corner-radius object
Informs the server that the client will no longer be using this protocol
object. The corner radius will be unset on the next commit.
cosmic_corner_radius_toplevel_v1
request set_radius(
top_left: uint,
top_right: uint,
bottom_right: uint,
bottom_left: uint,
)- top_left — top-left corner radius
- top_right — top-right corner radius
- bottom_right — bottom-right corner radius
- bottom_left — bottom-left corner radius
Set corner radius
This request sets the hinted corner radius values for rectangular windows.
The corner radius hint is double-buffered state and will be applied on
the next wl_surface.commit.
The value is given in logical space relative to the window geometry of the
associated xdg_toplevel. If any value exceeds a quarter of either dimension
of the window geometry the radius_too_large protocol error is raised.
cosmic_corner_radius_toplevel_v1
request unset_radius()
Unset corner radius
Unsets any previously hinted corner radius values without invalidating the object for later use.
Can be used by clients that possibly have temporary irregular shapes.
cosmic_corner_radius_toplevel_v1
enum error {
toplevel_destroyed = 0,
radius_too_large = 1,
}- toplevel_destroyed — the associated toplevel object has been already destroyed
- radius_too_large — the associated toplevel's window geometry isn't large enough for the requested radius
Version 1
corner radius layer
The corner-radius object provides a way to specify a corner-radius
for it's associated layer surface.
If the zwlr_layer_surface_v1 associated with the cosmic_corner_radius_layer_v1
object has been destroyed, this object becomes inert. Any further requests
other than destroy will raise the layer_destroyed protocol error.
cosmic_corner_radius_layer_v1
request destroy()
Destructor
Destroy the corner-radius object
Informs the server that the client will no longer be using this protocol
object. The corner radius will be unset on the next commit.
cosmic_corner_radius_layer_v1
request set_radius(
top_left: uint,
top_right: uint,
bottom_right: uint,
bottom_left: uint,
)- top_left — top-left corner radius
- top_right — top-right corner radius
- bottom_right — bottom-right corner radius
- bottom_left — bottom-left corner radius
Set corner radius
This request sets the hinted corner radius values for rectangular layers.
The corner radius hint is double-buffered state and will be applied on
the next wl_surface.commit.
The value is given in logical space relative to the remaining size of the
associated zwlr_layer_surface_v1 after any said padding was applied.
If any value exceeds half of the respective dimension of the remaining size
the radius_too_large protocol error is raised.
cosmic_corner_radius_layer_v1
request unset_radius()
Unset corner radius
Unsets any previously hinted corner radius values without invalidating the object for later use.
Can be used by clients that possibly have temporary irregular shapes.
cosmic_corner_radius_layer_v1
request set_padding(
top: int,
right: int,
bottom: int,
left: int,
)- top — top padding
- right — right padding
- bottom — bottom left padding
- left — left padding
Set edge padding
This request sets the hinted padding values for rectangular layers.
The padding hint is double-buffered state and will be applied on
the next wl_surface.commit.
The value is given in logical space as the amount of pixels to subtract from
the size of the associated zwlr_layer_surface and in the case of the top and left padding
added to the layer position before applying the corner radius. Negative padding values are allowed.
If any value exceeds half of the respective dimension of the surface size the padding_too_large
protocol error is raised.
cosmic_corner_radius_layer_v1
request unset_padding()
Unset edge padding
Unsets any previously hinted padding values without invalidating the object for later use.
Can be used by clients that possibly have temporary irregular shapes.
cosmic_corner_radius_layer_v1
enum error {
layer_destroyed = 0,
radius_too_large = 1,
padding_too_large = 2,
}- layer_destroyed — the associated layer surface object has been already destroyed
- radius_too_large — the associated layer's size isn't large enough for the requested radius
- padding_too_large — the associated layer's size isn't large enough for the requested padding
Copyright
Copyright © 2025 System76
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.
cosmic image capture sources
This protocols extends ext-image-capture-source-v1 with additional capture
sources.
Version 1
Compositor Support
image source manager for outputs
A manager for creating image source objects for wl_output objects.
Copyright
Copyright © 2026 System76, 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.
Protocol to control keyboard layout group
This protocol notifies clients of the active keyboard layout group, and allows
setting a new value.
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.
Version 1
Version 1
Object to get and set group for a particular wl_keyboard.
zcosmic_keyboard_layout_v1
request set_group(
group: uint,
)set layout group
On success, the group event will be generated for all clients, and the focused client will
receive wl_keyboard::modifiers with the new group.
The request will be ignored if group is out of bounds.
Copyright
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.
extension protocol to wlr-output-management
This protocol serves as an extension to wlr-output-management.
It primarily adds explicit output mirroring,
while upstream is figuring out how to best support that.
It was designed against version 4 of wlr-output-management, but tries
it's best to be forward compatible.
Version 3
Compositor Support
Output configuration manager
This interface provides extension points for wlr-output-management types.
zcosmic_output_manager_v1
request set_xwayland_primary(
head: nullable object<zcosmic_output_head_v1>,
)Available since version 3
- head — head to be advertised as primary
set head as the primary for xwayland
This requests a head to be advertised as the primary output via randr to Xwayland.
No head has to be marked primary, if null is passed Xwayland won't advertise a primary output.
Sending a disabled head will be ignored to avoid races.
Version 3
Output extension object
Extension to zwlr_output_head_v1.
Adds additional read-only properties.
Properties sent via this interface are applied atomically via the wlr_output_manager.done event.
No guarantees are made regarding the order in which properties are sent.
zcosmic_output_head_v1
event scale_1000(
scale_1000: int,
)current scale
This events describes the scale of the head in the global compositor
space multiplied by 1000 for additional precision.
It is only sent if the output is enabled.
zcosmic_output_head_v1
event mirroring(
name: nullable string,
)mirroring other output
This events describes that the head is mirroring another.
In these cases name contains the unique name of the matching zwlr_output_head_v1.
If the name is null, no head is being mirrored onto this one.
For mirrored heads the position-event is meaningless.
It is only sent if the output is enabled.
zcosmic_output_head_v1
request release()
Destructor
destroy the output head
Using this request a client can tell the compositor that it is not interested
in the head object anymore.
zcosmic_output_head_v1
enum adaptive_sync_availability {
unsupported = 0,
requires_modeset = 1,
supported = 2,
}Available since version 2
- unsupported — adaptive sync is not supported
- requires_modeset — automatic adaptive_sync is unavailable
- supported — adaptive sync is supported in all states
zcosmic_output_head_v1
enum adaptive_sync_state_ext {
disabled = 0,
automatic = 1,
always = 2,
}Available since version 2
- disabled — adaptive sync is disabled
- automatic — adaptive sync will be actived automatically
- always — adaptive sync is forced to be always active
zcosmic_output_head_v1
event xwayland_primary(
state: uint,
)Available since version 3
- state — boolean if primary or not
is this head configured as the primary for xwayland
This event describes if this head is advertised as the primary output via randr to Xwayland.
At most one output is marked primary, but it is not guaranteed that any output is marked.
It is only sent if the output is enabled.
Version 1
zcosmic_output_configuration_v1
enum error {
already_finished = 1,
mirrored_head_busy = 2,
}- already_finished — underlying configuration has already been used
- mirrored_head_busy — mirrored head is not enabled
zcosmic_output_configuration_v1
request mirror_head(
id: new_id<zwlr_output_configuration_head_v1>,
head: object<zwlr_output_head_v1>,
mirroring: object<zwlr_output_head_v1>,
)- id — a new object to configure the head
- head — the head to be enabled
- mirroring — the head to be mirrored
enable and configure a head to mirror another head
Enable a head mirroring another.
This request creates a head configuration object that can be used to change the head's properties.
This is an alternative to zwlr_output_configuration_v1::enable_head or zwlr_output_configuration_v1::disable_head
Using either with the same head argument will result in an already_configured_head error on the original
zwlr_output_configuration_v1 object.
All properties are still required to be set to the resulting zwlr_output_configuration_head by the client
as denoted in the original protocol. Some like set_position however might be ignored in mirroring configurations.
Trying to set a disabled or mirroring head as mirroring or calling disable_head/mirror_head after using a head
as a mirroring argument will raise a mirrored_head_busy protocol error.
zcosmic_output_configuration_v1
event finished()
the configuration was used
This event indicates that the configuration is no longer available.
This usually happens when the original configuration was cancelled, suceeded or failed.
Upon receiving this event, the client should destroy this object.
The configration object becomes inert and any requests other than destroy will be ignored.
Version 2
Copyright
Copytight © 2024 Victoria Brekenfeld
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
Version 1
Compositor Support
get notifications of other elements overlapping layer surfaces
The purpose of this protocol is to enable layer-shell client to get
notifications if part of their surfaces are occluded other elements
(currently toplevels and other layer-surfaces).
You can request a notification object for any of your zwlr_layer_surface_v1
surfaces, which will then emit overlap events.
Version 1
Subscription for overlapping toplevels on a layer-surface
zcosmic_overlap_notification_v1
event toplevel_enter(
toplevel: object<ext_foreign_toplevel_handle_v1>,
x: int,
y: int,
width: int,
height: int,
)- x — x coordinate of the upper-left corner of the overlapping area
- y — y coordinate of the upper-left corner of the overlapping area
- width — width of the overlapping area
- height — height of the overlapping area
Toplevel entered the surface area
A ext_foreign_toplevel_handle_v1 has entered the surface area.
This event will be emitted once for every ext_foreign_toplevel_handle_v1
representing this toplevel.
Compositors are free to update the overlapping area by sending additional
toplevel_enter events for the same toplevel without sending toplevel_leave
in between.
zcosmic_overlap_notification_v1
event layer_enter(
identifier: string,
namespace: string,
exclusive: uint,
layer: uint<zwlr_layer_shell_v1.layer>,
x: int,
y: int,
width: int,
height: int,
)- identifier — unique identifier for the overlapping layer-surface
- namespace — namespace for the layer surface
- exclusive — if the overlapping surface is requesting an exclusive area or not
- layer — layer the overlapping surface sits on
- x — x coordinate of the upper-left corner of the overlapping area
- y — y coordinate of the upper-left corner of the overlapping area
- width — width of the overlapping area
- height — height of the overlapping area
Layer surface entered the surface area
A zwlr_layer_surface_v1 has entered the surface area.
Compositors are free to update the overlapping area by sending additional
layer_enter events for the same surface without sending layer_leave
in between.
The overlapping region is given surface-relative to the zwlr_layer_surface_v1
used to create this notification object.
Copyright
Copyright © 2026 System76
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.
Show layer surfaces in locked session.
Normally, ext-session-lock-v1 hides all other surfaces. This protocol allows
a client to indicate that a layer surface should also be shown when the session
is locked.
Version 1
Copyright
Copyright © 2018 Ilia Bozhinov
Copyright © 2020 Isaac Freund
Copyright © 2024 Victoria Brekenfeld
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
Version 3
- toplevel — a toplevel has been created
- stop — stop sending events
- finished — the compositor has finished with the toplevel manager
- get_cosmic_toplevel — get cosmic toplevel extension object
- done — all information about active toplevels have been sent
Compositor Support
list toplevels and properties thereof
The purpose of this protocol is to enable clients such as taskbars
or docks to access a list of opened applications and basic properties
thereof.
It thus extends ext_foreign_toplevel_v1 to provide more information
and actions on foreign toplevels.
zcosmic_toplevel_info_v1
event toplevel(
toplevel: new_id<zcosmic_toplevel_handle_v1>,
)Deprecated since version 2
a toplevel has been created
This event is never emitted for clients binding version 2
of this protocol, they should use get_cosmic_toplevel instead.
This event is emitted for clients binding version 1 whenever a
new toplevel window is created. It is emitted for all toplevels,
regardless of the app that has created them.
All initial properties of the toplevel (title, app_id, states, etc.)
will be sent immediately after this event via the corresponding
events in zcosmic_toplevel_handle_v1.
zcosmic_toplevel_info_v1
request stop()
Deprecated since version 2
stop sending events
This request indicates that the client no longer wishes to receive
events for new toplevels. However, the compositor may emit further
toplevel_created events until the finished event is emitted.
The client must not send any more requests after this one.
Note: This request isn't necessary for clients binding version 2
of this protocol and will be ignored.
zcosmic_toplevel_info_v1
event finished()
Deprecated since version 2
the compositor has finished with the toplevel manager
This event indicates that the compositor is done sending events
to the zcosmic_toplevel_info_v1. The server will destroy the
object immediately after sending this request, so it will become
invalid and the client should free any resources associated with it.
Note: This event is emitted immediately after calling stop for
clients binding version 2 of this protocol for backwards compatibility.
Version 3
an open toplevel
A zcosmic_toplevel_handle_v1 object represents an open toplevel
window. A single app may have multiple open toplevels.
Each toplevel has a list of outputs it is visible on, exposed to the
client via the output_enter and output_leave events.
zcosmic_toplevel_handle_v1
event closed()
Deprecated since version 2
the toplevel has been closed
The server will emit no further events on the
zcosmic_toplevel_handle_v1 after this event. Any requests received
aside from the destroy request will be ignored. Upon receiving this
event, the client should make the destroy request to allow freeing
of resources.
Note: This event will not be emitted for clients binding version 2
of this protocol, as ext_foreign_toplevel_handle_v1.closed is
equivalent.
zcosmic_toplevel_handle_v1
event done()
Deprecated since version 2
all information about the toplevel has been sent
This event is sent after all changes in the toplevel state have
been sent.
This allows changes to the zcosmic_toplevel_handle_v1 properties
to be seen as atomic, even if they happen via multiple events.
Note: this is is not sent after the closed event.
Note: This event will not be emitted for clients binding version 2
of this protocol, as ext_foreign_toplevel_handle_v1.done is
equivalent.
zcosmic_toplevel_handle_v1
event output_leave(
output: object<wl_output>,
)toplevel left an output
This event is emitted whenever the toplevel is no longer visible
on a given output. It is guaranteed that an output_enter event with
the same output has been emitted before this event.
zcosmic_toplevel_handle_v1
event workspace_leave(
workspace: object<zcosmic_workspace_handle_v1>,
)Deprecated since version 3
toplevel left an workspace
This event is emitted whenever the toplevel is no longer visible
on a given workspace. It is guaranteed that an workspace_enter event with
the same workspace has been emitted before this event.
zcosmic_toplevel_handle_v1
enum state {
maximized = 0,
minimized = 1,
activated = 2,
fullscreen = 3,
sticky = 4,
}types of states on the toplevel
The different states that a toplevel may have. These have the same
meaning as the states with the same names defined in xdg-toplevel
zcosmic_toplevel_handle_v1
event geometry(
output: object<wl_output>,
x: int,
y: int,
width: int,
height: int,
)Available since version 2
- x — x coordinate of the upper-left corner
- y — y coordinate of the upper-left corner
- width — width of the toplevel
- height — height of the toplevel
the toplevel's position and/or size has changed
Emitted when the geometry of a toplevel (it's position and/or size)
relative to the provided output has changed.
This event is emitted once on creation of the
zcosmic_toplevel_handle_v1 for every entered output and again
whenever the geometry of the toplevel changes relative to any output.
zcosmic_toplevel_handle_v1
event ext_workspace_leave(
workspace: object<ext_workspace_handle_v1>,
)Available since version 3
toplevel left an workspace
This event is emitted whenever the toplevel is no longer visible
on a given workspace. It is guaranteed that an workspace_enter event with
the same workspace has been emitted before this event.
Copyright
Copyright © 2018 Ilia Bozhinov
Copyright © 2020 Isaac Freund
Copyright © 2022 wb9688
Copyright © 2024 Victoria Brekenfeld
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
Version 4
Compositor Support
control open apps
This protocol allows clients such as a taskbar to request the compositor
to preform typical actions on open toplevels. The compositor is in all
cases free to ignore the request.
zcosmic_toplevel_manager_v1
enum zcosmic_toplelevel_management_capabilities_v1 {
close = 1,
activate = 2,
maximize = 3,
minimize = 4,
fullscreen = 5,
move_to_workspace = 6,
sticky = 7,
move_to_ext_workspace = 8,
}- close — close request is available
- activate — activate request is available
- maximize — set_maximized and unset_maximized requests are available
- minimize — set_minimized and unset_minimized requests are available
- fullscreen — set_fullscreen and unset_fullscreen requests are available
- move_to_workspace — move_to_workspace request is available
Available since version 2
- sticky — set_sticky and unset_sticky requests are available
Available since version 3
- move_to_ext_workspace — move_to_ext_workspace request is available
Available since version 4
zcosmic_toplevel_manager_v1
event capabilities(
capabilities: array,
)- capabilities — array of 32-bit capabilities
compositor capabilities
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for closing toplevels, a button
triggering the close request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for closing toplevels will ignore
close requests.
Compositors must send this event once after creation of an
zcosmic_toplevel_manager_v1 . When the capabilities change, compositors
must send this event again.
The capabilities are sent as an array of 32-bit unsigned integers in
native endianness.
zcosmic_toplevel_manager_v1
request set_rectangle(
toplevel: object<zcosmic_toplevel_handle_v1>,
surface: object<wl_surface>,
x: int,
y: int,
width: int,
height: int,
)designate a rectangle to represent a toplevel
If a client using this protocol displays UI elements corresponding
to toplevels, it may use this request to inform the server about such
a relation. This information may be used by the server, for example as
the target for a minimize animation.
If the client sets more than one rectangle, only the most recently
set rectangle is considered.
The dimensions are given in surface-local coordinates.
Setting width=height=0 removes the current rectangle if one was set.
Copyright
Copyright © 2019 Christopher Billington
Copyright © 2020 Ilia Bozhinov
Copyright © 2022 Victoria Brekenfeld
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
Version 2
- workspace_group — a workspace group has been created
- commit — all requests about the workspaces have been sent
- done — all information about the workspace groups has been sent
- finished — the compositor has finished with the workspace_manager
- stop — stop sending events
list and control workspaces
Workspaces, also called virtual desktops, are groups of surfaces. A
compositor with a concept of workspaces may only show some such groups of
surfaces (those of 'active' workspaces) at a time. 'Activating' a
workspace is a request for the compositor to display that workspace's
surfaces as normal, whereas the compositor may hide or otherwise
de-emphasise surfaces that are associated only with 'inactive' workspaces.
Workspaces are grouped by which sets of outputs they correspond to, and
may contain surfaces only from those outputs. In this way, it is possible
for each output to have its own set of workspaces, or for all outputs (or
any other arbitrary grouping) to share workspaces. Compositors may
optionally conceptually arrange each group of workspaces in an
N-dimensional grid.
The purpose of this protocol is to enable the creation of taskbars and
docks by providing them with a list of workspaces and their properties,
and allowing them to activate and deactivate workspaces.
After a client binds the zcosmic_workspace_manager_v1, each workspace will be
sent via the workspace event.
zcosmic_workspace_manager_v1
request commit()
all requests about the workspaces have been sent
The client must send this request after it has finished sending other
requests. The compositor must process a series of requests preceding a
commit request atomically.
This allows changes to the workspace properties to be seen as atomic,
even if they happen via multiple events, and even if they involve
multiple zcosmic_workspace_handle_v1 objects, for example, deactivating one
workspace and activating another.
zcosmic_workspace_manager_v1
event done()
all information about the workspace groups has been sent
This event is sent after all changes in all workspace groups have been
sent.
This allows changes to one or more zcosmic_workspace_group_handle_v1
properties and zcosmic_workspace_handle_v1 properties to be seen as atomic,
even if they happen via multiple events.
In particular, an output moving from one workspace group to
another sends an output_enter event and an output_leave event to the two
zcosmic_workspace_group_handle_v1 objects in question. The compositor sends
the done event only after updating the output information in both
workspace groups.
zcosmic_workspace_manager_v1
event finished()
the compositor has finished with the workspace_manager
This event indicates that the compositor is done sending events to the
zcosmic_workspace_manager_v1. The server will destroy the object
immediately after sending this request, so it will become invalid and
the client should free any resources associated with it.
zcosmic_workspace_manager_v1
request stop()
stop sending events
Indicates the client no longer wishes to receive events for new
workspace groups. However the compositor may emit further workspace
events, until the finished event is emitted.
The client must not send any more requests after this one.
Version 2
a workspace group assigned to a set of outputs
A zcosmic_workspace_group_handle_v1 object represents a a workspace group
that is assigned a set of outputs and contains a number of workspaces.
The set of outputs assigned to the workspace group is conveyed to the client via
output_enter and output_leave events, and its workspaces are conveyed with
workspace events.
For example, a compositor which has a set of workspaces for each output may
advertise a workspace group (and its workspaces) per output, whereas a compositor
where a workspace spans all outputs may advertise a single workspace group for all
outputs.
zcosmic_workspace_group_handle_v1
event capabilities(
capabilities: array,
)- capabilities — array of 32-bit capabilities
compositor capabilities
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for creating workspaces, a button
triggering the create_workspace request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for creating workspaces will ignore
create_workspace requests.
Compositors must send this event once after creation of an
zcosmic_workspace_group_handle_v1 . When the capabilities change, compositors
must send this event again.
The capabilities are sent as an array of 32-bit unsigned integers in
native endianness.
zcosmic_workspace_group_handle_v1
request create_workspace(
workspace: string,
)create a new workspace
Request that the compositor create a new workspace with the given name.
There is no guarantee that the compositor will create a new workspace,
or that the created workspace will have the provided name.
Version 2
a workspace handing a group of surfaces
A zcosmic_workspace_handle_v1 object represents a a workspace that handles a
group of surfaces.
Each workspace has a name, conveyed to the client with the name event; a
list of states, conveyed to the client with the state event; and
optionally a set of coordinates, conveyed to the client with the
coordinates event. The client may request that the compositor activate or
deactivate the workspace.
Each workspace can belong to only a single workspace group.
Depepending on the compositor policy, there might be workspaces with
the same name in different workspace groups, but these workspaces are still
separate (e.g. one of them might be active while the other is not).
zcosmic_workspace_handle_v1
event coordinates(
coordinates: array,
)workspace coordinates changed
This event is used to organize workspaces into an N-dimensional grid
within a workspace group, and if supported, is emitted immediately after
the zcosmic_workspace_handle_v1 is created and whenever the coordinates of
the workspace change. Compositors may not send this event if they do not
conceptually arrange workspaces in this way. If compositors simply
number workspaces, without any geometric interpretation, they may send
1D coordinates, which clients should not interpret as implying any
geometry. Sending an empty array means that the compositor no longer
orders the workspace geometrically.
Coordinates have an arbitrary number of dimensions N with an uint32
position along each dimension. By convention if N > 1, the first
dimension is X, the second Y, the third Z, and so on. The compositor may
chose to utilize these events for a more novel workspace layout
convention, however. No guarantee is made about the grid being filled or
bounded; there may be a workspace at coordinate 1 and another at
coordinate 1000 and none in between. Within a workspace group, however,
workspaces must have unique coordinates of equal dimensionality.
zcosmic_workspace_handle_v1
event state(
state: array,
)the state of the workspace changed
This event is emitted immediately after the zcosmic_workspace_handle_v1 is
created and each time the workspace state changes, either because of a
compositor action or because of a request in this protocol.
zcosmic_workspace_handle_v1
enum state {
active = 0,
urgent = 1,
hidden = 2,
}- active — the workspace is active
- urgent — the workspace requests attention
- hidden
the workspace is not visible
The workspace is not visible in its workspace group, and clients
attempting to visualize the compositor workspace state should not
display such workspaces.
types of states on the workspace
The different states that a workspace can have.
zcosmic_workspace_handle_v1
event capabilities(
capabilities: array,
)- capabilities — array of 32-bit capabilities
compositor capabilities
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for removing workspaces, a button
triggering the remove request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for remove will ignore
remove requests.
Compositors must send this event once after creation of an
zcosmic_workspace_handle_v1 . When the capabilities change, compositors
must send this event again.
The capabilities are sent as an array of 32-bit unsigned integers in
native endianness.
zcosmic_workspace_handle_v1
request destroy()
Destructor
destroy the zcosmic_workspace_handle_v1 object
Destroys the zcosmic_workspace_handle_v1 object.
This request should be called either when the client does not want to
use the workspace object any more or after the remove event to finalize
the destruction of the object.
zcosmic_workspace_handle_v1
request activate()
activate the workspace
Request that this workspace be activated.
There is no guarantee the workspace will be actually activated, and
behaviour may be compositor-dependent. For example, activating a
workspace may or may not deactivate all other workspaces in the same
group.
zcosmic_workspace_handle_v1
enum tiling_state {
floating_only = 0,
tiling_enabled = 1,
}Available since version 2
- floating_only — The workspace has no active tiling properties
- tiling_enabled — Tiling behavior is enabled for the workspace
types of tiling state a workspace may have
zcosmic_workspace_handle_v1
request rename(
name: string,
)Available since version 2
- name — new name of the workspace
rename this workspace
Request that this workspace is renamed.
There is no guarantee the workspace will actually be renamed.
zcosmic_workspace_handle_v1
request set_tiling_state(
state: uint<tiling_state>,
)Available since version 2
- state — the new tiling state of the workspace
change the tiling state of this workspace
Request that this workspace's tiling state is changed.
There is no guarantee the workspace will actually change it's tiling state.
Copyright
Copyright © 2025 System76
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.
Version 2
Compositor Support
list and control workspaces
This protocol extends ext-workspace-v1 with addtional requests and events.
The caller should call get_cosmic_workspace whenever a new ext workspace is
created.
Version 2
a workspace handing a group of surfaces
A zcosmic_workspace_handle_v2 object represents a a workspace that handles a
group of surfaces.
Each workspace has a name, conveyed to the client with the name event; a
list of states, conveyed to the client with the state event; and
optionally a set of coordinates, conveyed to the client with the
coordinates event. The client may request that the compositor activate or
deactivate the workspace.
Each workspace can belong to only a single workspace group.
Depepending on the compositor policy, there might be workspaces with
the same name in different workspace groups, but these workspaces are still
separate (e.g. one of them might be active while the other is not).
zcosmic_workspace_handle_v2
event capabilities(
capabilities: uint<workspace_capabilities>,
)- capabilities — capabilities
compositor capabilities
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for removing workspaces, a button
triggering the remove request should not be displayed.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for remove will ignore
remove requests.
Compositors must send this event once after creation of a
zcosmic_workspace_handle_v2. When the capabilities change, compositors
must send this event again.
zcosmic_workspace_handle_v2
event state(
state: uint<state>,
)Available since version 2
the state of the workspace changed
This event is emitted immediately after the zcosmic_workspace_handle_v2 is
created and each time the workspace state changes, either because of a
compositor action or because of a request in this protocol.
zcosmic_workspace_handle_v2
enum tiling_state {
floating_only = 0,
tiling_enabled = 1,
}- floating_only — The workspace has no active tiling properties
- tiling_enabled — Tiling behavior is enabled for the workspace
types of tiling state a workspace may have
zcosmic_workspace_handle_v2
enum state {
pinned = 1,
}This is a bitfieldAvailable since version 2
- pinned — the workspace is pinned
state of the workspace, extending the ext workspace state
zcosmic_workspace_handle_v2
request rename(
name: string,
)- name — new name of the workspace
rename this workspace
Request that this workspace is renamed.
There is no guarantee the workspace will actually be renamed.
zcosmic_workspace_handle_v2
request set_tiling_state(
state: uint<tiling_state>,
)- state — the new tiling state of the workspace
change the tiling state of this workspace
Request that this workspace's tiling state is changed.
There is no guarantee the workspace will actually change it's tiling state.
zcosmic_workspace_handle_v2
request move_before(
other_workspace: object<ext_workspace_handle_v1>,
axis: uint,
)Available since version 2
move before a different workspace
Move a workspace to be before another workspace along a given axis.
other_workspace may be on the same workspace group, or on a different group.
If it's a different set, the workspace will also be moved to that group.
axis should be a valid index in the coordinates on the workspace group
other_workspace is on. The workspace will be positioned on the target group
to have a coordinate with this component less than the value of the component for
other_workspace. The exact coordinate values, or how other workspaces are moved
to accommodate the workspace, is unspecified.
The request will be ignored if axis is invalid or the compositor is otherwise
unable to move the workspace.
There is no guarantee the workspace will actually be moved.
zcosmic_workspace_handle_v2
request pin()
Available since version 2
pin the workspace
Request that this workspace be pinned.
There is no guarantee the workspace will be actually pinned.
zcosmic_workspace_handle_v2
request unpin()
Available since version 2
pin the workspace
Request that this workspace be unpinned.
There is no guarantee the workspace will be actually unpinned.
Copyright
Copyright © 2020 Collabora. Ltd,
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
agl screenshooter
agl compositor extension that performs a screenshot of the output, which
is represented by a 'wl_output' object.
A client would call 'take_shot' request and wait until the compositor
finishes to write the data to a wayland buffer, moment in which signals
back the client with the help of the 'done' event. Clients should wait
until the 'done' event is received, if they want to take another
screenshot, or take another screnshot of a different output.
The client must provide a wl_shm-based wl_buffer of the correct size when
taking a shot. The compositor will write the shot into the wl_buffer and then
send the 'done' event that signals completion of writing the data.
Once the compositor has finished to transfer the data back into the supplied
wayland buffer, the client should be able to transfer it to a popular
file format on the disk.
agl_screenshooter
request take_shot(
output: object<wl_output>,
buffer: object<wl_buffer>,
)performs a screenshot
Takes a screenshot of the wayland output represented by a 'wl_output'
object. Clients should first retrieve it using global registry, as well
as the 'wl_shm' object in order to create a wayland buffer type of
object ('wl_buffer').
Clients can derive the stride and size from the 'wl_output' object, and
later on use those when creating shm-based 'wl_buffer', as well as supplying
the pixel format.
Copyright
Copyright © 2019, 2022 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
- agl_shell — user interface for Automotive Grade Linux platform
- agl_shell_ext — extended user interface for Automotive Grade Linux platform
Version 11
user interface for Automotive Grade Linux platform
Starting with version 2 of the protocol, the client is required to wait
for the 'bound_ok' or 'bound_fail' events in order to proceed further.
In case the client gets a 'bound_fail' event then it should consider that
there's another client already bound to the agl_shell protocol.
A client that receives a 'bound_ok' event should consider that there's
no other client already bound to the interface and can proceed further.
If the client uses an older version of the protocol it will receive
automatically an error and the compositor will terminate the connection,
if there's another client already bound the interface.
If the client receives the 'bound_fail' event and attempts to use the
interface further it will receive an error and the compositor will
terminate the connection. After the 'bound_fail' event was received the
client should call the destructor, which has been added with version 2
of the protocol. The client is free to try at a later point in time to
see if it will receive the 'bound_ok' event, but there's no explicit way
of finding out when that event will be delivered.
It is assumed that it can infer that information through other
means/other channels.
agl_shell
enum error {
invalid_argument = 0,
background_exists = 1,
panel_exists = 2,
}agl_shell
enum edge {
top = 0,
bottom = 1,
left = 2,
right = 3,
}agl_shell
enum app_state {
started = 0,
terminated = 1,
activated = 2,
deactivated = 3,
}Available since version 3
agl_shell
request ready()
client is ready to be shown
Tell the server that this client is ready to be shown. The server
will delay presentation during start-up until all shell clients are
ready to be shown, and will display a black screen instead.
This gives the client an opportunity to set up and configure several
surfaces into a coherent interface.
The client that binds to this interface must send this request, otherwise
they may stall the compositor unnecessarily.
If this request is called after the compositor has already finished
start-up, no operation is performed.
agl_shell
request set_background(
surface: object<wl_surface>,
output: object<wl_output>,
)set surface as output's background
Set the surface to act as the background of an output. After this
request, the server will immediately send a configure event with
the dimensions the client should use to cover the entire output.
The surface must have a "desktop" surface role, as supported by
libweston-desktop.
Only a single surface may be the background for any output. If a
background surface already exists, a protocol error is raised.
agl_shell
request set_panel(
surface: object<wl_surface>,
output: object<wl_output>,
edge: uint<edge>,
)set surface as panel
Set the surface to act as a panel of an output. The 'edge' argument
says what edge of the output the surface will be anchored to.
After this request, the server will send a configure event with the
corresponding width/height that the client should use, and 0 for the
other dimension. E.g. if the edge is 'top', the width will be the
output's width, and the height will be 0.
The surface must have a "desktop" surface role, as supported by
libweston-desktop.
The compositor will take the panel's window geometry into account when
positioning other windows, so the panels are not covered.
XXX: What happens if e.g. both top and left are used at the same time?
Who gets to have the corner?
Only a single surface may be the panel for an output's edge. If a
surface already exists on an edge, a protocol error is raised.
agl_shell
request activate_app(
app_id: string,
output: object<wl_output>,
)make client current window
Ask the compositor to make a toplevel to become the current/focused
window for window management purposes.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
If multiple toplevels have the same app_id, the result is unspecified.
XXX: Do we need feedback to say it didn't work? (e.g. client does
not exist)
agl_shell
event bound_ok()
Available since version 2
event sent if binding was ok
Informs the client that it was able to bind the agl_shell
interface succesfully. Clients are required to wait for this
event before continuing further.
agl_shell
event bound_fail()
Available since version 2
event sent if binding was nok
Informs the client that binding to the agl_shell interface was
unsuccesfull. Clients are required to wait for this event for
continuing further.
agl_shell
request destroy()
DestructorAvailable since version 2
destroys the factory object
agl_shell
event app_state(
app_id: string,
state: uint<app_state>,
)Available since version 3
event sent when an application suffered state modification
Informs the client that an application has changed its state to another,
specified by the app_state enum. Client can use this event to track
current application state. For instance to know when the application has
started, or when terminated/stopped.
agl_shell
request set_activate_region(
output: object<wl_output>,
x: int,
y: int,
width: int,
height: int,
)Available since version 4
- x — x position of rectangle
- y — y position of rectangle
- width — width of rectangle
- height — height of rectangle
sets a specific region to activate
A hint for the compositor to use a custom area, rather than
inferring the activation area. If any panels are used
the compositor computes the activation area by subtracting the
panels geometry area. If no panels are used then the entire output
is being used. This request changes that as to hint the compositor
to use the supplied rectangle and ignore any potential panels
that might been set-up previously.
In order for this request to take effect it will need to happen
before the 'ready' request in order for the compositor to make use of it.
Note that any 'set_panel' request be will not be honored, if this request
has been called.
The x and y coordinates use the top-left corner as the origin. The
rectangle area shouldn't exceed the output area, while an area smaller
than the output, would basically result in showing up the background
surface.
agl_shell
request deactivate_app(
app_id: string,
)Available since version 5
de-activate/hide window identified by app_id
Ask the compositor to hide the toplevel window for window
management purposes. Depending on the window role, this request
will either display the previously active window (or the background
in case there's no previously active surface) or temporarily (or
until a 'activate_app' is called upon) hide the surface.
All the surfaces are identifiable by using the app_id, and no actions
are taken in case the app_id is not/was not present.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell
request set_app_float(
app_id: string,
x: int,
y: int,
)Available since version 6
- x — x position
- y — y position
set the window identified by app_id as float
Makes the application identified by app_id as floating. If the
application's window is already mapped, in a maximized, normal state,
it would transition to the float state.
For applications that want to modify their own state, this request
must be done before the initial surface commit in order to take effect.
If the application is already in floating state, this request wouldn't
do anything.
There's no persistence of this request, once the application terminated
you'll to issue this request again for that particular app_id.
The x, and y values would be initial position of the window where the
window surface will be placed.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell
request set_app_normal(
app_id: string,
)Available since version 6
set the window identified by app_id as normally started
Returns the application identified by app_id as it was in the normal state.
This is useful to come back from other states to the maximized state, the
normal state applications are started.
agl_shell
request set_app_fullscreen(
app_id: string,
)Available since version 7
Makes the application identified by app_id as fullscreen. If the
application's window is already mapped, in a maximized, normal state,
it would transition to the fullscreen state.
For applications that want to modify their own state, this request
must be done before the initial surface commit in order to take effect.
If the application is already in fullscreen state, this request wouldn't
do anything.
There's no persistence of this request, once the application terminated
you'll to issue this request again for that particular app_id.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell
request set_app_output(
app_id: string,
output: object<wl_output>,
)Available since version 8
assign an application to a particular output
this would allow the compositor to place an application on a particular
output, if that output is indeed available. this can happen before
application is started which would make the application start on that
particular output. if the application is already started it would
move the application to that output.
there's no persistence of this request, once the application terminated
you'll need to issue this request again for that particular app_id.
see xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell
event app_on_output(
app_id: string,
output_name: string,
)Available since version 8
Event sent as a reponse to set_app_output
Clients can use this event to be notified when an application
wants to be displayed on a certain output. This event is sent in
response to the set_app_output request.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell
request set_app_position(
app_id: string,
x: int,
y: int,
)Available since version 9
move window to a specific position
Clients can inform the compositor to position a floating type of window
at the specific location, pointed by x and y value. If the window is
not a floating type, the request will be discarded. Note that
positioning doesn't take output into consideration nor does orientation
of the outpus. It is expected that the client knows already where the
position is localed in global coordonate space. If the window doesn't
exist the compositor will ignore the request. For this request to
function properly the window would first to be set as floating and then
it can be moved using this request.
see xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell
request set_app_scale(
app_id: string,
width: int,
height: int,
)Available since version 10
scale window to a specific rectangle
Clients can inform the compositor to scale a floating type of window
to the values specified in width and height. If the window is
not a floating type, the request will be discarded. If the window
doesn't exist the compositor will ignore the request. For this request
to function properly the window would first to be set as floating
and then it can be moved using this request.
see xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell
request set_app_split(
app_id: string,
orientation: uint<tile_orientation>,
width: int,
sticky: int,
output: object<wl_output>,
)Available since version 11
- width — width of the window being split
- sticky — make the split window stiky
set the application with a split orientation
This requests asks the compositor to change the application from the
original mode (whatever that might be) to a split, tiled orientation
mode defined in the tile orientation enum.
Clients need to implement resizing (to handle xdg-shell configure
events) for this to work correctly.
This request only handles a single level of tiling for practical
reasons: to keep implementation simple and straight forward. The
compositor will ignore requests if there are already two windows
present. The client can verify this request succeed by checking the
xdg-shell configure event and with it, the states sent
by the compositor.
If there's no app_id with the supplied name, the compositor will add
the app to a pending list in order to be applied when an application
gets started, or if the application sets its application after the
initial wl_surface.commit request.
Applications can use this approach if they want to be started in a
tiled orientation position, before creating the xdg-shell toplevel role.
A none orientation type would make the window go back to the original
maximized mode. If two windows are side by side, returning one of them
back the original mode would mean the other one will be made hidden
and the one doing the request for the none orientation will become
the currently active window. A further activation, using activate_app
request for the other window would make that one active.
Closing the window in the tiled orientation state implies that either
the background surface will displayed, or in case there was another
applications being shown at that time, will make that application be
returned to the original, maximized state.
The tiled orientation could be applied independently of each other,
such that a client can transition from one tiled orientation to
another. Note that any other window already present would literally
take the opposite orientation with the one currently being changed. So
tiled orientation modification automatically implies a tile orientation
for any other application already present/active at that time.
In case there's already a client active at that time, it will be
attributed automatically the opposite tiled orientation, such that two
concurrent applications can be displayed at the same time.
The orientation tiles can not be combined, and only state at a time
can be active. Only horizontal and vertical tiling is possible. A
horizontal and vertical tile orientation simultaneously is not
possible.
Input focus is being delivered to the last started/activated window,
such that users can cycle between that one or the other, assumes there's
another window in the first place.
A width size can also be specified for the split window. Note that this
width can't exceed the output width value, or the compositor can choose
to ignore this value.
Making the split window sticky would inform the compositor that the
window should always be active when switching or when activating between
other windows. This would allow navigating, starting and activating other
windows while keeping the current window always in a split state.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
Version 1
extended user interface for Automotive Grade Linux platform
This interface allows another client bind to the agl_shell interface,
while there's another shell client already present.
The client should first bind to this interface and then inform the
compositor with the 'doas_shell_client' request and it wants to bind to
the agl_shell interface. The client is still expected, if using a new
version of the agl_shell interface, to wait for the 'bound_ok' and
'bound_fail' events before issueing any other requests/events.
Note that this interface has its limitations, and the compositor would
still refuse the act for 'set_panel' or 'set_background' requests
of the agl_shell interface if there's already a client that used them.
Any other requests or events should be delievered and handled as it would
a client bound to the agl_shell interface.
agl_shell_ext
request destroy()
Destructor
destroys the factory object
Call the destructor once you're ready with agl_shell_ext interface.
This would reset the state and would make any requests made
on the agl_shell interface be terminated. The client would need
to bind again the agl_shell_ext and issue a 'doas_shell_client'
request.
agl_shell_ext
request doas_shell_client()
Informs the compositor it wants to bind to the
agl_shell interface
Prior to binding to agl_shell interface, this request would inform
the compositor that it wants to gain access the agl_shell interface.
The client is expected to wait for 'doas_shell_client_done' event and
check for a successful status before going further with binding to
the agl_shell interface.
Copyright
Copyright © 2020 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
Private extension to allow applications activate other apps
This extension can be used by regular application to instruct to compositor
to activate or switch to other running (regular) applications. The client
is responsible for filtering their own app_id when receiving application id.
The compositor will allow clients to bind to this interface only if the
policy engine allows it.
agl_shell_desktop
event application(
app_id: string,
)advertise application id
The compositor may choose to advertise one or more application ids which
can be used to activate/switch to.
When this global is bound, the compositor will send all application ids
available for activation, but may send additional application id at any
time (when they've been mapped in the compositor).
agl_shell_desktop
request activate_app(
app_id: string,
app_data: nullable string,
output: object<wl_output>,
)make client current window
Ask the compositor to make a toplevel to become the current/focused
window for window management purposes.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell_desktop
request set_app_property(
app_id: string,
role: uint<app_role>,
x: int,
y: int,
bx: int,
by: int,
width: int,
height: int,
output: object<wl_output>,
)set properties for a client identified by app_id
Ask the compositor to make a top-level window obey the 'app_role' enum
and, depending on that role, to use some of the arguments as initial
values to take into account.
Note that x, y, bx, by, width and height would only make sense for the
pop-up role, with the output argument being applicable to all the roles.
The width and height values define the maximum area which the
top-level window should be placed into. Note this doesn't correspond to
top-level surface size, but to a bounding box which will be used to
clip the surface to, in case the surface area extends that of this
bounding box. Both of these values need to be larger than 0 (zero) to be
taken into account by the compositor. Any negative values for the width
and height will be discarded.
The x and y values will serve as the (initial) position values.
The bx and by values are the top-left x and y value of the bounding box.
Any clipping happening to the bounding box will not affect the surface
size or the position of the underlying surface backing the top-level
window. The bx and by values, like the positional values, could be
both set to zero, or even negative values. The compositor will pass
those on without any further validation.
The initial position values and the bounding rectangle will still be
in effect on a subsequent activation request of the 'app_id', assuming
it was previously de-activated at some point in time.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell_desktop
request deactivate_app(
app_id: string,
)de-activate/hide window identified by app_id
Ask the compositor to hide the toplevel window for window
management purposes. Depending on the window role, this request
will either display the previously active window (or the background
in case there's no previously active surface) or temporarily (or
until a 'activate_app' is called upon) hide the surface. All
the surfaces are identifiable by using the app_id, and no actions are
taken in case the app_id is not/was not present.
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
agl_shell_desktop
event state_app(
app_id: string,
app_data: nullable string,
state: uint<app_state>,
role: uint<app_role>,
)event sent when application has suffered state modification
Notifies application(s) when other application have suffered state modifications.
agl_shell_desktop
request set_app_property_mode(
permanent: uint,
)Available since version 2
Request to change the application properties lifetime
Use this request to inform the compositor to maintain a pending state
for an app_id being set with set_app_property() request. Any
subsequent application matching that app_id would survive a potential
application destruction. Note that this request will take effect
globally on all applications.
To turn it on, or off, use the 'permanent' argument. Initially,
the compositor will have this option set to off. Note that it
doesn't matter the order of this request with respect to
set_app_property() request, as the changes will only take effect
when the application itself does the commit with an app_id set,
therefore the only requirement is to call this request before
the app_id client does its first commit.
Copyright
Copyright 2024 The Chromium Authors
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.
Version 1
aura output manager singleton
A global responsible for propagating atomic output configuration changes
to clients. An output configuration is a union of added / removed outputs
and updated output metrics.
Added outputs arrive at the client as wl_registry.global events, removed
outputs as wl_registry.global_remove events and updated output metrics as
a sequence of events defined on the zaura_output_manager_v2 interface.
This is followed by the manager's done event which signals the end of the
transaction.
The change should be processed by clients in a way that transitions from
one output configuration state to another without exposing the
intermediate output state to the rest of the application.
Participating servers should emit the zaura_output_manager_v2 global
before any wl_output globals in the sequence of wl_registry.global events.
Participating clients should bind the zaura_output_manager_v2 before any
wl_output globals. This ordering is required to ensure clients receive all
necessary output configuration information before receiving any further
server events that may reference bound wl_outputs.
Clients can expect that all events comprising a configuration change are
sent synchronously, one after the other, before any other server events
that leverage the output as an event param.
zaura_output_manager_v2
event done()
Available since version 1
sent all information about the output configuration change
This event is sent after all added, changed and removed output events
for a given wl_output have been dispatched to the client.
zaura_output_manager_v2
event display_id(
output_name: uint,
display_id_hi: uint,
display_id_lo: uint,
)Available since version 1
advertise the output's display id
This event describes the 64bit display id assigned to each display by
ChromeOS. The value is opaque and should not be interpreted.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event logical_position(
output_name: uint,
x: int,
y: int,
)Available since version 1
- x — x position within the global compositor space
- y — y position within the global compositor space
position of the output within the global compositor space
The position event describes the location of the wl_output within the
global compositor space.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event logical_size(
output_name: uint,
width: int,
height: int,
)Available since version 1
- width — width in global compositor space
- height — height in global compositor space
size of the output in the global compositor space
The logical_size event describes the logical size of the output in the
global compositor space.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event physical_size(
output_name: uint,
width: int,
height: int,
)Available since version 1
- width — width in global compositor space
- height — height in global compositor space
size of the output in pixels
The physical resolution of the display in pixels. The value should not
include any overscan insets or display rotation, except for any panel
orientation adjustment.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event work_area_insets(
output_name: uint,
top: int,
left: int,
bottom: int,
right: int,
)Available since version 1
advertise the work area insets for the output
This event describes the work area insets for the output in logical
screen coordinates, from which the work area can be calculated.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager_v2
event device_scale_factor(
output_name: uint,
device_scale_factor: uint,
)Available since version 1
- device_scale_factor — display scale factor, in float format
advertise device scale factor for the output
The scale factor of the output device. We reinterpret_cast the float
scale factor into a 32-bit uint and later cast back into a float. This
is because wayland does not support native transport of floats. As
different CPU architectures may use different endian representations for
IEEE 754 floats, this protocol implicitly assumes that the caller and
receiver are the same machine.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event logical_transform(
output_name: uint,
transform: int<wl_output.transform>,
)Available since version 1
- transform — transform that maps framebuffer to output
logical transform of the output
This event describes the logical transform for the output. Whereas
panel transform corresponds to the display's panel rotation, the logical
transform corresponds to the display's logical rotation.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event panel_transform(
output_name: uint,
transform: int<wl_output.transform>,
)Available since version 1
- transform — transform that maps framebuffer to output
panel transform of the output
This event describes the panel transform for the output, which is the
associated display's panel rotation.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event name(
output_name: uint,
name: string,
)Available since version 1
human-readable name of this output
The name is a UTF-8 string with no convention defined for its contents.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event description(
output_name: uint,
description: string,
)Available since version 1
- description — output description
human-readable description of this output
The description is a UTF-8 string with no convention defined for its
contents.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event overscan_insets(
output_name: uint,
top: int,
left: int,
bottom: int,
right: int,
)Available since version 1
advertise the overscan insets for the output
This event describes the overscan insets for the output in physical
pixels.
The event is sent immediately after the wl_registry.global event for the
output and subsequently in latter display configuration changes.
zaura_output_manager_v2
event activated(
output_name: uint,
)Available since version 1
target display for new windows
Notifies that this output is now active output. It is typically used as
a target when a new window is created without specific bounds.
Copyright
Copyright 2017 The Chromium Authors
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.
Version 65
aura_shell
The global interface exposing aura shell capabilities is used to
instantiate an interface extension for a wl_surface object.
This extended interface will then allow the client to use aura shell
specific functionality.
zaura_shell
enum error {
aura_surface_exists = 0,
aura_output_exists = 1,
}- aura_surface_exists — the surface already has an aura surface object associated
- aura_output_exists — the output already has an aura output object associated
zaura_shell
request get_aura_surface(
id: new_id<zaura_surface>,
surface: object<wl_surface>,
)- id — the new aura surface interface id
- surface — the surface
extend surface interface for aura shell
Instantiate an interface extension for the given wl_surface to
provide aura shell functionality. If the given wl_surface is not
associated with a shell surface, the shell_surface_missing protocol
error is raised.
zaura_shell
request get_aura_output(
id: new_id<zaura_output>,
output: object<wl_output>,
)Available since version 2
- id — the new aura output interface id
- output — the output
extend output interface for aura shell
Instantiate an interface extension for the given wl_output to
provide aura shell functionality.
zaura_shell
enum layout_mode {
windowed = 1,
tablet = 2,
}- windowed — multiple windows
- tablet — restricted mode for tablet
the layout mode
Specifies the server's window layout mode.
zaura_shell
event layout_mode(
layout_mode: uint,
)Available since version 11
- layout_mode — layout_mode enum
sends the layout_mode
Sends the layout_mode used by the server.
zaura_shell
event bug_fix(
id: uint,
)Available since version 14
- id — ID of a single bug fix
sends a bug fix ID
Sends a monorail ID of a bug fixed on the exo server that clients can
use to gate functionality.
zaura_shell
event desks_changed(
desk_names: array,
)Available since version 22
- desk_names — an array of existing desks' names
sends names of desks
Notifies when there is a change in global desks state. This is emitted on
desk name changes, desk addition/removal or desks are reordered.
"desk_names" argument contains the set of null terminated strings as names of desks.
zaura_shell
event desk_activation_changed(
active_desk_index: int,
)Available since version 22
- active_desk_index — index of the active desk
sends the index of the active desk
Notifies when there is a change of the active desk.
zaura_shell
event activated(
gained_active: nullable object<wl_surface>,
lost_active: nullable object<wl_surface>,
)Available since version 24
activated surface changed
Notifies client that the activated surface changed.
zaura_shell
request surface_submission_in_pixel_coordinates()
Available since version 26
surfaces will be submitted in pixel coordinates
[Deprecated] Informs the server that when submitting surfaces, this
client will not use wl_surface_set_buffer_scale to report the scales,
nor will it apply scale via vp_viewporter. Instead the server should
apply an appropriate scale transform to have the submitted buffers
composited correctly.
Available since version 28
- id — the aura popup interface id
get aura popup
Retrieve the aura popup interface for the given xdg popup interface
zaura_shell
request release()
DestructorAvailable since version 38
release zaura_shell object
Using this request a client can tell the server that it is not going to
use the zaura_shell object anymore. This does not affect any other objects.
This is named "release" because "destroy" is a special named function used for
freeing wl_proxy objects. Naming it "destroy" will cause marshalling errors
when running on lower versioned hosts. All "release" requests here should be
renamed to "destroy" if we move to aura-shell v2.
zaura_shell
event set_overview_mode()
Available since version 57
entered overview mode
Notifies client that the server has entered overview mode. Overview mode
displays all app windows associated with the current desk for the user.
zaura_shell
event compositor_version(
version_label: string,
)Available since version 58
- version_label — version string label
sends the server version
Sends the Exo compositor version information.
zaura_shell
event all_bug_fixes_sent()
Available since version 60
completed sending all bug fix ids
Notifies client that all the IDs of a bug fixed on the exo server is
sent. Bug fix ids are sent via bug_fix events which sends ids one by
one, not an array. This event is used to confirm all ids are sent.
zaura_shell
event window_corners_radii(
upper_left_radius: uint,
upper_right_radius: uint,
lower_right_radius: uint,
lower_left_radius: uint,
)Available since version 61
sends the radius of each corner the window
Sends the radius of each corner of the window to the clients in dips.
Version 51
aura shell interface to a wl_surface
An additional interface to a wl_surface object, which allows the
client to access aura shell specific functionality for surface.
zaura_surface
enum frame_type {
none = 0,
normal = 1,
shadow = 2,
}- none — no frame
- normal — caption with shadow
- shadow — shadow only
different frame types
Frame types that can be used to decorate a surface.
zaura_surface
request set_frame(
type: uint,
)- type — the new frame type
request a frame for surface
[Deprecated] Suggests a surface should use a specific frame. Deprecated
since M105. See the set_decoration method on zaura_toplevel and
zaura_popup.
zaura_surface
request set_parent(
parent: nullable object<zaura_surface>,
x: int,
y: int,
)Available since version 2
set the parent of this surface
Set the "parent" of this surface. "x" and "y" arguments specify the
initial position for surface relative to parent.
zaura_surface
request set_frame_colors(
active_color: uint,
inactive_color: uint,
)Available since version 3
- active_color — 32 bit ARGB color value, not premultiplied
- inactive_color — 32 bit ARGB color value, not premultiplied
set the frame colors of this surface
Set the frame colors. This must be set before the initial
commit first, otherwise the subsequent request may not be
fulfilled.
zaura_surface
request set_startup_id(
startup_id: nullable string,
)Available since version 4
set the startup ID of this surface
Set the startup ID.
zaura_surface
request set_application_id(
application_id: nullable string,
)Available since version 5
set the application ID of this surface
Set the application ID.
zaura_surface
request set_client_surface_id(
client_surface_id: int,
)Available since version 7
set the client surface ID of this surface
Deprecated. Please use set_client_surface_str_id instead.
Set the identifier of the surface assigned by the client.
zaura_surface
enum occlusion_change_reason {
user_action = 1,
}- user_action — occlusion changed as a result of a user action
occlusion change reason
Enum describing why an occlusion change happened. An occlusion change as a
result of a user action could include things like the user moving a window,
changing occlusion, or opening/closing a window, changing the occlusion.
zaura_surface
request set_occlusion_tracking()
Available since version 8
set tracked occlusion region
Sets occlusion tracking on this surface. The client will be updated with a
new occlusion fraction when the amount of occlusion of this surface changes.
zaura_surface
event occlusion_changed(
occlusion_fraction: fixed,
occlusion_reason: uint,
)Available since version 8
Notifies on an occlusion change
Notifies when there is a change in the amount this surface is occluded.
The occlusion update is sent as a fixed point number from 0 to 1, representing
the proportion of occlusion.
zaura_surface
request activate()
Available since version 9
Indicate that this window wants to be the active window
[Deprecated] Make this the active window. This usually implies something
like restacking this surface to the foreground. The compositor is free
to ignore this request if it deems the client to be misbehaving.
Typically this request will only be honoured in response to some user
driven event, such as executing an application or opening a file in a
window that already exists.
zaura_surface
request draw_attention()
Available since version 9
Indicate that this window wants some of the user's attention
Draw attention to this surface in a way that does not change the user's
focus. This usually means animating window decorations or taskbar icons.
The compositor can still ignore this request if it deems fit, but unlike
draw_focus, these requests are expected to come from background tasks,
and are more likely to be honoured.
zaura_surface
enum fullscreen_mode {
immersive = 0,
plain = 1,
}- immersive — user can access system UIs such as the shelf and window frame
by pointing to, or swiping over, the screen edge
- plain — user cannot access system UIs using mouse/touches
Specifies the behavior of the surface in fullscreen.
[Deprecated] Possible windowing system behaviors if this surface were to go
fullscreen.
zaura_surface
request set_fullscreen_mode(
mode: uint<fullscreen_mode>,
)Available since version 10
Sets the behavior of the surface in fullscreen.
[Deprecated] Use the set_fullscreen_mode in the toplevel interface.
Suggests how the windowing system should behave if this surface were
to go fullscreen. Does not make the surface fullscreen.
Typically the default mode is "immersive".
zaura_surface
request set_client_surface_str_id(
client_surface_id: string,
)Available since version 12
set the client surface ID of this surface
Set the identifier of the surface assigned by the client.
zaura_surface
request set_server_start_resize()
Available since version 15
request a server-side shadow for surface
Suggests a surface to have client-side decoration, but
server-side decides when and where to start the resize. The server may also
apply visual effects to indicate that the resize operation is ongoing.
zaura_surface
request intent_to_snap(
direction: uint<snap_direction>,
)Available since version 16
client intents to snap the surface.
[Deprecated] Use intent_to_snap on zaura_toplevel.
Notify (or inform) the server the client's intent to snap the window.
To inform it's no longer willing to snap, send 'none'.
zaura_surface
event lock_frame_normal()
Available since version 17
Notify the client that server intent to lock window in normal or restore state
Notifies the client to lock window in normal or restore state. When
window is locked, the window frame should look like it is in restored
state, but actually isn't. Locking happends while dragging a maximized
window.
zaura_surface
event unlock_frame_normal()
Available since version 17
Notify the client that server intent to unlock window's normal or restore state
Notifies the client to unlock window if it is previously locked.
Unlocking happends while dragging a maximized window.
zaura_surface
request set_can_go_back()
Available since version 19
Set the minimize-on-back-gesture behavior.
Sets that the surface can go back as per its navigation list.
This allows the server to react to by minimizing the window upon a
system wide back gesture.
zaura_surface
request unset_can_go_back()
Available since version 19
Unset the minimize-on-back-gesture behavior.
Unsets that the surface can go back as per its navigation list.
See above.
zaura_surface
request set_pip()
Available since version 20
Set pip for the surface.
Requests that the surface is set to Picture-in-Picture (PIP).
zaura_surface
request unset_pip()
Available since version 20
Unset pip for the surface.
Requests that the surface is unset from Picture-in-Picture (PIP).
zaura_surface
request set_aspect_ratio(
width: int,
height: int,
)Available since version 20
Set aspect ratio for the surface.
Sets the aspect ratio of the surface.
zaura_surface
enum occlusion_state {
unknown = 0,
visible = 1,
occluded = 2,
hidden = 3,
}- unknown — The surface's occlusion state isn't tracked
- visible — The surface is visible
- occluded — The surface is occluded
- hidden — The surface is not visible
surface occlusion state
Describes the occlusion state of a surface.
zaura_surface
event occlusion_state_changed(
mode: uint<occlusion_state>,
)Available since version 21
Notify the client that the occlusion state changed
Notifies the client that the occlusion state of a window has changed. Clients
will only receive these messages if they previously request occlusion tracking
via set_occlusion_tracking for a particular surface.
zaura_surface
request move_to_desk(
index: int,
)Available since version 22
move to desk
If |index| equals -1, requests that the server toggles whether client
is visible on all workspaces.
If |index| is not -1, requests that the server moves the client to the desk at
|index|.
zaura_surface
event desk_changed(
state: int,
)Available since version 22
- state — index of desk or -1 for a window assigned to all desks
window desk state changed
Notifies when there is a change in the desk state of a window.
This is emitted when a window is moved to another desk or
when its assigned-to-all-desks state changes.
zaura_surface
request set_initial_workspace(
initial_workspace: string,
)Available since version 23
- initial_workspace — intial workspace for restoring or '-1' for visible on all workspaces
initial workspace for restore
If |initial_workspace| equals '-1', a window is restored and visible on all workspaces,
Otherwise, set the initial workspace to restore the window to the corresponding workspace.
This is not double buffered and must be set before attaching a buffer.
zaura_surface
request set_pin(
trusted: int,
)Available since version 25
- trusted — 0 for non trusted
pin a window (trusted or not)
Requests that a window is pinned which means that the system does not allow
the user to leave the window until an exit criteria is met.
This is a request to get the window pinned so that the user cannot get to any
other window / application. There are two modes:
A. trusted is 0 - which is slightly less restrictive and allows the user to
get out of the window by a predefined way of authentication.
B. trusted is not 0 in which case a trusted application was locking down the
system and needs to unlock. This is used for e.g. School tests.
zaura_surface
request unset_pin()
Available since version 25
unpin a window
Requests that the user can leave a previously pinned window.
This is a request to unpin a previously pinned window. It does not matter if
the window was locked with the trusted state or not.
zaura_surface
event start_throttle()
Available since version 29
start throttling on the surface
Informs the client to start throttling on the surface.
zaura_surface
event end_throttle()
Available since version 29
end throttling on the surface
Informs the client to end throttling on the surface.
zaura_surface
request show_tooltip(
text: string,
x: int,
y: int,
tooltip_trigger: uint,
show_delay: uint,
hide_delay: uint,
)Available since version 47
- tooltip_trigger — tooltip_trigger enum
- show_delay — delay to show tooltip in millisecond
- hide_delay — delay to hide tooltip in millisecond
show tooltip window
Show tooltip on server side.
x and y specifies the location of tooltip in surface local coordinates.
hide_delay and show_delay specify the time to wait until showing/hiding tooltip.
The unit is millisecond.
zaura_surface
enum tooltip_trigger {
cursor = 0,
keyboard = 1,
}- cursor — triggered by cursor
- keyboard — triggered by keyboard
type of tooltip trigger
Describes what triggered tooltip
zaura_surface
request hide_tooltip()
Available since version 47
hide tooltip window
Hide tooltip created by the same client on server side.
This may be called even when there is no tooltip window to hide.
zaura_surface
event tooltip_shown(
text: string,
x: int,
y: int,
width: int,
height: int,
)Available since version 47
tooltip is shown by server side
Informs the client that the tooltip is shown with states.
x and y specifies the location of tooltip in surface local coordinates.
zaura_surface
event tooltip_hidden()
Available since version 47
tooltip is hidden by server side
Informs the client that the tooltip is hidden.
zaura_surface
request set_accessibility_id(
id: int,
)Available since version 51
- id — Accessibility ID. Negative number removes existing accessibility ID from the surface.
set accessibility ID to the surface
Set accessibility window ID to the surface. A negative number removes
the existing accessibility ID from the surface.
Version 45
aura shell interface to a wl_output
An additional interface to a wl_output object, which allows the
client to access aura shell specific functionality for output.
zaura_output
enum scale_property {
current = 0x1,
preferred = 0x2,
}This is a bitfield
- current — indicates this is the current scale
- preferred — indicates this is the preferred scale
scale information
These flags describe properties of an output scale.
They are used in the flags bitfield of the scale event.
zaura_output
enum scale_factor {
0400 = 400,
0500 = 500,
0550 = 550,
0600 = 600,
0625 = 625,
0650 = 650,
0700 = 700,
0750 = 750,
0800 = 800,
0850 = 850,
0900 = 900,
0950 = 950,
1000 = 1000,
1050 = 1050,
1100 = 1100,
1150 = 1150,
1125 = 1125,
1200 = 1200,
1250 = 1250,
1300 = 1300,
1400 = 1400,
1450 = 1450,
1500 = 1500,
1600 = 1600,
1750 = 1750,
1800 = 1800,
2000 = 2000,
2200 = 2200,
2250 = 2250,
2500 = 2500,
2750 = 2750,
3000 = 3000,
3500 = 3500,
4000 = 4000,
4500 = 4500,
5000 = 5000,
}zaura_output
event scale(
flags: uint<scale_property>,
scale: uint<scale_factor>,
)Available since version 2
- flags — bitfield of scale flags
- scale — output scale
advertise available scales for the output
The scale event describes an available scale for the output.
The event is sent when binding to the output object and there
will always be one scale, the current scale. The event is sent
again if an output changes scale, for the scale that is now
current. In other words, the current scale is always the last
scale that was received with the current flag set.
zaura_output
event connection(
connection: uint<connection_type>,
)Available since version 5
- connection — output connection
advertise connection for the output
The connection event describes how the output is connected.
The event is sent when binding to the output object.
zaura_output
event device_scale_factor(
scale: uint<scale_factor>,
)Available since version 5
- scale — output device scale factor
advertise device scale factor for the output
This event describes the device specific scale factor for the output.
The device specific scale factor is not expected the change during
the lifetime of the output. And it is not limited to an integer value
like the scale factor provided by wl_output interface. The exact
contents scale used by the compositor can be determined by combining
this device scale factor with the current output scale.
The event is sent when binding to the output object.
zaura_output
event insets(
top: int,
left: int,
bottom: int,
right: int,
)Available since version 33
advertise the work area insets for the output
This event describes the insets for the output in logical screen
coordinates, from which the work area can be calculated.
This event is sent before wl_output.done, after which the client would
apply the change.
zaura_output
event logical_transform(
transform: int<wl_output.transform>,
)Available since version 34
advertise the output's logical transform
This event describes the logical transform for the output. Whereas
wl_output.geometry's transform corresponds to the display's panel
rotation, the logical transform corresponds to the display's logical
rotation.
This event is sent before wl_output.done, after which the client would
apply the change.
zaura_output
event display_id(
display_id_hi: uint,
display_id_lo: uint,
)Available since version 43
advertise the output's display id
This event describes the 64bit display id assigned to each display by ChromeOS.
The value is opaque and should not be interpreted.
zaura_output
event activated()
Available since version 45
target display for new windows
Notifies that this output is now active output. It is typically used as a
target when a new window is created without specific bounds.
Version 65
aura shell interface to the toplevel shell
An interface to the toplevel shell, which allows the
client to access shell specific functionality.
zaura_toplevel
enum orientation_lock {
none = 1,
portrait = 2,
landscape = 3,
current = 4,
portrait_primary = 5,
landscape_primary = 6,
portrait_secondary = 7,
landscape_secondary = 8,
}- none — no orientation lock
- portrait — primary or secondary portrait
- landscape — primary or secondary landscape
- current — keep current orientation
- portrait_primary — primary portrait
- landscape_primary — primary landscape
- portrait_secondary — secondary portrait
- landscape_secondary — secondary landscape
orientation lock request
Defines orientation request when a surface is in fullscreen.
zaura_toplevel
request surface_submission_in_pixel_coordinates()
Available since version 28
surface will be submitted in pixel coordinates
Informs the server that when submitting this surface, this client will not
use wl_surface_set_buffer_scale to report the scales, nor will it apply
scale via vp_viewporter. Instead the server should apply an appropriate
scale transform for the submitted buffers to be composited correctly.
zaura_toplevel
request set_supports_screen_coordinates()
Available since version 29
enables screen coordinates in window bounds
Requesting this will enable screen coordinates in surfaces
associated with aura_toplevel including sub surfaces and popup
windows who added this toplevel as a parent. This should be
set before first commit.
zaura_toplevel
request set_window_bounds(
x: int,
y: int,
width: int,
height: int,
output: nullable object<wl_output>,
)Available since version 29
set window size and position
Request a new location and bounds of the surface in DP screen
coordinates. The size will be applied to visible bounds used
in set_geometry. The output is a hint for the compositor to
determine which output the window should move to. If the
output is null, the compositor should make decision solely by
the given bounds. These parameters are just a request and the
compositor may ignore, adjust the size and position based on
the rule imposed by the window manager, or may preserve it for
future operations. For example, the compositor will not allow
a position outside of the output, or the compositor may just
store it if the toplevel surface is in maximiezd state, and
may use it upon unmaximized.
zaura_toplevel
event configure(
x: int,
y: int,
width: int,
height: int,
states: array,
)Available since version 29
suggest a surface change
A configuration change that also includes the window origin in screen coordinates.
zaura_toplevel
enum state {
immersive = 100,
minimized = 101,
snapped_primary = 102,
snapped_secondary = 103,
floated = 104,
pip = 105,
pinned = 106,
trusted_pinned = 107,
}- immersive
Available since version 36
immersive mode with hidden title bar and shelf
User can access system UIs such as the shelf and window frame
by pointing to, or swiping over, the screen edge.
- minimized
Available since version 36
surface is minimized
The window has been minimized.
- snapped_primary
Available since version 38
window is snapped in primary position
The window is snapped to the left if the display is in landscape mode
and at the top in portrait mode.
- snapped_secondary
Available since version 38
window is snapped in secondary position
The window is snapped to the right if the display is in landscape mode
and at the bottom in portrait mode.
- floated
Available since version 38
window is floated on top
The window is floated on top of other windows. One floated window is
allowed per desk. Floating a window when there is already a floated
window on the same desk will unfloat the floated window.
- pip
Available since version 54
window is PiP
The window is in PiP mode.
- pinned
Available since version 64
window is pinned
The window is pinned.
- trusted_pinned
Available since version 64
window is trusted pinned
The window is trusted pinned.
supplemental aura states to xdg states
The states that are contained here are supplemental to the states
defined in the XDG shell and specific aura windows.
zaura_toplevel
event origin_change(
x: int,
y: int,
)Available since version 29
window origin change
A notification sent when the window origin has changed. Unlike a configure,
this does not imply the client needs to resize. The values are in screen
coordinates.
zaura_toplevel
request set_restore_info(
restore_session_id: int,
restore_window_id: int,
)Available since version 30
- restore_session_id — unique browser session id
- restore_window_id — restore browser window id
set session id and restore id
Request session id and restore id of a newly created browser window.
Set the information used by compositor to restore the toplevel
surface state, such as window position, window state, upon creation.
This is not double buffered and must be set before sending first commit.
zaura_toplevel
request set_system_modal()
Available since version 31
make window a system modal
Requests that the toplevel surface should become a system modal. The
compositor will prevent other windows from receiving events. If there
are multiple system modal surfaces, the compositor will decide which
one to receive events.
zaura_toplevel
request unset_system_modal()
Available since version 31
unset window system modal state
Requests that the system modal state of the toplevel surface will be
unset. The compositor will then allow other windows to recieve events.
zaura_toplevel
request set_restore_info_with_window_id_source(
restore_session_id: int,
restore_window_id_source: string,
)Available since version 32
- restore_session_id — unique browser session id
- restore_window_id_source — restore window id source
set session id and restore window id source
Request session id and restore id of the window. Set the information used by compositor to restore the toplevel surface state, such as window position, window state, upon creation. This is not double buffered and must be set before sending first commit. This is different from set_restore_info, used for clients that create multiple windows associated with restore_id_source.
zaura_toplevel
request set_decoration(
type: uint,
)Available since version 35
- type — the new frame type
request a decoration for surface
Clients are allowed to request a particular decoration for a
zaura_toplevel. The server is not required to honor this
request. See decoration_type for available options. This must
be set before the initial commit first, otherwise the
subsequent request may not be fulfilled. Available since M105.
zaura_toplevel
enum decoration_type {
none = 0,
normal = 1,
shadow = 2,
}- none — no frame
- normal — caption with shadow
- shadow — shadow only
different decoration types
Decoration types are used to modify the surface (e.g. drop shadow).
zaura_toplevel
request set_float()
Available since version 39
float the surface on top
[Deprecated] Use set_float_to_location.
This is a request to place the surface above others.
zaura_toplevel
request unset_float()
Available since version 39
unset the surface float
Request that the surface resets floating.
zaura_toplevel
request set_z_order(
z_order: uint,
)Available since version 40
- z_order — z order value for the window
set z order for window
Sets the z order for a toplevel surface. See z_order_level for available options.
zaura_toplevel
enum z_order_level {
normal = 0,
floating_window = 1,
floating_ui_element = 2,
security_surface = 3,
}- normal — the default level for windows
- floating_window — a floating window z-ordered above other normal windows
- floating_ui_element — used to show non-window style UIs that are shown above floating windows
- security_surface — cannot be interfered with or covered up
z order levels for windows
Different z order levels that are used to set the z order for a toplevel surface.
zaura_toplevel
request set_origin(
x: int,
y: int,
output: nullable object<wl_output>,
)Available since version 41
- output — output to contain the surface
set window position in DPs
Request a new location for the surface in device-independent pixels
(DPs), relative to the top-left corner of the given output.
A null output means whichever output currently contains the surface.
These parameters are just a request and the compositor may ignore
them, adjust them due to rules imposed by the window manager, or
preserve them for future operations. For example, the compositor will
not allow a position outside of the output; or the compositor may just
store it if the toplevel surface is in maximized state, and may use it
upon unmaximize.
zaura_toplevel
request activate()
Available since version 42
activates the window
Activates this window. This is equivalent to bringing the window to the
foreground. The compositor is free to ignore this request if it deems
the client to be misbehaving.
zaura_toplevel
request deactivate()
Available since version 42
deactivates the window
Deactivates this window. This is equivalent to requesting that the
window not be the foreground window. The exact behavior is
compositor-defined. The compositor is free to ignore this request
if it deems the client to be misbehaving.
zaura_toplevel
enum fullscreen_mode {
plain = 0,
immersive = 1,
}- plain — user cannot access system UIs using mouse/touches
- immersive — user can access system UIs such as the shelf and window frame
by pointing to, or swiping over, the screen edge
Specifies the behavior of the surface in fullscreen.
Possible windowing system behaviors if this surface were to go
fullscreen.
zaura_toplevel
request set_fullscreen_mode(
mode: uint<fullscreen_mode>,
)Available since version 44
Sets the behavior of the surface in fullscreen.
Suggests how the windowing manager should behave if this surface were
to go fullscreen. Does not make the surface fullscreen.
In precise, if the surface is not in fullscreen yet, switching the mode
does not have immediate impact from the client side perspective, but
will change the behavior when making the surface fullscreen is
requested next time.
If the surface is already in fullscreen, then this request has an
immediate impact to switch the fullscreen mode between plan and
immersive.
zaura_toplevel
request set_scale_factor(
scale_factor_as_uint: uint,
)Available since version 46
Allows the client to set the scale factor for the future buffer commits.
The client has a 32-bit float scale factor that is associated with each
zaura toplevel. This scale factor must be propagated exactly to exo. To
do so we reinterpret_cast into a 32-bit uint and later cast back into a
float. This is because wayland does not support native transport of
floats. As different CPU architectures may use different endian
representations for IEEE 754 floats, this protocol implicitly assumes
that the caller and receiver are the same machine. To avoid redundant
messages, this request needs to only be called once when the zaura
toplevel scale factor changes. This is double buffered state and will be
applied in the next commit.
zaura_toplevel
request set_snap_primary(
snap_ratio_as_uint: uint,
)Available since version 48
snap the surface to the primary snap position.
Request that surface is snapped to the left or top if primary layout,
right or bottom otherwise.
zaura_toplevel
request set_snap_secondary(
snap_ratio_as_uint: uint,
)Available since version 48
snap the surface to the secondary snap position.
Request that surface is snapped to the right or bottom if primary
layout, left or top otherwise.
zaura_toplevel
enum snap_direction {
none = 0,
primary = 1,
secondary = 2,
}- none — unsnap the window
- primary — snap the window to the left or
top in primary layout, right or bottom in secondary layout
- secondary — snap the window to the right
or bottom in primary layout, top or left in secondary layout
window snap directions
Window snap directions.
zaura_toplevel
request intent_to_snap(
direction: uint<snap_direction>,
)Available since version 49
client intents to snap the surface.
Notify (or inform) the server the client's intent to snap the window.
To inform it's no longer willing to snap, send 'none'.
zaura_toplevel
event configure_raster_scale(
scale: uint,
)Available since version 50
- scale — Raster scale, in float format
set the raster scale during a configure
Sets the raster scale of this window. This should be called during a
configure event sequence. To do so we reinterpret_cast into a 32-bit
uint and later cast back into a float. This is because wayland does not
support native transport of floats. As different CPU architectures may
use different endian representations for IEEE 754 floats, this protocol
implicitly assumes that the caller and receiver are the same machine.
zaura_toplevel
enum persistable {
not_persistable = 0,
persistable = 1,
}- not_persistable — the value is not persistable
- persistable — the value is persistable
Describes whether or not the value is persistable
Binary enum maps to boolean, describes whether or not a value is
persistable.
zaura_toplevel
request set_persistable(
persistable: uint<persistable>,
)Available since version 52
- persistable — is the argument persistable
Describes if the window is persistable
Request the persistable status of a window. Sets the persistable status
of the window in its window properties. Should be called before first
commit.
zaura_toplevel
request set_shape(
region: nullable object<wl_region>,
)Available since version 53
set the shape of the surface in DP
Sets the shape of the toplevel window in DP. Passing NULL will reset the
shape of the window.
This should be used only in support of the existing (deprecated) Chrome
Apps SetShape API and not for any other purpose.
zaura_toplevel
request set_top_inset(
height: int,
)Available since version 55
- height — Top inset of client window. Should be non negative.
set top inset to the surface
Sets the top inset to the surface. This represents the header height
and should be non negative.
zaura_toplevel
event rotate_focus(
serial: uint,
direction: uint<rotate_direction>,
restart: uint<rotate_restart_state>,
)Available since version 56
- serial — serial for the rotation event
- direction — the direction for linear traversal
- restart — whether or not to restart traversal
rotate focus within window
Rotates focus within the toplevel window. The window must sort its
focusable view into a stable and linearly traversable order. Prior to
rotating focus, the surface should already be activated and have
keyboard focus. If the surface has not been activated or does not have
keyboard focus, the server should first activate and enter keyboard
focus for the window. An example of event order could be:
activate surface
enter keyboard focus
rotate focus
If the window is not activated or does not have keyboard focus, the
client should respond with a "not handled" and not perform any
operation.
To start a new series rotation, the server will set the "restart" arg
to true. If the "restart" arg is set to true, the window should set the
focus on the first UI element for the given direction and not perform
any rotation.
The client should respond with whether the rotation was successful via
the "handled" field in the "ack_rotate_focus" request. The client should
pass on the event serial and direction within the ack message.
zaura_toplevel
request ack_rotate_focus(
serial: uint,
handled: uint<rotate_handled_state>,
)Available since version 56
- serial — serial for the original; rotation event
- handled — whether or not the rotation was successful
status of rotate focus event
If the focus has been successfully rotated between UI elements inside
surface, client replies with 'handled'. If the focus didn't rotate, the
client reply with 'not_handled'. A server may use this to move the focus
to next focusable surface.
Note that a delay in processing in the client could result in stale acks
received by the server.
zaura_toplevel
request set_can_maximize()
Available since version 58
Hint that the toplevel surface can be maximized
Hints to the window manager that the toplevel surface can be maximized.
zaura_toplevel
request unset_can_maximize()
Available since version 58
Hint that the toplevel surface should not be maximized
Hints to the window manager that the toplevel surface should not be
maximized. Note that the window manager might still request the client
to be maximized. In such an event, the client should respect the
window manager's request and maximize. It may unset the maximized state
afterwards.
zaura_toplevel
request set_can_fullscreen()
Available since version 58
Hint that the toplevel surface can enter fullscreen
Hints to the window manager that the toplevel surface can enter
fullscreen.
zaura_toplevel
request unset_can_fullscreen()
Available since version 58
Hint that the toplevel surface should not enter fullscreen
Hints to the window manager that the toplevel surface should not be
enter fullscreen. Note that the window manager might still request the
client enter fullscreen. In such an event, the client should respect the
window manager's request and enter fullscreen. It may exit fullscreen
afterwards.
zaura_toplevel
enum float_start_location {
bottom_right = 0,
bottom_left = 1,
}- bottom_right — On float, surface goes to the bottom right of the work area. This is the default.
- bottom_left — On float, surface goes to the bottom left of the work area.
Specifies the location of a surface that just got floated.
Possible start locations if a surface gets floated.
zaura_toplevel
request set_window_corner_radii(
upper_left_radius: uint,
upper_right_radius: uint,
lower_right_radius: uint,
lower_left_radius: uint,
)Available since version 60
Request to apply rounded corners to the window of the surface.
The client specifies the radius of each corner to be applied to the
window in DPs (device independent pixels).
The window radius is double buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
Note: Rounded corner radii affects the wl_surface tree, including
subsurfaces. Once this protocol is called, surfaces cannot set
their own rounded corner bounds because rounded window bounds will be
applied to the whole surface tree.
zaura_toplevel
enum in_overview {
not_in_overview = 0,
in_overview = 1,
}- not_in_overview — the value is not in overview
- in_overview — the value is in overview
Describes whether or not the value is in overview
Binary enum maps to boolean, describes whether or not a value is in
overview.
zaura_toplevel
event overview_change(
in_overview: uint<in_overview>,
)Available since version 62
- in_overview — in overview or not
window is in overview
The window is being shown in overview mode. Note that this is
different than shell overview state, as not all windows will be
part of the overview grid.
zaura_toplevel
request set_shadow_corner_radii(
upper_left_radius: uint,
upper_right_radius: uint,
lower_right_radius: uint,
lower_left_radius: uint,
)Available since version 63
Request to apply rounded corners to the shadow of the surface.
The client specifies the radius of each corner to be applied to the shadow
associated with the aura toplevel surface in device independent pixels (DPs).
The shadow radius is double buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
zaura_toplevel
event configure_occlusion_state(
mode: uint<occlusion_state>,
)Available since version 65
set the occlusion state during a configure
Sets the occlusion state of this window. This should be called during a
configure event sequence. This is used when the occlusion state needs to
be set as a synchronized operation, compared to occlusion_state_changed,
which is not synchronized. For example, this can be used to mark a
window as hidden so it can discard resources. When making it visible
again, it may need some time to recreate its buffers, which is why this
operation needs to be synchronized.
Version 46
aura shell interface to the popup shell
An interface to the popup shell, which allows the
client to access shell specific functionality.
Available since version 28
surface will be submitted in pixel coordinates
Informs the server that when submitting this surface, this client will not
use wl_surface_set_buffer_scale to report the scales, nor will it apply
scale via vp_viewporter. Instead the server should apply an appropriate
scale transform for the submitted buffers to be composited correctly.
Available since version 35
- type — the new frame type
request a decoration for surface
Clients are allowed to request a particular decoration for a
zaura_toplevel. The server is not required to honor this request. See
decoration_type for available options. Available since M105.
- none — no frame
- normal — caption with shadow
- shadow — shadow only
different decoration types
Decoration types are used to modify the surface (e.g. drop shadow).
Available since version 37
set popup type to menu
Set popup type to menu
DestructorAvailable since version 38
Available since version 46
Allows the client to set the scale factor for the future buffer commits.
The client has a 32-bit float scale factor that is associated with each
zaura popup. This scale factor must be propagated exactly to exo. To
do so we reinterpret_cast into a 32-bit uint and later cast back into a
float. This is because wayland does not support native transport of
floats. As different CPU architectures may use different endian
representations for IEEE 754 floats, this protocol implicitly assumes
that the caller and receiver are the same machine. To avoid redundant
messages, this request needs to only be called once when the zaura
popup's scale factor changes.
Version 3
aura shell interface to the output manager
[Deprecated] Deprecated since M122. See the zaura_output_manager_v2
interface.
A global responsible for ensuring clients have a complete view of a given
output's state immediately following the bind of wl_output, and
subsequently as needed.
Clients can expect that all the manager's events for a given wl_output
arrive before the associated wl_output.done event. Clients must bind to
the manager global before any output globals.
zaura_output_manager
event display_id(
output: object<wl_output>,
display_id_hi: uint,
display_id_lo: uint,
)Available since version 1
advertise the output's display id
This event describes the 64bit display id assigned to each display by
ChromeOS. The value is opaque and should not be interpreted.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event logical_position(
output: object<wl_output>,
x: int,
y: int,
)Available since version 1
- x — x position within the global compositor space
- y — y position within the global compositor space
position of the output within the global compositor space
The position event describes the location of the wl_output within the
global compositor space.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event logical_size(
output: object<wl_output>,
width: int,
height: int,
)Available since version 1
- width — width in global compositor space
- height — height in global compositor space
size of the output in the global compositor space
The logical_size event describes the logical size of the output in the
global compositor space.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event physical_size(
output: object<wl_output>,
width: int,
height: int,
)Available since version 1
- width — width in global compositor space
- height — height in global compositor space
size of the output in pixels
The physical resolution of the display in pixels. The value should not
include any overscan insets or display rotation, except for any panel
orientation adjustment.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event insets(
output: object<wl_output>,
top: int,
left: int,
bottom: int,
right: int,
)Available since version 1
advertise the work area insets for the output
This event describes the insets for the output in logical screen
coordinates, from which the work area can be calculated.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event device_scale_factor(
output: object<wl_output>,
device_scale_factor: uint,
)Available since version 1
- device_scale_factor — display scale factor, in float format
advertise device scale factor for the output
The scale factor of the output device. We reinterpret_cast the float
scale factor into a 32-bit uint and later cast back into a float. This
is because wayland does not support native transport of floats. As
different CPU architectures may use different endian representations for
IEEE 754 floats, this protocol implicitly assumes that the caller and
receiver are the same machine.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event logical_transform(
output: object<wl_output>,
transform: int<wl_output.transform>,
)Available since version 1
- transform — transform that maps framebuffer to output
logical transform of the output
This event describes the logical transform for the output. Whereas
panel transform corresponds to the display's panel rotation, the logical
transform corresponds to the display's logical rotation.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event panel_transform(
output: object<wl_output>,
transform: int<wl_output.transform>,
)Available since version 1
- transform — transform that maps framebuffer to output
panel transform of the output
This event describes the panel transform for the output, which is the
associated display's panel rotation.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event name(
output: object<wl_output>,
name: string,
)Available since version 1
human-readable name of this output
The name is a UTF-8 string with no convention defined for its contents.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event description(
output: object<wl_output>,
description: string,
)Available since version 1
- description — output description
human-readable description of this output
The description is a UTF-8 string with no convention defined for its
contents.
The event is sent when binding to the output object and subsequently as
output state changes.
zaura_output_manager
event activated(
output: object<wl_output>,
)Available since version 2
target display for new windows
Notifies that this output is now active output. It is typically used as
a target when a new window is created without specific bounds.
zaura_output_manager
event overscan_insets(
output: object<wl_output>,
top: int,
left: int,
bottom: int,
right: int,
)Available since version 3
advertise the overscan insets for the output
This event describes the overscan insets for the output in physical
pixels.
The event is sent when binding to the output object and subsequently as
output state changes.
Copyright
Copyright 2019 Sebastian Wick
Copyright 2019 Erwin Burema
Copyright 2020 AMD
Copyright 2020 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
color management protocol
This protocol specifies a way for a client to set the color space and
HDR metadata of a surface and to get information about the color spaces
and HDR capabilities of outputs.
This protocol is based on a proposed upstream protocol, which we will migrate
to once it is approved. It may diverge from the proposed upstream protocol
over the course of our development.
Version 6
color manager singleton
A global interface used for getting color management surface and color
management output objects as well as creating color space objects from
ICC profiles, parameters, or enumerated names.
zcr_color_manager_v1
enum eotf_names {
unknown = 0,
linear = 1,
srgb = 2,
bt2087 = 3,
adobergb = 4,
pq = 5,
hlg = 6,
bt709 = 7,
extendedsrgb10 = 8,
smpte170m = 9,
smpte240m = 10,
smptest428_1 = 11,
log = 12,
log_sqrt = 13,
iec61966_2_4 = 14,
bt1361_ecg = 15,
bt2020_10 = 16,
bt2020_12 = 17,
scrgb_linear_80_nits = 18,
gamma18 = 19,
gamma28 = 20,
srgb_hdr = 21,
}- unknown — unknown EOTF
- linear — Linear transfer function
- srgb — sRGB transfer function
- bt2087 — BT.2087 transfer function
- adobergb — AdobeRGB transfer function
- pq — Perceptual quantizer / SMPTEST2084
- hlg — hybrid log gamma
Available since version 2
- bt709 — gamma for rec709 encoded videos
Available since version 2
- extendedsrgb10 — sRGB transfer function with headroom for HDR
Available since version 2
- smpte170m — SMPTE240M transfer function
Available since version 5
- smpte240m — SMPTE240M transfer function
Available since version 5
- smptest428_1 — SMPTEST428_1 transfer function
Available since version 5
- log — LOG transfer function
Available since version 5
- log_sqrt — LOG Sqrt transfer function
Available since version 5
- iec61966_2_4 — IEC61966_2_4 transfer function
Available since version 5
- bt1361_ecg — BT1361_ECG transfer function
Available since version 5
- bt2020_10 — BT2020_10 transfer function
Available since version 5
- bt2020_12 — BT2020_12 transfer function
Available since version 5
- scrgb_linear_80_nits — SCRGB Linear transfer function
Available since version 5
- gamma18 — GAMMA18 transfer function
Available since version 5
- gamma28 — GAMMA28 transfer function
Available since version 5
- srgb_hdr — sRGB transfer function
Available since version 6
well-known EOTF names
Names that describe a well-known EOTF.
A compositor must support all of these based on the protocol interface
version.
zcr_color_manager_v1
enum chromaticity_names {
unknown = 0,
bt601_525_line = 1,
bt601_625_line = 2,
smpte170m = 3,
bt709 = 4,
bt2020 = 5,
srgb = 6,
displayp3 = 7,
adobergb = 8,
wide_gamut_color_spin = 9,
bt470m = 10,
smpte240m = 11,
xyz_d50 = 12,
smptest428_1 = 13,
smptest431_2 = 14,
film = 15,
}- unknown — unknown chromaticity
- bt601_525_line — ITU-R BT.601 http://www.itu.int/rec/R-REC-BT.601/en
- bt601_625_line — ITU-R BT.601 http://www.itu.int/rec/R-REC-BT.601/en
- smpte170m — SMPTE 170M-1999 https://www.itu.int/rec/R-REC-BT.1700/en
- bt709 — ITU-R BT.709 https://www.itu.int/rec/R-REC-BT.709/en
- bt2020 — ITU-R BT.2020 http://www.itu.int/rec/R-REC-BT.2020/en
- srgb — IEC/4WD 61966-2-1: sRGB https://webstore.iec.ch/publication/6169
- displayp3 — Display P3 https://developer.apple.com/reference/coregraphics/cgcolorspace/1408916-displayp3
- adobergb — Adobe RGB https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
- wide_gamut_color_spin —
Available since version 5
- bt470m —
Available since version 5
- smpte240m —
Available since version 5
- xyz_d50 —
Available since version 5
- smptest428_1 —
Available since version 5
- smptest431_2 —
Available since version 5
- film —
Available since version 5
well-known chromaticity names
Names that describe well-known chromaticities.
A compositor must support all of these based on the protocol interface
version.
zcr_color_manager_v1
enum whitepoint_names {
unknown = 0,
dci = 1,
d50 = 2,
d65 = 3,
}- unknown — unknown whitepoint
- dci — DCI whitepoint
- d50 — D50 whitepoint
- d65 — D65 whitepoint
well-known whitepoint names
Names that describe well-known whitepoints.
A compositor must support all of these based on the protocol interface
version.
zcr_color_manager_v1
enum error {
icc_fd = 0,
bad_enum = 1,
bad_param = 2,
}- icc_fd — given ICC fd has bad properties
- bad_enum — bad value given as a well-known name
- bad_param — bad parameter value
zcr_color_manager_v1
request create_color_space_from_icc(
id: new_id<zcr_color_space_creator_v1>,
icc: fd,
)create a color space object from ICC profiles
Create a color space object from an ICC profile. This request returns
a zcr_color_space_creator_v1 object which either returns an error
or the successfully created zcr_color_space_v1 object.
The description of the color space to create is sent in the form of an
ICC profile as a file descriptor in the argument icc.
The fd must be seekable and the maximum size of the ICC profile is 4 MB.
Violating these requirements will raise an icc_fd protocol error. A
compositor must not modify the contents of the file, and the fd may be
sealed for writes and size changes.
The file contents must represent a valid ICC profile.
The ICC profile version must be 2 or 4, it must be a 3 channel profile
and the class must be 'input', 'output', 'abstract' or 'display'.
Violating these requirements will not result in a protocol error but
raise the zcr_color_space_creator_v1.error event.
See the zcr_color_space_v1 and zcr_color_space_creator_v1 interface for
more details about the created object.
See the specification from International Color Consortium for more
details about ICC profiles, also known as ISO 15076-1:2010.
zcr_color_manager_v1
request create_color_space_from_params(
id: new_id<zcr_color_space_creator_v1>,
eotf: uint<eotf_names>,
primary_r_x: uint,
primary_r_y: uint,
primary_g_x: uint,
primary_g_y: uint,
primary_b_x: uint,
primary_b_y: uint,
white_point_x: uint,
white_point_y: uint,
)- eotf — EOTF
- primary_r_x — red primary X * 10000
- primary_r_y — red primary Y * 10000
- primary_g_x — green primary X * 10000
- primary_g_y — green primary Y * 10000
- primary_b_x — blue primary X * 10000
- primary_b_y — blue primary Y * 10000
- white_point_x — white point X * 10000
- white_point_y — white point Y * 10000
create a color space object from parameters
[Deprecated] Create a color space object from parameters. This request returns
a zcr_color_space_creator_v1 object which either returns an error
or the successfully created zcr_color_space_v1 object.
EOTF must not be unknown. Otherwise, or if a given EOTF is not listed
in the enumeration, the protocol error bad_enum is raised.
The white point must be inside the triangle created by the red, green
and blue primaries. Otherwise the bad_param protocol error is raised.
All the chromaticity values are multiplied by 10000 to produce the
integers carried by the protocol.
See the zcr_color_space_v1 and zcr_color_space_creator_v1 interface for
more details about the created object. Use create_color_space_from_complete_params
instead.
zcr_color_manager_v1
enum matrix_names {
unknown = 0,
rgb = 1,
bt709 = 2,
bt2020_ncl = 3,
bt2020_cl = 4,
fcc = 5,
smpte170m = 6,
smpte240m = 7,
ydzdx = 8,
bt470bg = 9,
gbr = 10,
ycocg = 11,
}- unknown — Unknown range
- rgb — RGB matrix
- bt709 — BT709 matrix
- bt2020_ncl — BT2020_NCL matrix
- bt2020_cl — BT2020_CL matrix
- fcc — FCC matrix
- smpte170m — SMPTE170M matrix
- smpte240m — SMPTE240M matrix
- ydzdx — YDZDX matrix
Available since version 5
- bt470bg — BT470BG matrix
Available since version 5
- gbr — GBR matrix
Available since version 5
- ycocg — YCOCG matrix
Available since version 5
For specifying color matrices
Names that describe typical ColorSpace Matrix IDs
zcr_color_manager_v1
enum range_names {
unknown = 0,
limited = 1,
full = 2,
derived = 3,
}- unknown — Unknown range
- limited — Limited RGB color range (values from 16-235 for 8-bit)
- full — Full RGB color range (values from 0 to 255 for 8-bit)
- derived — Range is defined by EOTF/MatrixID
For specifying RGB ranges
Names that describe typical RGB value ranges.
zcr_color_manager_v1
request create_color_space_from_complete_params(
id: new_id<zcr_color_space_creator_v1>,
eotf: uint<eotf_names>,
matrix: uint<matrix_names>,
range: uint<range_names>,
primary_r_x: uint,
primary_r_y: uint,
primary_g_x: uint,
primary_g_y: uint,
primary_b_x: uint,
primary_b_y: uint,
white_point_x: uint,
white_point_y: uint,
)Available since version 3
- eotf — EOTF
- matrix — Color matrix
- range — Color range
- primary_r_x — red primary X * 10000
- primary_r_y — red primary Y * 10000
- primary_g_x — green primary X * 10000
- primary_g_y — green primary Y * 10000
- primary_b_x — blue primary X * 10000
- primary_b_y — blue primary Y * 10000
- white_point_x — white point X * 10000
- white_point_y — white point Y * 10000
create a color space object from parameters
Create a color space object from parameters. This request returns
a zcr_color_space_creator_v1 object which either returns an error
or the successfully created zcr_color_space_v1 object.
EOTF must not be unknown. Otherwise, or if a given EOTF is not listed
in the enumeration, the protocol error bad_enum is raised.
The white point must be inside the triangle created by the red, green
and blue primaries. Otherwise the bad_param protocol error is raised.
All the chromaticity values are multiplied by 10000 to produce the
integers carried by the protocol.
This request additionally includes matrix and range information.
See the zcr_color_space_v1 and zcr_color_space_creator_v1 interface for
more details about the created object.
Version 4
zcr_color_management_output_v1
event extended_dynamic_range(
value: uint,
)output extended dynamic range
This is both an initial event and sent whenever the value changed.
When the value changed, this event is followed by one wl_output.done
event common to output events across all extensions.
The extended dynamic range value describes how much dynamic range is
available relative to the SDR maximum white. EDR value is proportional
to luminance, and the luminance of black is used as the zero level.
A value of 1.0 means that the the display can not display
anything brighter than SDR maximum white. A value of 3.0 means that the
SDR maximum white is at one third of the highest luminance the display
can produce.
The absolute luminance of the SDR maximum white depends on the monitor
capabilities, the viewing conditions and the viewer personal
preferences. A such, it cannot be given a single value in cd/m².
Compositors using HDR video modes should allow users to control the the
SDR maximum white level which the output EDR value is calculated from.
The SDR maximum white is a relative reference luminance that allows
to tone-map content from different dynamic ranges into a single common
dynamic range for display.
The EDR value is multiplied by 1000 to produce the integer value
carried by the protocol.
Version 4
zcr_color_management_surface_v1
enum render_intent {
perceptual = 0,
relative = 1,
saturation = 2,
absolute = 3,
relative_bpc = 4,
}- perceptual — perceptual
- relative — media-relative colorimetric
- saturation — saturation
- absolute — ICC-absolute colorimetric
- relative_bpc — media-relative colorimetric + black point compensation
render intent
Rendering intent allow the client to hint at how to perform color space
transformations.
See the ICC specification for more details about rendering intent.
zcr_color_management_surface_v1
enum alpha_mode {
straight = 0,
premultiplied = 1,
}- straight — alpha is independent from color channels
- premultiplied — alpha is pre-multiplied into color channels
alpha mode
Specifies whether alpha is pre-multiplied into color channels or not.
If pre-multiplied, the linear alpha value is already multiplied with the
(non-linear) color channel code values in the color channels.
zcr_color_management_surface_v1
request set_alpha_mode(
alpha_mode: uint<alpha_mode>,
)set the surface alpha mode
Assuming an alpha channel exists, it is always linear. The alpha mode
determines whether the color channels include alpha pre-multiplied or
not. Using straight alpha might have performance benefits.
Alpha mode is double buffered, and will be applied at the time
wl_surface.commit of the corresponding wl_surface is called.
By default, a surface is assumed to have pre-multiplied alpha.
zcr_color_management_surface_v1
request set_extended_dynamic_range(
value: uint,
)set the content extended dynamic range
Set the extended dynamic range (EDR) value for the underlying surface.
The EDR value is double buffered, and will be applied at the time
wl_surface.commit of the corresponding wl_surface is called.
The EDR value describes how much dynamic range is encoded relative to
the SDR maximum white. EDR value is proportional to luminance, using
the luminance of black as the zero level. A value of 1.0 means that the
SDR maximum white is the highest possible luminance of the surface. A
value of 3.0 means that the SDR maximum white is one third of the
highest possible luminance of the surface.
The color space attached to the surface can make the code values in the
buffer non-linear in regards to the luminance. The code value to produce
a third of the luminance of the biggest code value therefore might not
be one third of the biggest code value.
For the definition of the SDR maximum white on an output, see
zcr_color_management_output_v1.extended_dynamic_range. Content
producers are free to choose their SDR maximum white level. How it
shall be displayed depends on the monitor capabilities and the output
EDR value.
By default the EDR value is 1.0. The compositor will tone map the image
to match the EDR of each output the surface is shown on. The aim for
the EDR-EDR mapping is to produce a relative luminance mapping that
looks equally good regardless of the viewing conditions and the monitor
capabilities, assuming the output EDR value was tuned to the output
capabilities and the viewing environment. There might be performance
and image quality benefits from providing content readily tone mapped to
the EDR value of the output the surface is shown on.
The EDR value is multiplied by 1000 to produce the integer value
carried by the protocol.
zcr_color_management_surface_v1
request set_color_space(
color_space: object<zcr_color_space_v1>,
render_intent: uint<render_intent>,
)- render_intent — render intent
set the surface color space
Set the color space of the underlying surface. The color space and
render intent are double buffered, and will be applied
at the time wl_surface.commit of the corresponding wl_surface is called.
The render intent gives the compositor a hint what to optimize for in
color space transformations.
By default, a surface is assumed to have the sRGB color space and an
arbitrary render intent.
If the color space of the surface matches the color space of an output
it is shown on the performance and color accuracy might improve. To find
those color spaces the client can listen to the preferred_color_space or
the wl_surface.enter/leave events. This improvement may require using
the color space object created by
zcr_color_management_output_v1.get_color_space.
Version 4
zcr_color_space_creator_v1
enum creation_error {
malformed_icc = 0x1,
bad_icc = 0x2,
bad_primaries = 0x4,
bad_whitepoint = 0x8,
}This is a bitfield
- malformed_icc — malformed ICC profile
- bad_icc — ICC profile does not meet requirements
- bad_primaries — bad primaries
- bad_whitepoint — bad whitepoint
color space creation error
Bitmask of errors which occured while trying to create a color space
Version 4
- error
- get_information — get information about the color space
- icc_file — ICC profile describing the color space
- names — well-known names of a color space
- params — RGB primaries along with whitepoint defining color space
- done — end of color space information
- destroy — destroy the color space
- complete_names — well-known names of a color space
- complete_params — RGB primaries along with whitepoint defining color space
zcr_color_space_v1
request get_information()
get information about the color space
As a reply to this request, the compositor will send all available
information events describing this color space object and finally
the 'done' event. Other extensions may define more events to be sent
before 'done'.
This request is allowed only on zcr_color_space_v1 objects where the
message that created the object specifies that get_information is
allowed. Otherwise protocol error no_information is raised.
Every get_information request on the same object will always return the
exact same data.
See zcr_color_management_output_v1.get_color_space and
zcr_color_space_creator_v1.created.
zcr_color_space_v1
event icc_file(
icc: fd,
icc_size: uint,
)- icc — ICC profile file descriptor
- icc_size — ICC profile size, in bytes
ICC profile describing the color space
This event may be sent only as a response to
zcr_color_space_v1.get_information.
The icc argument provides a file descriptor to the client which can be
memory-mapped to provide the ICC profile describing the color space.
The fd must be mapped with MAP_PRIVATE and read-only by the client.
Compositors should send this event always when information is requested.
ICC profiles provide the common foundation which all color managed
clients may rely on.
zcr_color_space_v1
event params(
eotf: uint<zcr_color_manager_v1.eotf_names>,
primary_r_x: uint,
primary_r_y: uint,
primary_g_x: uint,
primary_g_y: uint,
primary_b_x: uint,
primary_b_y: uint,
white_point_x: uint,
white_point_y: uint,
)- eotf — EOTF
- primary_r_x — red primary X * 10000
- primary_r_y — red primary Y * 10000
- primary_g_x — green primary X * 10000
- primary_g_y — green primary Y * 10000
- primary_b_x — blue primary X * 10000
- primary_b_y — blue primary Y * 10000
- white_point_x — white point X * 10000
- white_point_y — white point Y * 10000
RGB primaries along with whitepoint defining color space
[Deprecated] This event may be sent only as a response to
zcr_color_space_v1.get_information.
The RGB primary value arguments along with the whitepoint value arguments
and eotf can be used to define an arbitrary or custom color space.
The eotf enum contains well known names of that property, but the compositor
should not assume that all clients will understand those names. Use
complete_params instead.
zcr_color_space_v1
event complete_names(
eotf: uint<zcr_color_manager_v1.eotf_names>,
chromaticity: uint<zcr_color_manager_v1.chromaticity_names>,
whitepoint: uint<zcr_color_manager_v1.whitepoint_names>,
matrix: uint<zcr_color_manager_v1.matrix_names>,
range: uint<zcr_color_manager_v1.range_names>,
)Available since version 3
- eotf — EOTF
- chromaticity — chromaticity
- whitepoint — whitepoint
- matrix — Color matrix
- range — Color range
well-known names of a color space
This event may be sent only as a response to
zcr_color_space_v1.get_information.
EOTF, chromaticity, matrix, range and whitepoint contain well-known names of those
properties if available and unknown otherwise.
Compositors should not assume that all clients can understand these
names. The names are provided for client convenience. If a client
understands the name triplet, it may ignore other information about
the color space, the ICC profile for example.
zcr_color_space_v1
event complete_params(
eotf: uint<zcr_color_manager_v1.eotf_names>,
matrix: uint<zcr_color_manager_v1.matrix_names>,
range: uint<zcr_color_manager_v1.range_names>,
primary_r_x: uint,
primary_r_y: uint,
primary_g_x: uint,
primary_g_y: uint,
primary_b_x: uint,
primary_b_y: uint,
white_point_x: uint,
white_point_y: uint,
)Available since version 3
- eotf — EOTF
- matrix — Color matrix
- range — Color range
- primary_r_x — red primary X * 10000
- primary_r_y — red primary Y * 10000
- primary_g_x — green primary X * 10000
- primary_g_y — green primary Y * 10000
- primary_b_x — blue primary X * 10000
- primary_b_y — blue primary Y * 10000
- white_point_x — white point X * 10000
- white_point_y — white point Y * 10000
RGB primaries along with whitepoint defining color space
This event may be sent only as a response to
zcr_color_space_v1.get_information.
The RGB primary value arguments along with the whitepoint value arguments
and eotf can be used to define an arbitrary or custom color space.
The eotf enum contains well known names of that property, but the compositor
should not assume that all clients will understand those names.
Copyright
Copyright © 2008-2011 Kristian Høgsberg
Copyright © 2010-2011 Intel Corporation
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that\n 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.
Version 2
Compositor Support
Version 2cosmic 1.0.0
gamescope 3.15.14
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
muffin 6.7.4
niri 26.04
phoc 0.55
treeland 0.8.0
wl_drm
enum error {
authenticate_fail = 0,
invalid_format = 1,
invalid_name = 2,
}wl_drm
enum format {
c8 = 0x20203843,
rgb332 = 0x38424752,
bgr233 = 0x38524742,
xrgb4444 = 0x32315258,
xbgr4444 = 0x32314258,
rgbx4444 = 0x32315852,
bgrx4444 = 0x32315842,
argb4444 = 0x32315241,
abgr4444 = 0x32314241,
rgba4444 = 0x32314152,
bgra4444 = 0x32314142,
xrgb1555 = 0x35315258,
xbgr1555 = 0x35314258,
rgbx5551 = 0x35315852,
bgrx5551 = 0x35315842,
argb1555 = 0x35315241,
abgr1555 = 0x35314241,
rgba5551 = 0x35314152,
bgra5551 = 0x35314142,
rgb565 = 0x36314752,
bgr565 = 0x36314742,
rgb888 = 0x34324752,
bgr888 = 0x34324742,
xrgb8888 = 0x34325258,
xbgr8888 = 0x34324258,
rgbx8888 = 0x34325852,
bgrx8888 = 0x34325842,
argb8888 = 0x34325241,
abgr8888 = 0x34324241,
rgba8888 = 0x34324152,
bgra8888 = 0x34324142,
xrgb2101010 = 0x30335258,
xbgr2101010 = 0x30334258,
rgbx1010102 = 0x30335852,
bgrx1010102 = 0x30335842,
argb2101010 = 0x30335241,
abgr2101010 = 0x30334241,
rgba1010102 = 0x30334152,
bgra1010102 = 0x30334142,
yuyv = 0x56595559,
yvyu = 0x55595659,
uyvy = 0x59565955,
vyuy = 0x59555956,
ayuv = 0x56555941,
xyuv8888 = 0x56555958,
nv12 = 0x3231564e,
nv21 = 0x3132564e,
nv16 = 0x3631564e,
nv61 = 0x3136564e,
yuv410 = 0x39565559,
yvu410 = 0x39555659,
yuv411 = 0x31315559,
yvu411 = 0x31315659,
yuv420 = 0x32315559,
yvu420 = 0x32315659,
yuv422 = 0x36315559,
yvu422 = 0x36315659,
yuv444 = 0x34325559,
yvu444 = 0x34325659,
abgr16f = 0x48344241,
xbgr16f = 0x48344258,
}wl_drm
request create_planar_buffer(
id: new_id<wl_buffer>,
name: uint,
width: int,
height: int,
format: uint,
offset0: int,
stride0: int,
offset1: int,
stride1: int,
offset2: int,
stride2: int,
)wl_drm
enum capability {
prime = 1,
}Available since version 2
- prime — wl_drm prime available
wl_drm capability bitmask
Bitmask of capabilities.
wl_drm
request create_prime_buffer(
id: new_id<wl_buffer>,
name: fd,
width: int,
height: int,
format: uint,
offset0: int,
stride0: int,
offset1: int,
stride1: int,
offset2: int,
stride2: int,
)Available since version 2
Version 5
Compositor Support
gtk specific extensions
gtk_shell is a protocol extension providing additional features for
clients implementing it.
Version 5
gtk_surface1
request set_dbus_properties(
application_id: nullable string,
app_menu_path: nullable string,
menubar_path: nullable string,
window_object_path: nullable string,
application_object_path: nullable string,
unique_bus_name: nullable string,
)gtk_surface1
enum state {
tiled = 1,
tiled_top = 2,
tiled_right = 3,
tiled_bottom = 4,
tiled_left = 5,
}- tiled_top
Available since version 2
- tiled_right
Available since version 2
- tiled_bottom
Available since version 2
- tiled_left
Available since version 2
gtk_surface1
enum edge_constraint {
resizable_top = 1,
resizable_right = 2,
resizable_bottom = 3,
resizable_left = 4,
}Available since version 2
gtk_surface1
enum gesture {
double_click = 1,
right_click = 2,
middle_click = 3,
}Available since version 5
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
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.
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 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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Version 1
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 zwp_input_method_v2 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.
zwp_input_method_v2
event activate()
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 enable, disable,
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. In addition, it marks the
zwp_input_method_v2 object as active, and makes any existing
zwp_input_popup_surface_v2 objects visible.
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 zwp_input_method_v2.done event, and stay valid until changed.
zwp_input_method_v2
event surrounding_text(
text: string,
cursor: uint,
anchor: uint,
)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 zwp_input_method_v2.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.
zwp_input_method_v2
event text_change_cause(
cause: uint<zwp_text_input_v3.change_cause>,
)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 zwp_input_method_v2.done
event.
The initial value of cause is input_method.
zwp_input_method_v2
event done()
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.
zwp_input_method_v2
request commit_string(
text: string,
)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 event are double-buffered. They must be applied
and reset to initial on the next zwp_text_input_v3.commit request.
The initial value of text is an empty string.
zwp_input_method_v2
request set_preedit_string(
text: string,
cursor_begin: int,
cursor_end: int,
)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 event are double-buffered. They must be applied on
the next zwp_input_method_v2.commit event.
The initial value of text is an empty string. The initial value of
cursor_begin, and cursor_end are both 0.
zwp_input_method_v2
request delete_surrounding_text(
before_length: uint,
after_length: uint,
)delete text
Remove the surrounding text.
before_length and after_length are the number of bytes before and after
the current cursor index (excluding the preedit text) to delete.
If any preedit text is present, it is replaced with the cursor for the
purpose of this event. In effect before_length is counted from the
beginning of preedit text, and after_length from its end (see commit
event sequence).
Values set with this event are double-buffered. They must be applied
and reset to initial on the next zwp_input_method_v2.commit request.
The initial values of both before_length and after_length are 0.
zwp_input_method_v2
request commit(
serial: uint,
)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:
Replace existing preedit string with the cursor.
Delete requested surrounding text.
Insert commit string with the cursor at its end.
Calculate surrounding text to send.
Insert new preedit text in cursor position.
Place cursor inside preedit text.
The serial number reflects the last state of the zwp_input_method_v2
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 zwp_input_method_v2 object.
create popup surface
Creates a new zwp_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.
zwp_input_method_v2
request grab_keyboard(
keyboard: new_id<zwp_input_method_keyboard_grab_v2>,
)grab hardware keyboard
Allow an input method to receive hardware keyboard input and process
key events to generate text events (with pre-edit) over the wire. This
allows input methods which compose multiple key events for inputting
text like it is done for CJK languages.
The compositor should send all keyboard events on the seat to the grab
holder via the returned wl_keyboard object. Nevertheless, the
compositor may decide not to forward any particular event. The
compositor must not further process any event after it has been
forwarded to the grab holder.
Releasing the resulting wl_keyboard object releases the grab.
zwp_input_method_v2
event unavailable()
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.
Version 1
popup surface
This interface marks a surface as a popup for interacting with an input
method.
The compositor should place it near the active text input area. It must
be visible if and only if the input method is in the active state.
The client must not destroy the underlying wl_surface while the
zwp_input_popup_surface_v2 object exists.
set text input area position
Notify about the position of the area of the text input expressed as a
rectangle in surface local coordinates.
This is a hint to the input method telling it the relative position of
the text being entered.
Version 1
zwp_input_method_keyboard_grab_v2
event keymap(
format: uint<wl_keyboard.keymap_format>,
fd: fd,
size: uint,
)- format — keymap format
- fd — keymap file descriptor
- size — keymap size, in bytes
keyboard mapping
This event provides a file descriptor to the client which can be
memory-mapped to provide a keyboard mapping description.
zwp_input_method_keyboard_grab_v2
event key(
serial: uint,
time: uint,
key: uint,
state: uint<wl_keyboard.key_state>,
)- serial — serial number of the key event
- time — timestamp with millisecond granularity
- key — key that produced the event
- state — physical state of the key
key event
A key was pressed or released.
The time argument is a timestamp with millisecond granularity, with an
undefined base.
zwp_input_method_keyboard_grab_v2
event modifiers(
serial: uint,
mods_depressed: uint,
mods_latched: uint,
mods_locked: uint,
group: uint,
)- serial — serial number of the modifiers event
- mods_depressed — depressed modifiers
- mods_latched — latched modifiers
- mods_locked — locked modifiers
- group — keyboard layout
modifier and group state
Notifies clients that the modifier and/or group state has changed, and
it should update its local state.
zwp_input_method_keyboard_grab_v2
event repeat_info(
rate: int,
delay: int,
)- rate — the rate of repeating keys in characters per second
- delay — delay in milliseconds since key down until repeating starts
repeat rate and delay
Informs the client about the keyboard's repeat rate and delay.
This event is sent as soon as the zwp_input_method_keyboard_grab_v2
object has been created, and is guaranteed to be received by the
client before any key press event.
Negative values for either rate or delay are illegal. A rate of zero
will disable any repeating (regardless of the value of delay).
This event can be sent later on as well with a new value if necessary,
so clients should continue listening for the event past the creation
of zwp_input_method_keyboard_grab_v2.
Version 1
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
mir 2.26
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
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.
Copyright
Copyright © 2023 Canonical Limited
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.
Version 1
Compositor Support
create surface archetypes that are recognised by the desktop
Clients can use this interface to assign an archetype to wl_surfaces.
An archetype is like a wl_surface role: a surface may have at most one
archetype, but unlike a wl_surface role a client may assign a new archetype
to a surface which already has one. This will remove the old archetype and
apply the new one atomically.
The archetype of a wl_surface influences the window-management policies
applied to it.
All archetype state is double-buffered; changing a surface archetype or
updates to any archetype state are not applied until the wl_surface is
committed.
Typically, archetype state will be used to augments xdg_toplevel state. If a
client intends to use an archetype, it SHOULD assign the surface an initial
archetype during the initial commit without a buffer attached (see xdg_surface).
Any events sent to an archetype object are latched to and extend the
xdg_surface.configure event. Any such events should be treated as a part of
an atomic set of configuration changes (including any xdg_toplevel events)
with the xdg_surface.configure event committing the accumulated state and
requiring a xdg_surface.ack_configure call, as normal.
Changing archetype follows a similar sequence to the initial xdg_surface
commit. First, a new archetype must be committed. This must be the only state
committed in the wl_surface.commit request. The compositor will respond with
any changes to the surface state prompted by the change of archetype followed
by an xdg_surface.configure event. The client must ack the configure event
(as normal) and the subsequent wl_surface.commit will cause the new
archetype to be fully applied.
There are some wl_surface roles that conflict with the archetypes described
here. Attempting to set both an archetypes and such roles on a surface is a
protocol error. In particular, wl_subsurface, wl_cursor or xdg_popup may
not be combined with an archetype.
mir_shell_v1
request get_regular_surface(
id: new_id<mir_regular_surface_v1>,
surface: object<wl_surface>,
)assign the mir_regular_surface_v1 archetype
Create a mir_regular_surface_v1 archetype for the given surface. This assigns
the archetype of regular_surface to the wl_surface, or raises a protocol error
if another archetype is already assigned and the transition is disallowed.
The previous archetype's role object becomes inert; the client should destroy
the previous archetype role object. Any further calls to the previous archetype
role object are a protocol error.
mir_shell_v1
request get_floating_regular_surface(
id: new_id<mir_floating_regular_surface_v1>,
surface: object<wl_surface>,
)assign the mir_floating_regular_surface_v1 archetype
Create a mir_floating_regular_surface_v1 archetype for the given surface. This assigns
the archetype of floating_regular to the wl_surface, or raises a protocol error
if another archetype is already assigned and the transition is disallowed.
The previous archetype's role object becomes inert; the client should destroy
the previous archetype role object. Any further calls to the previous archetype
role object are a protocol error.
A floating regular surface is "always on top" of other application windows and will
not be docked.
mir_shell_v1
request get_dialog_surface(
id: new_id<mir_dialog_surface_v1>,
surface: object<wl_surface>,
)assign the mir_dialog_surface_v1 archetype
Create a mir_dialog_surface_v1 archetype for the given surface. This assigns
the archetype of dialog_surface to the wl_surface, or raises a protocol error
if another archetype is already assigned and the transition is disallowed.
The previous archetype's role object becomes inert; the client should destroy
the previous archetype role object. Any further calls to the previous archetype
role object are a protocol error.
A dialog is usually used to communicate information that must be explicitly
acknowledged or responded to (for example, to report an error), or to get
specific information about something requested in a parent window (for example,
a Print dialog) or from a shell function (for example, to confirm shutdown).
A dialog should have a parent whenever relevant. It may, however, be parentless.
If a dialog has a parent, it is modal to the parent and any satellites the parent has.
This means:
(1) A user should be able to move, resize, or hide an open dialog’s parent, but not
close it or interact with its contents; and move, resize, or close the parent’s
satellites if any, but not interact with their contents.
(2) Whenever the parent is minimized or otherwise hidden, the dialog should be minimized
or hidden too.
(3) Any attempt to give input focus to the parent should focus the dialog instead.
Therefore, the dialog and all of its ancestors should be presented as a single entity
in any window switcher.
Partly because of that last behavior, a window should only ever have one dialog child at
a time. If an app tries to open a second dialog child, The compositor should close the
previous one first.
mir_shell_v1
request get_satellite_surface(
id: new_id<mir_satellite_surface_v1>,
surface: object<wl_surface>,
positioner: object<mir_positioner_v1>,
)assign the mir_satellite_surface_v1 archetype
Create a mir_satellite_surface_v1 archetype for the given surface. This assigns
the archetype of satellite_surface to the wl_surface, or raises a protocol error
if another archetype is already assigned and the transition is disallowed.
The previous archetype's role object becomes inert; the client should destroy
the previous archetype role object. Any further calls to the previous archetype
role object are a protocol error.
A satellite is an accessory to a regular, floating regular, or dialog window. It
always has a parent window, and typically it provides easy access to functions in
its parent: for example, a toolbox, formatting palette, or Find/Change window.
To reduce clutter when a satellite’s parent is not being used, a satellite should be
present on screen only when any of its parents is active (for example, when a dialog
or another satellite of its parent has input focus). Otherwise, subject to a delay to
allow reparenting, it should not be present — not merely invisible or minimized, and
not closed, but not present until its parent becomes active again (or an active window
becomes its parent).
To avoid flicker from briefly-appearing dialogs, whenever a satellite’s parent has a
child dialog, the satellite should remain present. But like the parent window itself,
it should not receive input as long as the dialog is open.
mir_shell_v1
enum error {
archetype = 0,
}- archetype — wl_surface has another archetype that prevents this assignment
mir_shell_v1
request destroy()
Destructor
destroy the mir_shell object
This request indicates that the client will not use the mir_shell
object any more. Objects that have been created through this instance
are not affected.
Version 1
- destroy — destroy the regular surface archetype
Mir metadata interface
An interface that may be implemented by a wl_surface, for surfaces that
are designed to be rendered in a desktop-like environment.
mir_regular_surface_v1
request destroy()
Destructor
destroy the regular surface archetype
This request destroys the mir surface archetype and disassociates it from the surface.
Version 1
- destroy — destroy the floating_regular surface archetype
Mir metadata interface
An interface that may be implemented by a wl_surface, for surfaces that
are designed to be rendered in a desktop-like environment.
mir_floating_regular_surface_v1
request destroy()
Destructor
destroy the floating_regular surface archetype
This request destroys the mir surface archetype and disassociates it from the surface.
Version 1
- destroy — destroy the dialog_surface archetype
Mir metadata interface
An interface that may be implemented by a wl_surface, for surfaces that
are designed to be rendered in a desktop-like environment.
mir_dialog_surface_v1
request destroy()
Destructor
destroy the dialog_surface archetype
This request destroys the mir surface archetype and disassociates it from the surface.
Version 1
- reposition — recalculate the satellite's location
- repositioned — signal the completion of a repositioned request
- destroy — destroy the satellite_surface archetype
Mir metadata interface
An interface that may be implemented by a wl_surface, for surfaces that
are designed to be rendered in a desktop-like environment.
mir_satellite_surface_v1
request reposition(
positioner: object<mir_positioner_v1>,
token: uint,
)- token — reposition request token
recalculate the satellite's location
Reposition an already-mapped satellite. The satellite will be placed given the
details in the passed mir_positioner object, and a
mir_satellite_surface_v1.repositioned followed by wl_surface.configure will be
emitted in response. Any parameters set by the previous positioner will be discarded.
The passed token will be sent in the corresponding
xdg_satellite.repositioned event. The new satellite position will not take
effect until the corresponding configure event is acknowledged by the
client. See xdg_satellite.repositioned for details. The token itself is
opaque, and has no other special meaning.
If multiple reposition requests are sent, the compositor may skip all
but the last one.
If the satellite is repositioned in response to a configure event for its
parent, the client should send an mir_positioner.set_parent_configure
and possibly an mir_positioner.set_parent_size request to allow the
compositor to properly constrain the satellite.
If the satellite is repositioned together with a parent that is being
resized, but not in response to a configure event, the client should
send an mir_positioner.set_parent_size request.
mir_satellite_surface_v1
event repositioned(
token: uint,
)- token — reposition request token
signal the completion of a repositioned request
The repositioned event is sent as part of a satellite configuration
sequence, together with mir_satellite_surface_v1.configure and lastly
wl_surface.configure to notify the completion of a reposition request.
The repositioned event is to notify about the completion of a
mir_satellite_surface_v1.reposition request. The token argument is the token passed
in the xdg_satellite.reposition request.
Immediately after this event is emitted, mir_satellite_surface_v1.configure and
wl_surface.configure will be sent with the updated size and position,
as well as a new configure serial.
The client should optionally update the content of the satellite, but must
acknowledge the new satellite configuration for the new position to take
effect. See mir_satellite_surface_v1.ack_configure for details.
mir_satellite_surface_v1
request destroy()
Destructor
destroy the satellite_surface archetype
This request destroys the mir surface archetype and disassociates it from the surface.
Version 1
child surface positioner
The mir_positioner provides a collection of rules for the placement of a
child surface relative to a parent surface. Rules can be defined to ensure
the child surface remains within the visible area's borders, and to
specify how the child surface 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 child surface must intersect with or
be at least partially adjacent to its parent surface.
See the various requests for details about possible rules.
At the time of the request, the compositor makes a copy of the rules
specified by the mir_positioner. Thus, after the request is complete the
mir_positioner object can be destroyed or reused; further changes to the
object will have no effect on previous usages.
For an mir_positioner object to be considered complete, it must have a
non-zero size set by set_size, and a non-zero anchor rectangle set by
set_anchor_rect. Passing an incomplete mir_positioner object when
positioning a surface raises an invalid_positioner error.
mir_positioner_v1
request destroy()
Destructor
destroy the mir_positioner object
Notify the compositor that the mir_positioner will no longer be used.
mir_positioner_v1
request set_size(
width: int,
height: int,
)- width — width of positioned rectangle
- height — height of positioned rectangle
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 a zero or negative size is set the invalid_input error is raised.
mir_positioner_v1
request set_anchor_rect(
x: int,
y: int,
width: int,
height: int,
)- x — x position of anchor rectangle
- y — y position of anchor rectangle
- width — width of anchor rectangle
- height — height of anchor rectangle
set the anchor rectangle within the parent surface
Specify the anchor rectangle within the parent surface that the child
surface will be placed relative to. The rectangle is relative to the
window geometry as defined by xdg_surface.set_window_geometry of the
parent surface.
When the mir_positioner object is used to position a child surface, the
anchor rectangle may not extend outside the window geometry of the
positioned child's parent surface.
If a negative size is set the invalid_input error is raised.
mir_positioner_v1
enum anchor {
none = 0,
top = 1,
bottom = 2,
left = 3,
right = 4,
top_left = 5,
bottom_left = 6,
top_right = 7,
bottom_right = 8,
}mir_positioner_v1
request set_anchor(
anchor: uint<anchor>,
)set anchor rectangle anchor
Defines the anchor point for the anchor rectangle. The specified anchor
is used derive an anchor point that the child 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.
mir_positioner_v1
enum gravity {
none = 0,
top = 1,
bottom = 2,
left = 3,
right = 4,
top_left = 5,
bottom_left = 6,
top_right = 7,
bottom_right = 8,
}mir_positioner_v1
request set_gravity(
gravity: uint<gravity>,
)- gravity — gravity direction
set child surface gravity
Defines in what direction a surface should be positioned, relative to
the anchor point of the parent surface. If a corner gravity is
specified (e.g. 'bottom_right' or 'top_left'), then the child 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.
mir_positioner_v1
enum constraint_adjustment {
none = 0,
slide_x = 1,
slide_y = 2,
flip_x = 4,
flip_y = 8,
resize_x = 16,
resize_y = 32,
}This is a bitfield
- none
don't move the child 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.
- slide_x
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.
- slide_y
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.
- flip_x
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'.
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_x adjustment will be the one before the
adjustment.
- flip_y
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.
- resize_x
horizontally resize the surface
Resize the surface horizontally so that it is completely
unconstrained.
- resize_y
vertically resize the surface
Resize the surface vertically so that it is completely unconstrained.
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.
mir_positioner_v1
request set_constraint_adjustment(
constraint_adjustment: uint,
)- constraint_adjustment — bit mask of constraint adjustments
set the adjustment to be done when constrained
Specify how the window 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.
mir_positioner_v1
request set_offset(
x: int,
y: int,
)- x — surface position x offset
- y — surface position y offset
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.
Copyright
Copyright 2021 The Chromium Authors
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.
Version 1
overlay hint prioritization
The global interface exposing overlay delegated prioritization
hint capabilities is used to instantiate an interface extension for a
wl_surface object. This extended interface will then allow
delegated overlay prioritization of the surface.
overlay_prioritizer
request destroy()
Destructor
Destroy the overlay prioritizer.
Informs the server that the client will not be using this
protocol object anymore. This does not affect any other objects,
prioritizer objects included.
overlay_prioritizer
enum error {
overlay_hinted_surface_exists = 0,
}- overlay_hinted_surface_exists — the surface already has a prioritizer object
associated
Version 1
delegate overlay prioritization hint of a wl_surface
An additional interface to a wl_surface object, which allows the
client to specify hints for the overlay prioritization of the surface.
overlay_prioritized_surface
enum overlay_priority {
none = 0,
regular = 1,
preferred_low_latency_canvas = 2,
required_hardware_protection = 3,
}- none — overlay promotion is not necessary for this surface
- regular — surface could be considered as a candidate for promotion
- preferred_low_latency_canvas — the surface is a low latency canvas that works better if promoted to overlay
- required_hardware_protection — the surface contains protected content and requires to be promoted to overlay
hints for overlay prioritization
Copyright
Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
wl_eglstream
enum error {
bad_alloc = 0,
bad_handle = 1,
bad_attribs = 2,
bad_address = 3,
}- bad_alloc — Bad allocation error
- bad_handle — Bad handle error
- bad_attribs — Bad attributes error
- bad_address — Bad IP address error
wl_eglstream
enum handle_type {
fd = 0,
inet = 1,
socket = 2,
}- fd — File descriptor
- inet — Inet connection
- socket — Unix socket
Stream handle type
fd: The given handle represents a file descriptor, and the
EGLStream connection must be done as described in
EGL_KHR_stream_cross_process_fd
inet: The EGLStream connection must be done using an inet address
and port as described in EGL_NV_stream_socket. The given
handle can be ignored, but both inet address and port must
be given as attributes.
socket: The given handle represents a unix socket, and the EGLStream
connection must be done as described in EGL_NV_stream_socket.
wl_eglstream
enum attrib {
inet_addr = 0,
inet_port = 1,
y_inverted = 2,
}- inet_addr — Inet IPv4 address
- inet_port — IP port
- y_inverted — Image Y-inversion bit
Stream creation attributes
inet_addr: The given attribute encodes an IPv4 address of a client
socket. Both IPv4 address and port must be set at the same
time.
inet_port: The given attribute encodes a port of a client socket.
Both IPv4 address and port must be set at the same time.
y_inverted: The given attribute encodes the default value for a
stream's image inversion relative to wayland protocol
convention. Vulkan apps will be set to 'true', while
OpenGL apps will be set to 'false'.
NOTE: EGL_NV_stream_origin is the authorative source of
truth regarding a stream's frame orientation and should be
queried for an accurate value. The given attribute is a
'best guess' fallback mechanism which should only be used
when a query to EGL_NV_stream_origin fails.
Version 1
Compositor Support
wl_eglstream_display
enum cap {
stream_fd = 1,
stream_inet = 2,
stream_socket = 4,
}- stream_fd — Stream connection with FD
- stream_inet — Stream inet connection
- stream_socket — Stream unix connection
wl_eglstream_display capability codes
This enum values should be used as bit masks.
stream_fd: The server supports EGLStream connections as described
in EGL_KHR_stream_cross_process_fd
stream_inet: The server supports EGLStream inet connections as
described in EGL_NV_stream_socket.
stream_socket: The server supports EGLStream unix socket connections
as described in EGL_NV_stream_socket.
wl_eglstream_display
event caps(
caps: int,
)Server capabilities event
The capabilities event is sent out at wl_eglstream_display binding
time. It allows the server to advertise what features it supports so
clients may know what is safe to be used.
wl_eglstream_display
event swapinterval_override(
swapinterval: int,
stream: object<wl_buffer>,
)- swapinterval — Server swap interval override value
- stream — wl_buffer corresponding to an EGLStream
Server Swap interval override event
The swapinterval_override event is sent out whenever a client requests
a swapinterval setting through swap_interval() and there is an override
in place that will make such request to be ignored.
The swapinterval_override event will provide the override value so
that the client is made aware of it.
wl_eglstream_display
request create_stream(
id: new_id<wl_buffer>,
width: int,
height: int,
handle: fd,
type: int,
attribs: array,
)- id — New ID
- width — Stream framebuffer width
- height — Stream framebuffer height
- handle — Handle for the stream creation
- type — Handle type
- attribs — Stream extra connection attribs
List of attributes with extra connection data
It contains key-value pairs compatible with intptr_t type. A key must
be one of wl_eglstream_display_attrib enumeration values. What a value
represents is attribute-specific.
Create a wl_buffer from the given handle
Create a wl_buffer corresponding to given handle. The attributes list
may be used to define additional EGLStream connection data (e.g inet
address/port). The server can create its EGLStream handle using the
information encoded in the wl_buffer.
wl_eglstream_display
request swap_interval(
stream: object<wl_buffer>,
interval: int,
)- stream — wl_buffer corresponding to an EGLStream
- interval — new swap interval
change the swap interval of an EGLStream consumer
Set the swap interval for the consumer of the given EGLStream. The swap
interval is silently clamped to the valid range on the server side.
Copyright
Copyright 2021 The Chromium Authors
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.
Version 12
surface composition delegation
The global interface exposing surface delegated composition
capabilities is used to instantiate an interface extension for a
wl_surface object. This extended interface will then allow
delegated compostion of the surface contents, effectively
disconnecting the direct relationship between the buffer and the
surface content (adding support for solid quads and rounded corner
for instance).
surface_augmenter
request destroy()
Destructor
Destroy the surface augmenter.
Informs the server that the client will not be using this
protocol object anymore. This does not affect any other objects,
augmenter objects included.
surface_augmenter
enum error {
augmented_surface_exists = 0,
}- augmented_surface_exists — the surface already has a augmenter object
associated
surface_augmenter
request create_solid_color_buffer(
id: new_id<wl_buffer>,
color: array,
width: int,
height: int,
)- color — quad color represented by a SkColor4f
creates a solid color buffer
Instantiate a buffer of the given size for the purpose of a solid color
quad of a given color.
This buffer does not require resources in the compositor, so it is immediately
reusable and shareable. So it is not responsible for sending wl_buffer.release
or zwp_linux_buffer_release_v1.*_release events.
surface_augmenter
request get_augmented_surface(
id: new_id<augmented_surface>,
surface: object<wl_surface>,
)- id — the new augmenter interface id
- surface — the surface
extend surface interface for delegation
Instantiate an interface extension for the given wl_surface to
extend composition of its content. If the given wl_surface already has
a augmentation object associated, the delegate_exists protocol error is
raised.
If needs to be called, this must be called before a surface role object is
created.
Version 12
delegate composition of a wl_surface
An additional interface to a wl_surface object, which allows the
client to specify the delegated composition of the surface
contents.
This makes the surface an object only used to composite its parent
surface. This means the surface will be clipped to the parent bounds, will
not receive input events or display enter/leave events, etc.
Use wl_subsurface role objects to express which parent surface this will
perform delegate composition for.
The commits to this surface is assumed to behave synchronized with its
parent commits, as a synchronized wl_subsurface would.
The compositor does not perform fine-grained damage extension calculation
that is introduced by an augmented_surface moving, resizing, changing
stacking, or disappearing. A client performing such operations should
account for it and damage the parent non-augmented wl_surface accordingly.
Various changes like adding or removing an augmented sub-surface, changing
its position or stacking order, will not introduce extra damage on the
compositor side. The parent wl_surface should account for the extra damage
introduced.
This surface, using a wl_subsurface role of its parent, cannot be stacked
relative to non-augmented sub-surfaces of the parent, but can be stacked
relative to other augmented children. Nor can this surface have
non-augmented sub-surface children.
A mixed tree structure of using augmented_surfaces to delegate composite
wl_surfaces would look like this:
wl_surface@1:{ augmented_surface@1,2,3 }
/ \_____
/ \wl_surface@2: wl_surface@3:
{ augmented_surface@4,5 } { augmented_surface@6 }
Every wl_surface has a list of augmented_surfaces. Assuming the
wl_surface stacking order, from bottom to top, is:
wl_surface@1, wl_surface@2, wl_surface@3
Then the final composition order, from bottom to top, is:
wl_surface@1, augmented_surface@1,2,3, wl_surface@2, augmented_surface@4,5,
wl_surface@3, augmented_surface@6
augmented_surface
request destroy()
Destructor
remove delegated composition of the surface
Client will no longer be able to control the delegated composition properties
of this surface. This does not change the existing delegated composition
behavior.
augmented_surface
enum error {
bad_value = 0,
no_surface = 1,
bad_surface = 2,
}- bad_value — negative values in radius or size
- no_surface — the wl_surface was destroyed
- bad_surface — incompatible surface
augmented_surface
request set_rounded_corners(
top_left: fixed,
top_right: fixed,
bottom_right: fixed,
bottom_left: fixed,
)- top_left — top left corner
- top_right — top right corner
- bottom_right — bottom right corner
- bottom_left — bottom left corner
set the surface rounded corners
[Deprecated]. Use set_rounded_corners_clip_bounds request below.
Informs the server that it must apply the rounded corners
mask filter that shall be applied on next commit. Use
set_rounded_corners_bounds instead.
augmented_surface
request set_destination_size(
width: fixed,
height: fixed,
)Available since version 2
- width — width of the surface
- height — height of the surface
set the surface destination viewport size, with subpixel accuracy
Sets the surface destination viewport size, with subpixel accuracy.
This state is double-buffered, and is applied on the next wl_surface.commit.
augmented_surface
request set_rounded_clip_bounds(
x: int,
y: int,
width: int,
height: int,
top_left: fixed,
top_right: fixed,
bottom_right: fixed,
bottom_left: fixed,
)Available since version 2
- top_left — top left corner
- top_right — top right corner
- bottom_right — bottom right corner
- bottom_left — bottom left corner
set the surface rounded clip bounds
[Deprecated]. Use set_rounded_corners_clip_bounds request below.
Informs the server that it must apply the rounded clipping mask filter
that shall be applied on next commit. The mask can be uniform for
several surfaces and applied uniformally so that two or more
surfaces visually look as a single surface with rounded corners.
Please note this is can only be used on surfaces that are used as
overlays, which must not have any subtrees. The rounding will be
ignored if the bounds are outside of the surface.
augmented_surface
request set_background_color(
color: array,
)Available since version 3
- color — overlay color represented by a SkColor4f
sets a background color of this surface
Sets a background color of a this surface. This information will be
associated with the next buffer commit. Please note this is different
from solid color buffers, which creates a new buffer instance, and
rather provides additional information how the buffer should be
composited. Passing empty array means the background color is reset.
The default value is determined by the Wayland compositor then.
augmented_surface
request set_trusted_damage(
enabled: int,
)Available since version 6
sets the trusted damage state of this surface
[Deprecated] When set, this surface trusts all damage reported to this
surface and descendant sub-surfaces is accurate, and will not try to
recompute it. If not set, various changes like adding or removing a
sub-surface, changing its position or stacking order, can cause full
damage on this surface.
The initial state is disabled.
augmented_surface
request set_rounded_corners_clip_bounds(
x: fixed,
y: fixed,
width: fixed,
height: fixed,
top_left: fixed,
top_right: fixed,
bottom_right: fixed,
bottom_left: fixed,
)Available since version 7
- top_left — top left corner
- top_right — top right corner
- bottom_right — bottom right corner
- bottom_left — bottom left corner
set the surface rounded corners clip bounds
Informs the server that it must apply the rounded clipping mask filter
that shall be applied on next commit. The mask can be uniform for
several surfaces and applied uniformally so that two or more
surfaces visually look as a single surface with rounded corners.
Since version 9, the bounds will be placed with its origin (top left
corner pixel) at the location x, y of the surface local coordinate
system. On version 8 or before, it is placed with its root surface
coordinates, but this is deperecated.
Please note this is can only be used on surfaces that are used as
overlays, which must not have any subtrees. The rounding will be
ignored if the bounds are outside of the surface.
augmented_surface
request set_clip_rect(
x: fixed,
y: fixed,
width: fixed,
height: fixed,
)Available since version 8
- x — x coordinate in the surface local coordinates
- y — y coordinate in the surface local coordinates
- width — width of the clip rect
- height — height of the clip rect
sets a subsurface clip rect on surface local coordinates
This schedules a clip rect to be applied when drawing this sub-surface.
The clip will be placed with its origin (top left corner pixel) at the
location x, y of the surface local coordinate system. The coordinates are not
restricted to the surface area. Negative x and y values are allowed.
If all of x, y, width and height are -1.0, the clip rect is unset instead.
Initially, surfaces have no clip set.
This state is double-buffered, and is applied on the next wl_surface.commit.
augmented_surface
request set_frame_trace_id(
id_hi: uint,
id_lo: uint,
)Available since version 11
- id_hi — high 32 bits of the trace ID
- id_lo — low 32 bits of the trace ID
sets a trace ID for tracking frame submission flow
This sets a trace ID to connect the frame submission trace event flow at
the client and the server side.
This state is double-buffered, and is applied on the next
wl_surface.commit.
Version 5
- destroy — remove delegated composition of the surface
- set_position — sets a subsurface position with subpixel accuracy
- set_clip_rect — sets a subsurface clip rect with subpixel accuracy
- set_transform — sets a subsurface transform as an affine matrix
- error
delegate composition of a wl_subsurface
An additional interface to a wl_subsurface object, which allows the
client to specify the delegated composition of the surface
contents.
augmented_sub_surface
request set_position(
x: fixed,
y: fixed,
)- x — x coordinate in the parent surface
- y — y coordinate in the parent surface
sets a subsurface position with subpixel accuracy
This schedules a sub-surface position change.
The sub-surface will be moved so that its origin (top left
corner pixel) will be at the location x, y of the parent surface
coordinate system. The coordinates are not restricted to the parent
surface area. Negative values are allowed.
The scheduled coordinates will take effect whenever the state of the
parent surface is applied. When this happens depends on whether the
parent surface is in synchronized mode or not. See
wl_subsurface.set_sync and wl_subsurface.set_desync for details.
If more than one set_position request is invoked by the client before
the commit of the parent surface, the position of a new request always
replaces the scheduled position from any previous request.
The initial position is 0, 0.
This state is double-buffered, and is applied on the next wl_surface.commit.
augmented_sub_surface
request set_clip_rect(
x: fixed,
y: fixed,
width: fixed,
height: fixed,
)Available since version 4
- x — x coordinate in the parent surface
- y — y coordinate in the parent surface
- width — width of the clip rect
- height — height of the clip rect
sets a subsurface clip rect with subpixel accuracy
[Deprecated] Use set_clip_rect on augmented_surface instead.
This schedules a clip rect to be applied when drawing this sub-surface.
The clip will be placed with its origin (top left corner pixel) at the
location x, y of the parent surface coordinate system. The coordinates are not
restricted to the parent surface area. Negative x and y values are allowed.
If all of x, y, width and height are -1.0, the clip rect is unset instead.
Initially, surfaces have no clip set.
This state is double-buffered, and is applied on the next wl_surface.commit.
augmented_sub_surface
request set_transform(
matrix: array,
)Available since version 5
- matrix — size 6 affine matrix, or size 0 for identity matrix
sets a subsurface transform as an affine matrix
This schedules a transform to be applied when drawing this sub-surface.
This transform does not apply to any child surfaces of this sub-surface.
The matrix should be passed as an array of 6 floats in column major
order. An empty array can be sent to set the transform to the identity
matrix.
The initial transform is identity.
This state is double-buffered, and is applied on the next
wl_surface.commit.
Version 1
tizen-specific surface
The tizen_surface provides tizen-specific functionalities for the given
surface.
Version 1
global resource id
This tizen_resource provides a global resource id. It is a unique id
which is provided by the display server.
tizen_resource
event resource_id(
id: uint,
)- id — the global resource id
a global resource id
The resource_id event is sent immediately upon the tizen_resource object
creation by the display server. The id is a unique id which is generated
by the display server.
Version 13
tizen-specific policy for window management
The tizen_policy provides tizen-specific requests and events for window
management at Tizen Platform.
[TODO] Explain the window layer at the display server. Need to explain the
window layer to understand the requests and the events at tizen_policy
interface.
tizen_policy
request activate(
surface: object<wl_surface>,
)- surface — the surface object
activate the surface
Activate the given surface. A client requests this when a client wants
to raise at the top of the windows stack in the window's layer at the
display server and also wants to get a keyboard focus from the display
server. However the display server does not always set the focus on the
reqested surface. It depends on the focus policy of the display server.
A client just demands a keyboard focus via this request.
tizen_policy
request activate_below_by_res_id(
res_id: uint,
below_res_id: uint,
)- res_id — the global resource id
- below_res_id — the global resource id
activate the res_id and position below res_id
Activate the surface associated with the given res_id and position it
below the surface associated with the below_res_id. A client uses this
reuquest when it want to change the order of the window stack with the
gloal resource ids which are the surfaces belonging to different
processes. However, this requestit does not work when the surface
associated with the below_res_id is a parent of the surface assicated
with the res_id.
tizen_policy
request raise(
surface: object<wl_surface>,
)- surface — the surface object
raise the surface
This request raises the given surface to the top of the window stack
in a window layer. A client can decide the window layer with the
window_type for the given surface through the set_type request of
tizen_policy interface. The surface positions at the top in the window
layer.
tizen_policy
request lower(
surface: object<wl_surface>,
)- surface — the surface object
lower the surface
This request lowers the given surface to the bottom of the window stack
in a window layer. The surface positions at the bottom in the window
layer.
tizen_policy
request lower_by_res_id(
res_id: uint,
)- res_id — the global resource id
lower the res_id
This request lowers the surface associated with the given res_id to the
bottom of the window stack in a window layer. The surface positions at
the bottom in the window layer.
tizen_policy
request set_focus_skip(
surface: object<wl_surface>,
)- surface — the surface object
be unable to be the focused surface
This request makes the given surface unable to be the focused surface.
The display server must not give the focus to the surface.
tizen_policy
request unset_focus_skip(
surface: object<wl_surface>,
)- surface — the surface object
enable to be the focused surface
This request makes the given surface enable to be the focused surface.
tizen_policy
request set_role(
surface: object<wl_surface>,
role: string,
)- surface — the surface object
- role — the name of the role
set the role of the surface
Give the role to the given surface. A client set the tizen-specific role
of the surface except for the role of xdg_surface interface,
xdg_top_level, xdg_popup and so on.
tizen_policy
enum win_type {
none = 0,
toplevel = 1,
fullscreen = 2,
maximized = 3,
transient = 4,
menu = 5,
dnd = 6,
custom = 7,
notification = 8,
utility = 9,
dialog = 10,
dock = 11,
splash = 12,
desktop = 13,
}window type of the surface
A client can set the window type through the set_type request with
win_type values. The value gives the surface the window_state, the
z-order at the window stack in the window layer and other types in the
display server.
The following values are window types with z-order values in descending
order. Those are notification, dnd, dock, splash, fullscreen,
toplevel or maximized and desktop.
The menu, dnd, notification, utility, dialog, dock, splash and desktop
are the window type which is defined in netwm spefification.
https://specifications.freedesktop.org/wm-spec/wm-spec-1.4.html#idm46148902270160
tizen_policy
request set_type(
surface: object<wl_surface>,
win_type: uint,
)- surface — the surface object
- win_type — the window type
set the type of the surface
Set the type of the given surface. The display server use the window
type for the policy of the window management which are focus management,
visibility management, stack management and so on.
tizen_policy
request set_conformant(
surface: object<wl_surface>,
)- surface — the surface object
set the conformant(adaptational) surface
Set the conformant surface. The conformant surface can get the event
through which the display server notifies the area covered by the
compormant_part that is the surface in another client.
tizen_policy
request get_conformant(
surface: object<wl_surface>,
)- surface — the surface object
check the conformant surface
Ask if the given surface is the conformant surface or not. The display
server sents the result via the confirmant event.
tizen_policy
event conformant(
surface: object<wl_surface>,
is_conformant: uint,
)- surface — the surface object
- is_conformant — if the surface is conformant or not, 0 or 1
conformant event
Notify the client when a client sends the get_conformant request.
tizen_policy
enum conformant_part {
indicator = 0,
keyboard = 1,
clipboard = 2,
}- indicator — the indicator surface
- keyboard — the keyboard surface
- clipboard — the clipboard surface
the name of conformant part
This value indicates the surface name at Tizen Platform.
tizen_policy
event conformant_area(
surface: object<wl_surface>,
conformant_part: uint,
state: uint,
x: int,
y: int,
w: int,
h: int,
)- surface — the surface object
- conformant_part — the name of the conformant part
- state — visible(1) or not(0)
- x — x position of the hiding area by conformant part
- y — y position of the hiding area by conformant part
- w — width of the hiding area by conformant part
- h — height of the hiding area by conformant part
conformant area event
Notify a client when the conformant area is caclulated by the another
surface as the conformnat_part. This event does NOT guarantee the
perfect composition of the conformant surface and the surface of the
conformant part.
tizen_policy
enum error_state {
none = 0,
permission_denied = 1,
}- none — success
- permission_denied — the permission denied
error state
This describes the state of error.
tizen_policy
enum level {
1 = 0,
2 = 1,
3 = 2,
none = -1,
default = 10,
medium = 20,
high = 30,
top = 40,
}- 1 — the bottom default z-order
- 2 — the bottom midium z-order
- 3 — the bottom high z-order
- none — the bottom lowest z-order
- default — the default z-order
- medium — the medium z-order
- high — the high z-order
- top — the top z-order
notification level
This is the level of the notification type. This level stands for the
z-order in the notification layer at the display server. The none, 1, 2,
3, default, medium, high and top is z-order in ascending order. The
lower number value means the lower z-order.
tizen_policy
request set_notification_level(
surface: object<wl_surface>,
level: int,
)- surface — the surface object
- level — the z-order value
set the level in the notification
This request sets the level in the notification layer. The display
server decides the z-order with the given level in the notification
layer.
tizen_policy
event notification_done(
surface: object<wl_surface>,
level: int,
error_state: uint,
)- surface — the surface object
- level — the z-order value
- error_state — the error type
done event of set_notification request
Notify a client when the surface is located in the z-order which has
been reuqested via the set_notification_level request.
tizen_policy
request set_transient_for(
child_id: uint,
parent_id: uint,
)- child_id — the global resource id for the child surface
- parent_id — the globacl resource is for the parent surface
set the transient parent for parent_id
This request sets the transient parent for the surface associated with
the parent_id. The surface associated with the given child_id becomes
a transient children for the surface associated with the parent_id.
tizen_policy
request unset_transient_for(
child_id: uint,
)- child_id — the global resource id for the child surface
unset the transient parent/child relationship
This reuqest unsets the transient parent on the surface associated with
the child_id.
tizen_policy
event transient_for_done(
child_id: uint,
)- child_id — the global resource id for the child surface
done event of set/unset transient_for
Notify a client when the surface associated with the child_id is to set
the transient parent or when it is to unset the transient parent.
tizen_policy
enum mode {
default = 0,
always_on = 1,
}- default — the default screen mode
- always_on — keep the screen turn on
screen mode
This value means how the screen is to operate.
tizen_policy
request set_window_screen_mode(
surface: object<wl_surface>,
mode: uint,
)- surface — the surface object
- mode — the screen mode
set the screen mode to the surface
A client sets the screen mode which it wants the screen to be as long as
the given surface is shown on the screen.
tizen_policy
event window_screen_mode_done(
surface: object<wl_surface>,
mode: uint,
error_state: uint,
)- surface — the surface object
- mode — the screen mode
- error_state — the error type
done event for set_window_screen_mode request
Notify a client when the screen_mode from the client's request activates
in the display server.
tizen_policy
request set_subsurface_stand_alone(
subsurface: object<wl_subsurface>,
)- subsurface — the subsurface object
make the subsurface be a stand_alone mode
This request makes the surface associated with the given subsurface not
follow the policy of the window managment triggered by the parent
surface. The window policy of the surface associated with the given
subsurface is not affected by its parent surface.
tizen_policy
request get_subsurface(
id: new_id<wl_subsurface>,
surface: object<wl_surface>,
parent_id: uint,
)- id — the new subsurface object
- surface — the surface object
- parent_id — the global reosurce id
get the subsurface of the surface with the parent_id
Get the subsurface of the given surface with the global resource parent_id.
tizen_policy
request set_opaque_state(
surface: object<wl_surface>,
state: int,
)- surface — the surface object
set the opaque state to the surface
Set the opaque state to the given surface. The display server makes this
surface be opaque even if the color depth of the buffer attached to the
surface is 32 depth.
tizen_policy
request iconify(
surface: object<wl_surface>,
)- surface — the surface object
set the iconified state to the surface
Set the iconified state to the given surface. The iconfied state is the
window state in which the surface is not showing on the screen.
tizen_policy
request uniconify(
surface: object<wl_surface>,
)- surface — the surface object
set the uniconified state to the surface
Set the uniconified state to the given surface. The uniconfied state is
the window state in which the iconified surface is showing on the screen.
tizen_policy
event iconify_state_changed(
surface: object<wl_surface>,
iconified: uint,
force: uint,
)- surface — the surface object
- iconified — the iconfied or uniconified state, 1 or 0
- force — the iconfied is forced or not, 1 or 0
change event of the iconfied state
Notify a client when the iconfied state of the surface is changed. The
iconfied state is not only changed when the client requets the iconify
and uniconify but also changed when the iconfied state is decided by
the display server.
tizen_policy
request add_aux_hint(
surface: object<wl_surface>,
id: int,
name: string,
value: string,
)- surface — the surface object
- id — the id of the auxiliary hint
- name — the name of the auxiliary hint
- value — the vaule of the auxiliary hint
add the information of the auxiliary hint to the surface
Add the information of the auxiliary hint to the given surface. The name
and the value are changed when the display server already has the same
id with which the client sends this request.
tizen_policy
request change_aux_hint(
surface: object<wl_surface>,
id: int,
value: string,
)- surface — the surface object
- id — the id of the auxiliary hint
- value — the vaule of the auxiliary hint
change the value of the auxiliary hint to the surface
Change the value of the auxiliary hint id which the surface has.
tizen_policy
request del_aux_hint(
surface: object<wl_surface>,
id: int,
)- surface — the surface object
- id — the id of the auxiliary hint
delete the information of the auxiliry hint
Delete the information of the auxiliary hint associated the hint id
which the given surface has.
tizen_policy
request get_supported_aux_hints(
surface: object<wl_surface>,
)- surface — the surface object
get the aux hints
Get the ids of the aux hints which the given surface supports. The
display server send the supported_aux_hints events as the reply of this
requrest.
tizen_policy
event supported_aux_hints(
surface: object<wl_surface>,
hints: array,
num_hints: uint,
)- surface — the surface object
- hints — the id array of the auxiliary hints
- num_hints — the number of hints
reply event for the get_supported_aux_hints request
Notify a client when the display server get the get_supported_aux_hints
request. The display server send the id array of the suxiliary hints
which the surface supports.
tizen_policy
event allowed_aux_hint(
surface: object<wl_surface>,
id: int,
)- surface — the surface object
- id — the id of the auxiliary hint
event of the allowed auxiliary hint
Notify a client when the auxiliary hint which the given surface has is
added and changed.
tizen_policy
event aux_message(
surface: object<wl_surface>,
key: string,
value: string,
options: array,
)- surface — the surface object
- key — the key string
- value — the vaule of the key
- options — the array of option information
the auxiliary message event
Notify a client when the display server sends the auxiliary message.
The display server can use this event when it notifies an additional
information to the client.
tizen_policy
request set_background_state(
pid: uint,
)set the background state
Set the all surfaces associated with the given pid to be the background
state. The surfaces set to be the hide state and cannot show on a screen
even if the client send the show request and the activate request.
tizen_policy
request unset_background_state(
pid: uint,
)unset the background state
Set the all surfaces associated with the given pid not to be the
background state. The sufaces can allow to be showed and to be activated
by the client's request.
tizen_policy
request set_floating_mode(
surface: object<wl_surface>,
)- surface — the surface object
set the floating mode
Set the floating mode to the given surface. The surface which sets to be
floating mode can be a partial window and can position over other
top-level windows.
tizen_policy
request unset_floating_mode(
surface: object<wl_surface>,
)- surface — the surface object
unset the floating mode
Unset the floating mode to the given surface. The geometry of the
surface does not change and the z-order of it can be the same as the
top-level windows.
tizen_policy
enum stack_mode {
none = 0,
above = 1,
below = 2,
}mode for the relative stack order
The set_stack_mode request uses this mode values.
tizen_policy
request set_stack_mode(
surface: object<wl_surface>,
mode: uint,
)- surface — the surface object
- mode — the stack mode
set the stack mode
Set the stack mode to the given surface. The surface can changes the
z-order in the same layer by the stack mode.
tizen_policy
request activate_above_by_res_id(
res_id: uint,
above_res_id: uint,
)- res_id — the global resource id
- above_res_id — the globacl resource id
activate and position over the above resource id
Activate the surface associated with the given res_id which is the
global resource id and set to position over the surface assoicated with
the above_res_id.
tizen_policy
request get_subsurface_watcher(
id: new_id<tizen_subsurface_watcher>,
surface: object<wl_surface>,
)Available since version 2
- id — new tizen_subsurface_watcher object
- surface — the surface object
get the subsurface watcher
Get the subsurface watcher associated with the given surface. A client
can get the information about the subsurface associated with the surface.
tizen_policy
request set_parent(
child: object<wl_surface>,
parent: object<wl_surface>,
)Available since version 3
- child — the surface object
- parent — the surface object
set the parent
Set the parent/client relationship. The child surface position over the
parent surface.
tizen_policy
event conformant_region(
surface: object<wl_surface>,
conformant_part: uint,
state: uint,
x: int,
y: int,
w: int,
h: int,
serial: uint,
)Available since version 4
- surface — the surface object
- conformant_part — the name of the conformant part
- state — visible(1) or not(0)
- x — x position of the hiding area by conformant part
- y — y position of the hiding area by conformant part
- w — width of the hiding area by conformant part
- h — height of the hiding area by conformant part
- serial — serail number
notify of geometry values of conformant region(area)
The server can notify of conformant region(area) using this event.
If client is received this event, client should ack for it using
tizen_policy@ack_conformant_region request.
tizen_policy
request ack_conformant_region(
surface: object<wl_surface>,
serial: uint,
)Available since version 4
- surface — the surface object
- serial — serial number
ack for tizen_policy@conformant_region
A client can refresh its surface for applying new conformant region
which is from tizen_policy@conformant_region event. The client has to
ack after complete of its updates by this request.
tizen_policy
request has_video(
surface: object<wl_surface>,
has: uint,
)Available since version 7
- surface — the surface object
- has — 1 is the tizen_video_object, or 0
check the tizen_video_object
A cleint sends the information that it has the tizen_video_object to the
display server.
tizen_policy
request set_appid(
pid: int,
appid: string,
)Available since version 7
- pid — process id
- appid — application id
set the application id
Set the application id associated with the given pid.
tizen_policy
request show(
surface: object<wl_surface>,
)Available since version 8
- surface — the surface object
notify showing the surface
Notify showing the given surface. This request means that a client is
going to attach the buffer to the given surface. There is nothing to do
at the display server when a client sends this request.
tizen_policy
request hide(
surface: object<wl_surface>,
)Available since version 8
- surface — the surface object
notify hiding the surface
Notify hiding the given surface. This request means that a client is
going to attach the null buffer to the given surface. There is nothing
to do at the display server when a client sends this request.
tizen_policy
request set_transient_for_below(
child_id: uint,
parent_id: uint,
)Available since version 9
set transient_for and place under the transient_for parent
This makes a relationship between parent and child. A child is always
placed under a parent.
tizen_policy
request set_parent_with_below(
child: object<wl_surface>,
parent: nullable object<wl_surface>,
)Available since version 9
- child — the surface object
set parent and place under the parent
This makes a relationship between parent and child. A child is always
placed under a parent. Setting a null parent for a child window removes
any parent-child relationship for the child.
tizen_policy
event interactive_move_done(
surface: object<wl_surface>,
x: int,
y: int,
w: uint,
h: uint,
angle: int,
)Available since version 10
- surface — the surface object
- x — x-position after move
- y — y-position after move
- w — width after move
- h — height after move
- angle — current angle of surface
interactive move is done
This event is sent when the display server finishes interactive moving
the window. The changed geometry of the window is sent together.
tizen_policy
event interactive_resize_done(
surface: object<wl_surface>,
x: int,
y: int,
w: uint,
h: uint,
angle: int,
)Available since version 10
- surface — the surface object
- x — x-position after resize
- y — y-position after resize
- w — width after resize
- h — height after resize
- angle — current angle of surface
interactive resize is done
This event is sent when the display server finishes interactive
resizing the window. The changed geometry of the window is sent
together.
tizen_policy
enum maximize_direction {
none = 0,
all = 1,
left = 2,
right = 3,
top = 4,
bottom = 5,
}- none — none. same to unmaximize
- all — the full size of the screen
- left — the left side of the screen
- right — the right side of the screen
- top — the top of the screen
- bottom — the bottom of the screen
direction values
These values are used by the set_maximize_direction as the paremater.
tizen_policy
request set_layout(
surface: object<wl_surface>,
num_cols: uint,
num_rows: uint,
column: uint,
row: uint,
cols_span: uint,
rows_span: uint,
)Available since version 12
- surface — the surface object
- num_cols — the total number of columns
- num_rows — the total number of rows
- column — the column number to be positioned
- row — the row number to be positioned
- cols_span — the columns span
- rows_span — the rows span
set layout of the surface
Set the layout of the surface with the coordinates passed.
tizen_policy
request set_modal(
surface: object<wl_surface>,
)Available since version 13
- surface — the surface object
set modal state
Set the modal state of the surface.
tizen_policy
request unset_modal(
surface: object<wl_surface>,
)Available since version 13
- surface — the surface object
unset modal state
Unset the modal state of the surface.
Version 5
tizen-specific visibility
A client wants to know the visiblity information of the surface.
tizen_visibility
enum visibility {
unobscured = 0,
partially_obscured = 1,
fully_obscured = 2,
pre_unobscured = 3,
}visibility type
These are the visibilty types which tells how the surface assoicated
with the tizen_visibility resource is showing on a screen or not.
tizen_visibility
event notify(
visibility: uint,
)- visibility — visiblity type
notify the visiblity state
Notify a client when the visibility of the surface is changed.
tizen_visibility
event changed(
type: uint<visibility>,
option: uint,
)Available since version 5
- type — changed visibility type
- option — extra value
notify the changed visiblity type
Notify a client when the visibility of the surface is changed with the
extra vaule.
Version 1
- destroy — destroy the tizen_position
- set — set the position
- changed — event of position changed
tizen-specific position
A client can set the position information of the surface.
tizen_position
request set(
x: int,
y: int,
)- x — x position
- y — y position
set the position
Set the position.
tizen_position
event changed(
x: int,
y: int,
)- x — x position
- y — y position
event of position changed
Notify a client when the posion is changed.
Version 1
Version 2
tizen_gesture
enum error {
none = 0,
invalid_data = 1,
no_permission = 2,
no_system_resources = 3,
grabbed_already = 4,
not_supported = 5,
}tizen_gesture
enum type {
edge_swipe = 1,
edge_drag = 2,
tap = 4,
palm_cover = 8,
pan = 16,
pinch = 32,
palm_swipe = 64,
}- edge_drag
Available since version 2
- tap
Available since version 2
- palm_cover
Available since version 2
- pan
Available since version 2
- pinch
Available since version 2
- palm_swipe
Available since version 2
tizen_gesture
event edge_swipe(
mode: uint<mode>,
fingers: uint,
sx: int,
sy: int,
edge: uint<edge>,
)- sx — x coordinate of touch down point
- sy — y coordinate of touch down point
tizen_gesture
event edge_drag(
mode: uint<mode>,
fingers: uint,
cx: int,
cy: int,
edge: uint<edge>,
)- cx — x coordinate of center touch point
- cy — y coordinate of center touch point
tizen_gesture
event palm_cover(
surface: nullable object<wl_surface>,
mode: uint<mode>,
duration: uint,
cx: int,
cy: int,
size: uint,
pressure: fixed,
)Available since version 2
- cx — x coordinate of center touch point
- cy — y coordinate of center touch point
Version 2
an interface to set each focus for each key
In tradition, all the keys in a keyboard and a device on which
some keys are attached will be sent to focus surface by default.
Currently it's possible to set up each focus for each key in a keyboard and a device.
Therefore, by setting a key grab for a surface, the owner of the
surface will get the key event when it has the key grab for the key.
tizen_keyrouter
enum error {
none = 0,
invalid_surface = 1,
invalid_key = 2,
invalid_mode = 3,
grabbed_already = 4,
no_permission = 5,
no_system_resources = 6,
invalid_array = 7,
}- none — no error
- invalid_surface — Given surface is invalid.
- invalid_key — Given key is invalid.
- invalid_mode — Given mode is invalid.
- grabbed_already — The key has been grabbed already.
- no_permission — The wl client has no permission to grab the key.
- no_system_resources — System resources are insufficient.
- invalid_array — Given array has invalid pairs or data type.
tizen_keyrouter
enum mode {
none = 0,
shared = 1,
topmost = 2,
overridable_exclusive = 3,
exclusive = 4,
registered = 5,
}- none — none
- shared — mode to get a key grab with the other client surfaces when the focused client surface gets the key
- topmost — mode to get a key grab when the client surface is the top most surface
- overridable_exclusive — mode to get a key grab exclusively, overridably regardless of the order in the surface stack
- exclusive — mode to get a key grab exclusively regardless of the order in surface stack
- registered — mode to get a key grab only when a requesting surface is on top among the registering surfaces for the key
mode for a key grab
This value is used to set a mode for a key grab. With this mode and
the order of the surface between surfaces' stack, the compositor will determine the destination client
surface.
tizen_keyrouter
enum config_mode {
none = 0,
invisible_set = 1,
invisible_get = 2,
num_key_focus = 3,
picture_off = 4,
}- none — none
- invisible_set — mode to set window to enable send event to invisible window below in stack
- invisible_get — mode to set window to get event to invisible state if any top window has set register_set
- num_key_focus — mode to register for num keys for focus window
- picture_off — mode to set picture off for particular key
mode for setting specific property for Key delivery
This value is used to set a mode for a window. With this mode and
the order of the surface between surfaces' stack, the compositor will determine the destination client
surface.
Version 3
interface for tizen-screenshooter
Clients can get a screenmirror object from this interface.
tizen_screenshooter
event format(
format: uint,
)supported format for screenshooter
The tbm format codes match the #defines in tbm_surface.h. The formats actually
supported by the compositor will be reported by the format event.
Version 3
interface for screenmirror
A client can use this interface to get stream images of screen. Before starting,
queue all buffers. Then, start a screenmirror. After starting, a dequeued event
will occur when drawing a captured image on a buffer is finished. You might
need to queue the dequeued buffer again to get a new image from display server.
tizen_screenmirror
request dequeue(
buffer: object<wl_buffer>,
)- buffer — buffer object for screenmirror
dequeue a buffer
A user can dequeue a buffer from display server when he wants to take back it from server.
tizen_screenmirror
event dequeued(
buffer: object<wl_buffer>,
)- buffer — dequeued buffer which contains a captured image
dequeued event
occurs when drawing a captured image on a buffer is finished
tizen_screenmirror
event content(
content: uint,
)content changed event
occurs when the content of a captured image is changed. (normal or video)
Version 1
interface for tizen-video
Clients can get the video information that the compositor can handle from this interface.
tizen_video
event format(
format: uint,
)supported format for video
The tbm format codes match the #defines in tbm_surface.h. The formats actually
supported by the compositor will be reported by the format event.
Version 1
Version 1
Version 1
the viewport for a surface
This is the alternative and convenient solution of wl_viewport to present
a surface on screen.
The below five functions can be replaced with this interface. The below
functions will be ignored after applying this interface to a surface.
wl_viewport.set_source is very complicated especially when the buffer of
wl_surface is transformed by wl_surface.set_buffer_transform. And when the
parent is resized, if we want to change the geometry of a subsurface also,
wl_subsurface.set_position and wl_viewport.set_destination should be called
everytime the parent is resized in client side. This makes difficult to
synchronize a parent surface and a subsurface on screen.
tizen_viewport allows clients to set the relative geometry to a subsurface
in a parent surface. Whenever a parent surface is resized, the geometry of
a subsurface will be calculated, moved and resized automatically by a
compositor. The tizen_viewport is specified in the coordinates of a
subsurface's parent.
If tizen_viewport is applied to a shell surface(toplevel), the all value related
with x, y pos of tizen_viewport and tizen_destination_mode interface will be ignored.
The below 3 functions don't consider the transform of a parent's surface.
Furthermore, tizen_destination_mode.follow_parent_transform is called,
tizen_viewport will consider the transform of a parent surface when applying
the destination mode to a subsurface. If tizen_destination_mode.follow_parent_transform
is applied to a shell surface, it will be ignored.
The destination will be cropped by a parent surface.
The change will be applied when wl_surface.commit is called.
tizen_viewport
request set_source(
x: uint,
y: uint,
width: uint,
height: uint,
)set the source rectalge of a wl_buffer
The source rectangle won't be changed when a parent is resized. If it needs
to be changed, tizen_viewport.set_source should be called with new values.
tizen_viewport
request set_destination(
x: int,
y: int,
width: uint,
height: uint,
)set the destination geometry of a surface
The destination geometry won't be changed when a parent is resized. If it
needs to be changed, tizen_viewport.set_destination should be called with
new values.
If tizen_viewport is applied to a shell surface(toplevel), the x, y value of
tizen_viewport.set_destination will be ignored.
tizen_viewport
request set_destination_ratio(
x: fixed,
y: fixed,
width: fixed,
height: fixed,
)set the ratio destination rectalge in a parent surface
The destination rectangle of a subsurface will be automatically changed
when a parent is resized. This allows the real number between 0.0 and 1.0.
See wl_fixed_from_double and wl_fixed_to_double.
If tizen_viewport is applied to a shell surface(toplevel), the x, y value of
tizen_viewport.set_destination_ratio will be ignored.
tizen_viewport
request query_parent_size()
Available since version 1
set the ratio destination rectalge in a parent surface
A client can asks the display server to send the size of tizen_viewport object's
parent surface. Once a client requests it, the "parent_size" event will be sent
whenever the parent surface's size is changed.
Version 1
tizen_destination_mode
request set_ratio(
horizontal: fixed,
vertical: fixed,
)set the ratio of the destination rectangle of a subsurface
This allows the real number. See wl_fixed_from_double and wl_fixed_to_double.
tizen_destination_mode
request set_scale(
horizontal: fixed,
vertical: fixed,
)set the scale of the destination rectangle of a subsurface
This allows the real number. See wl_fixed_from_double and wl_fixed_to_double.
tizen_destination_mode
request set_align(
horizontal: fixed,
vertical: fixed,
)set the align of the destination rectangle of a subsurface
This allows the real number between 0.0 and 1.0. See wl_fixed_from_double and
wl_fixed_to_double.
Version 1
global embedded compositor object
The global obejct. Wayland has 3 type of compositor, embedded compositor is one of them.
But tizen application is sendboxing by smack, then a application not allow commutication to other application by socket.
So system or session compositor create socket and send to embedded compostior.
Version 7
global input device manager object
Tizen input device manager is a global interface. This object has device add/remove events
to provide tizen input device object to a client. This allows for a client to get the con
Be sure to bind this interface after binding wl_seat interface.
Tizen input device manager interface will only provide device add/remove event for devices
which belongs to the wl_seat object(s) bound by the client. Therefore, the compositor needs to
create/send the device add/remove event only for the current client's seat(s).
tizen_input_device_manager
event device_add(
serial: uint,
identifier: string,
device: new_id<tizen_input_device>,
seat: object<wl_seat>,
)device addition event
The device add/remove notification is going to be sent when a physical/logical device is
added/removed to/from the given seat. Note that a tizen input device object can be assigned to
a wl_seat and can also be assigned to the other wl_seat at any time. Whenever a relationship between
a tizen input device object changes, device remove event from the current wl_seat object will be made
and device add event to the other wl_seat object will also be mode.
tizen_input_device_manager
event device_remove(
serial: uint,
identifier: string,
device: object<tizen_input_device>,
seat: object<wl_seat>,
)device removal event
The device add/remove notification is going to be sent when a physical/logical device is
added/removed to/from the given seat. Note that a tizen input device object can be assigned to
a wl_seat and can also be assigned to the other wl_seat at any time. Whenever a relationship between
a tizen input device object changes, device remove event from the current wl_seat object will be made
and device add event to the other wl_seat object will also be mode.
tizen_input_device_manager
enum clas {
none = 0,
mouse = 1,
keyboard = 2,
touchscreen = 4,
}- none — none of class
- mouse — mouse class
- keyboard — keyboard class
- touchscreen — touchscreen class
tizen_input_device_manager
enum error {
none = 0,
no_permission = 1,
invalid_class = 2,
blocked_already = 3,
no_system_resources = 4,
invalid_parameter = 5,
invalid_surface = 6,
no_pointer_available = 7,
not_allowed = 8,
}- none — no error
- no_permission — no permission
- invalid_class — invalid class
- blocked_already — blocked already by the other client
- no_system_resources — no system resources such as memory lack
- invalid_parameter — argument is invalid
- invalid_surface — the given surface is not visible or pointer is not on the given surface
- no_pointer_available — there is no pointer available to warp
- not_allowed — this request is not allowed in this system
tizen_input_device_manager
event block_expired()
block expiration event
This event will be sent if the duration of existing block is expired.
Note that no block expired event will be sent if there is no block for the client.
tizen_input_device_manager
request block_events(
serial: uint,
clas: uint<clas>,
duration: uint,
)- serial —
- duration — time duration with millisecond granularity
request to block sending event(s)
This request allows a client to request to block one or more events for its purpose.
By specifying class as an argument in the request, the events belongs to the class will be blocked
during the given duration. Note that an error event will be sent if there is any error.
tizen_input_device_manager
request unblock_events(
serial: uint,
)request to unblock sending event(s)
This request allows a client to request to release the existing block for the client.
Note that no error event will be sent if there is no existing block for the client.
tizen_input_device_manager
enum axis_type {
none = 0,
wheel = 1,
hwheel = 2,
radius_x = 3,
radius_y = 4,
pressure = 5,
angle = 6,
palm = 7,
}Available since version 3
- none — no axis type
- wheel — pointer vertical wheel axis
- hwheel — pointer horizental wheel axis
- radius_x — touch radius of x axis of an event area e.g. touching area with a finger or a pen
- radius_y — touch radius of y axis of an event area e.g. touching area with a finger or a pen
- pressure — touch pressure in an event area e.g. touching area with a finger or a pen
- angle — touch angle in an event area e.g. touching area with a finger or a pen
- palm — touch palm in an event area e.g. touching area with a finger or a pen
tizen_input_device_manager
request generate_axis(
type: uint<axis_type>,
value: fixed,
)Available since version 3
generate a pointer/touch axes event using specific or default device
When the server got this request, the server choices generate a event directly or just save values.
Pointer axes (such as wheel/hwheel) are delivered to clients independantly about pointer events,
but touch axes are delivered to normal touch events(begin/update/end).
So the server just save touch axes before generate touch request is came and send a touch event
include saved touch axes value.
tizen_input_device_manager
event max_touch_count(
serial: uint,
max_count: int,
seat: object<wl_seat>,
)Available since version 4
notify max slot of touch device is updated
Each touch devices has their own touch counts can be supported.
So a server controls maximum touches in this system to maintain resources efficiently.
Sometimes a server controls maximum touches using a predefined configuration option.
Sometimes a server ensures maximum touches to be supported by touch device.
If a server do not use configuration option, maximum touches can be updated when new touch devices are connected.
So this events can be sent to client, when a first touch device is added or maximum touches is changed.
tizen_input_device_manager
request set_touch_count(
max_count: int,
)Available since version 4
set a max slot of touch
This request only changes system's touch count.
So this request doesn't change already connected touch devices's max count.
This will influence to user created device using input generator.
Input generator creates touch device only supports default touch count.
But if user set touch count before create a Input generator device,
user can create touch device has touch count user wanted.
But some systems has their own maximum touch count.
In that case this request returns error not_allowed.
tizen_input_device_manager
enum subclas {
none = 1,
remocon = 2,
virtual_keyboard = 4,
}- none — none of subclass
- remocon — remocon subclass
- virtual_keyboard — virtual_keyboard subclass
Version 1
- clas — device class
- subclas — device subclass
- axis_type — axis type enums which can be supported by a device
- device_info — event contains device information
- event_device — event indicates the source device associated with a wl_pointer/keyboard/touch event
- select_axes — request for selecting some of axes among the axes supported by a tizen_input_device object
- axis — axis change event
- release — release the tizen_input_device object
tizen input device object
The tizen_input_device interface represents one or more input devices associated with a physical/logical
input device. This interface provides device specific information/events to allows for client to identify
the source device of an event or to get the additional axes/attributes of a device.
Note that a tizen_input_device object can be used for a physical input device and can also be used for a
group of input devices. e.g. a group of mouse devices
tizen_input_device
enum clas {
none = 0,
keyboard = 2,
mouse = 3,
touchscreen = 4,
}- none — none of class
- keyboard — keyboard class
- mouse — mouse class
- touchscreen — touchscreen class
tizen_input_device
enum axis_type {
none = 0,
radius_x = 1,
radius_y = 2,
pressure = 3,
angle = 4,
detent = 5,
}- none — radius of x axis of an event area e.g. touching area with a finger or a pen
- radius_x — radius of x axis of an event area e.g. touching area with a finger or a pen
- radius_y — radius of y axis of an event area e.g. touching area with a finger or a pen
- pressure — pressure in an event area e.g. touching area with a finger or a pen
- angle — angle in an event area e.g. touching area with a finger or a pen
- detent — detent value e.g. moved distance with a rotary device
axis type enums which can be supported by a device
tizen_input_device
event event_device(
serial: uint,
name: string,
time: uint,
)- time — timestamp with millisecond granularity
event indicates the source device associated with a wl_pointer/keyboard/touch event
Version 1
Version 1
tizen_launch_image
enum rotation {
0 = 0,
90 = 90,
180 = 180,
270 = 270,
}- 0 — rotation angle 0 degree
- 90 — rotation angle 90 degree
- 180 — rotation angle 180 degree
- 270 — rotation angle 270 degree
tizen_launch_image
request launch(
file: string,
file_type: uint,
color_depth: uint,
rotation: uint,
indicator: uint,
options: array,
)Version 1
tizen_effect
enum type {
none = 0,
show = 1,
hide = 2,
restack = 3,
}- none — none
- show — show effect of window
- hide — hide effect of window
- restack — restack effect of window
Version 1
Version 1
tizen_indicator
enum state {
unknown = 0,
off = 1,
on = 2,
}- unknown — unknown
- off — can not show indicator
- on — can show indicator
tizen_indicator
enum opacity_mode {
unknown = 0,
opaque = 1,
translucent = 2,
transparent = 3,
bg_transparent = 4,
}- unknown — unknown
- opaque — opaque mode
- translucent — translucent mode
- transparent — transparent all mode
- bg_transparent — transparent only background mode
Version 2
an interface for requests and event about clipboard
This interface provides some requests and events about clipboard for other clients.
tizen_clipboard
request set_data_only(
set: uint,
)Available since version 2
request for setting data only mode for this wl_client
A wayland client can notify of that the client is data only mode.
The data only mode means that this wayland client doesn't have any
wl_surfaces at all but it wants to use wl_data_device for some data
operations.
Version 1
Version 1
Version 1
Copyright
Copyright © 2008-2011 Kristian Høgsberg
Copyright © 2010-2013 Intel Corporation
Copyright © 2012-2013 Collabora, Ltd.
Copyright © 2018 Purism SPC
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.
Version 1
virtual keyboard
The virtual keyboard provides an application with requests which emulate
the behaviour of a physical keyboard.
This interface can be used by clients on its own to provide raw input
events, or it can accompany the input method protocol.
zwp_virtual_keyboard_v1
request keymap(
format: uint,
fd: fd,
size: uint,
)- format — keymap format
- fd — keymap file descriptor
- size — keymap size, in bytes
keyboard mapping
Provide a file descriptor to the compositor which can be
memory-mapped to provide a keyboard mapping description.
Format carries a value from the keymap_format enumeration.
zwp_virtual_keyboard_v1
request key(
time: uint,
key: uint,
state: uint,
)- time — timestamp with millisecond granularity
- key — key that produced the event
- state — physical state of the key
key event
A key was pressed or released.
The time argument is a timestamp with millisecond granularity, with an
undefined base. All requests regarding a single object must share the
same clock.
Keymap must be set before issuing this request.
State carries a value from the key_state enumeration.
zwp_virtual_keyboard_v1
request modifiers(
mods_depressed: uint,
mods_latched: uint,
mods_locked: uint,
group: uint,
)- mods_depressed — depressed modifiers
- mods_latched — latched modifiers
- mods_locked — locked modifiers
- group — keyboard layout
modifier and group state
Notifies the compositor that the modifier and/or group state has
changed, and it should update state.
The client should use wl_keyboard.modifiers event to synchronize its
internal state with seat state.
Keymap must be set before issuing this request.
Version 1
Compositor Support
Version 1cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
mir 2.26
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
virtual keyboard manager
A virtual keyboard manager allows an application to provide keyboard
input events as if they came from a physical keyboard.
Copyright
Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
wl_eglstream_controller
enum present_mode {
dont_care = 0,
fifo = 1,
mailbox = 2,
}- dont_care — Let the Server decide present mode
- fifo — Use a fifo present mode
- mailbox — Use a mailbox mode
Stream present mode
dont_care: Using this enum will tell the server to make its own
decisions regarding present mode.
fifo: Tells the server to use a fifo present mode. The decision to
use fifo synchronous is left up to the server.
mailbox: Tells the server to use a mailbox present mode.
wl_eglstream_controller
enum attrib {
present_mode = 0,
fifo_length = 1,
}- present_mode — Tells the server the desired present mode
- fifo_length — Tells the server the desired fifo length when the desired presenation_mode is fifo.
Stream consumer attachment attributes
present_mode: Must be one of wl_eglstream_controller_present_mode. Tells the
server the desired present mode that should be used.
fifo_length: Only valid when the present_mode attrib is provided and its
value is specified as fifo. Tells the server the desired fifo
length to be used when the desired present_mode is fifo.
wl_eglstream_controller
request attach_eglstream_consumer(
wl_surface: object<wl_surface>,
wl_resource: object<wl_buffer>,
)Available since version 1
- wl_surface — wl_surface corresponds to the client surface associated with
newly created eglstream
- wl_resource — wl_resource corresponding to an EGLStream
Create server stream and attach consumer
Creates the corresponding server side EGLStream from the given wl_buffer
and attaches a consumer to it.
wl_eglstream_controller
request attach_eglstream_consumer_attribs(
wl_surface: object<wl_surface>,
wl_resource: object<wl_buffer>,
attribs: array,
)Available since version 2
- wl_surface — wl_surface corresponds to the client surface associated with
newly created eglstream
- wl_resource — wl_resource corresponding to an EGLStream
- attribs — Stream consumer attachment attribs
List of attributes with consumer attachment data
It contains key-value pairs compatible with intptr_t type. A key must
be one of wl_eglstream_controller_attrib enumeration values. What a value
represents is attribute-specific.
Create server stream and attach consumer using attributes
Creates the corresponding server side EGLStream from the given wl_buffer
and attaches a consumer to it using the given attributes.
Copyright
Copyright © 2024 Vaxry
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
controlling outputs' color transform matrix
This protocol allows a client to control outputs' color transform matrix (CTM).
This protocol is privileged and should not be exposed to unprivileged clients.
Version 2
Compositor Support
manager to control CTMs
This object is a manager which offers requests to control CTMs.
If any changes are done, once this object is destroyed, CTMs are reset back to
an identity matrix.
hyprland_ctm_control_manager_v1
request set_ctm_for_output(
output: object<wl_output>,
mat0: fixed,
mat1: fixed,
mat2: fixed,
mat3: fixed,
mat4: fixed,
mat5: fixed,
mat6: fixed,
mat7: fixed,
mat8: fixed,
)set the CTM of an output
Set a CTM for a wl_output.
This state is not applied immediately; clients must call .commit to
apply any pending changes.
The provided values describe a 3x3 Row-Major CTM with values in the range of [0, ∞)
Passing values outside of the range will raise an invalid_matrix error.
The default value of the CTM is an identity matrix.
If an output doesn't get a CTM set with set_ctm_for_output and commit is called,
that output will get its CTM reset to an identity matrix.
hyprland_ctm_control_manager_v1
request destroy()
Destructor
destroy the manager
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
The CTMs of all outputs will be reset to an identity matrix.
hyprland_ctm_control_manager_v1
event blocked()
This event is sent if another manager was bound by any client
at the time the current manager was bound.
Any set_ctm_for_output requests from a blocked manager will be
silently ignored by the compositor.
The client should destroy the manager after receiving this event.
Copyright
Copyright © 2024 outfoxxed
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
limit input focus to a set of surfaces
This protocol allows clients to limit input focus to a specific set
of surfaces and receive a notification when the limiter is removed as
detailed below.
Version 1
Compositor Support
manager for focus grab objects
This interface allows a client to create surface grab objects.
Version 1
input focus limiter
This interface restricts input focus to a specified whitelist of
surfaces as long as the focus grab object exists and has at least
one comitted surface.
Mouse and touch events inside a whitelisted surface will be passed
to the surface normally, while events outside of a whitelisted surface
will clear the grab object. Keyboard events will be passed to the client
and a compositor-picked surface in the whitelist will receive a
wl_keyboard::enter event if a whitelisted surface is not already entered.
Upon meeting implementation-defined criteria usually meaning a mouse or
touch input outside of any whitelisted surfaces, the compositor will
clear the whitelist, rendering the grab inert and sending the cleared
event. The same will happen if another focus grab or similar action
is started at the compositor's discretion.
hyprland_focus_grab_v1
request add_surface(
surface: object<wl_surface>,
)add a surface to the focus whitelist
Add a surface to the whitelist. Destroying the surface is treated the
same as an explicit call to remove_surface and duplicate additions are
ignored.
Does not take effect until commit is called.
hyprland_focus_grab_v1
request remove_surface(
surface: object<wl_surface>,
)remove a surface from the focus whitelist
Remove a surface from the whitelist. Destroying the surface is treated
the same as an explicit call to this function.
If the grab was active and the removed surface was entered by the
keyboard, another surface will be entered on commit.
Does not take effect until commit is called.
hyprland_focus_grab_v1
request commit()
commit the focus whitelist
Commit pending changes to the surface whitelist.
If the list previously had no entries and now has at least one, the grab
will start. If it previously had entries and now has none, the grab will
become inert.
Copyright
Copyright © 2022 Vaxry
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
registering global shortcuts
This protocol allows a client to register triggerable actions,
meant to be global shortcuts.
Version 1
Compositor Support
manager to register global shortcuts
This object is a manager which offers requests to create global shortcuts.
hyprland_global_shortcuts_manager_v1
request register_shortcut(
shortcut: new_id<hyprland_global_shortcut_v1>,
id: string,
app_id: string,
description: string,
trigger_description: string,
)- id — a unique id for the shortcut
- app_id — the app_id of the application requesting the shortcut
- description — user-readable text describing what the shortcut does.
- trigger_description — user-readable text describing how to trigger the shortcut for the client to render.
register a shortcut
Register a new global shortcut.
A global shortcut is anonymous, meaning the app does not know what key(s) trigger it.
The shortcut's keybinding shall be dealt with by the compositor.
In the case of a duplicate app_id + id combination, the already_taken protocol error is raised.
Version 1
a shortcut
This object represents a single shortcut.
hyprland_global_shortcut_v1
event pressed(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the seconds part of the timestamp
- tv_sec_lo — low 32 bits of the seconds part of the timestamp
- tv_nsec — nanoseconds part of the timestamp
keystroke pressed
The keystroke was pressed.
tv_ values hold the timestamp of the occurrence.
hyprland_global_shortcut_v1
event released(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the seconds part of the timestamp
- tv_sec_lo — low 32 bits of the seconds part of the timestamp
- tv_nsec — nanoseconds part of the timestamp
keystroke released
The keystroke was released.
tv_ values hold the timestamp of the occurrence.
Copyright
Copyright © 2025 Fl0w
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Bridge input capture to the compositor
This protocol is a bridge of the XDG input capture to the compositor.
Version 2
manage input capture sessions
This interface allows to create an input capture session.
Version 2
close reproduction of the xdg input capture portal
Interface that is used to create barrier, and trigger capture and release of the pointer.
The inputs are sent through an EIS socket, when the cursor hit a barrier.
Barriers can only be placed on screen edges and need to be a straight line that cover one corner to another.
hyprland_input_capture_v1
request add_barrier(
zone_set: uint,
id: uint,
x1: uint,
y1: uint,
x2: uint,
y2: uint,
)- zone_set — The current zone_set
- id — The zone id
add one barrier
Add one barrier to the current session, the barrier need to a line placed on the edge of the screen, and is a straight line from one corner to another.
hyprland_input_capture_v1
request release(
activation_id: uint,
x: fixed,
y: fixed,
)- activation_id — The activation id provided when activated is called
- x — the x position of the cursor
- y — the y position of the cursor
release input capturing
Release input capturing, the input are not intercepted anymore and barrier crossing will activate it again.
If x != -1 and y != -1 then the cursor is warped to the x and y coordinates.
hyprland_input_capture_v1
event eis_fd(
fd: fd,
)- fd — eis socket file descriptor
eis file descriptor
This event provide the file descriptor of an eis socket where inputs will be sent when input capturing is active
hyprland_input_capture_v1
event disabled()
disable the session
Called when the application will not receive captured input. The application can call enable to request future input capturing
hyprland_input_capture_v1
event activated(
activation_id: uint,
x: fixed,
y: fixed,
barrier_id: uint,
)- activation_id — Same number used in eis start_emulating to allow synchronisation
- x — the x position of the cursor
- y — the y position of the cursor
- barrier_id — the is of the barrier that have been triggered
inputs has been captured
Called when the application is about to receive inputs
hyprland_input_capture_v1
event deactivated(
activation_id: uint,
)- activation_id — same activation id of the latest activated event
pointer motion
Called when input capture is stopped, and inputs are no longer sent to the application
hyprland_input_capture_v1
request destroy()
DestructorAvailable since version 2
destroy the session
Destroy the input capture session.
Any barriers registered by this session are removed, input capturing is
stopped, and the eis socket associated with this session is closed by the
compositor. The client must not use the object after this request.
hyprland_input_capture_v1
enum error {
invalid_barrier_id = 0,
invalid_barrier = 1,
invalid_activation_id = 2,
}- invalid_barrier_id — The barrier id already exist
- invalid_barrier — The barrier coordinates are invalid
- invalid_activation_id — The activation id provided is invalid
Copyright
Copyright © 2025 Maximilian Seidler
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Version 1
Compositor Support
lock notification manager
This interface allows clients to monitor whether the wayland session is
locked or unlocked.
Version 1
- destroy — destroy the notification object
- locked — session is locked
- unlocked — session is no longer locked
lock notification
This interface is used by the compositor to send lock notification events
to clients.
Typically the "locked" and "unlocked" events are emitted when a client
locks/unlocks the session via ext-session-lock, but the compositor may
choose to send notifications for any other locking mechanisms.
The compositor must notfiy after possible transition periods
between locked and unlocked states of the session.
In the context of ext-session-lock, that means the "locked" event is
expected to be sent after the session-lock client has presented
a lock screen frame on every output, which corresponds to the "locked"
event of ext-session-lock.
hyprland_lock_notification_v1
event locked()
session is locked
This event is sent when the wayland session is locked.
It's a compositor protocol error to send this event twice without an
unlock event in-between.
hyprland_lock_notification_v1
event unlocked()
session is no longer locked
This event is sent when the wayland session is unlocked.
It's a compositor protocol error to send this event twice without an
locked event in-between. It's a compositor protocol error to send this
event prior to any locked event.
Copyright
Copyright © 2025 outfoxxed
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
hyprland-specific wl_surface extensions
This protocol exposes hyprland-specific wl_surface properties.
Version 2
Compositor Support
manager for hyprland surface objects
This interface allows a client to create hyprland surface objects.
Version 2
hyprland-specific wl_surface properties
This interface allows access to hyprland-specific properties of a wl_surface.
Once the wl_surface has been destroyed, the hyprland surface object must be
destroyed as well. All other operations are a protocol error.
hyprland_surface_v1
request set_opacity(
opacity: fixed,
)set the overall opacity of the surface
Sets a multiplier for the overall opacity of the surface.
This multiplier applies to visual effects such as blur behind the surface
in addition to the surface's content.
The default value is 1.0.
Setting a value outside of the range 0.0 - 1.0 (inclusive) is a protocol error.
Does not take effect until wl_surface.commit is called.
hyprland_surface_v1
request destroy()
Destructor
destroy the hyprland surface interface
Destroy the hyprland surface object, resetting properties provided
by this interface to their default values on the next wl_surface.commit.
hyprland_surface_v1
enum error {
no_surface = 0,
out_of_range = 1,
}- no_surface — wl_surface was destroyed
- out_of_range — given opacity was not in the range 0.0 - 1.0 (inclusive)
hyprland_surface_v1
request set_visible_region(
region: nullable object<wl_region>,
)Available since version 2
set the visible region of the surface
This request sets the region of the surface that contains visible content.
Visible content refers to content that has an alpha value greater than zero.
The visible region is an optimization hint for the compositor that lets it
avoid drawing parts of the surface that are not visible. Setting a visible region
that does not contain all content in the surface may result in missing content
not being drawn.
The visible region is specified in buffer-local coordinates.
The compositor ignores the parts of the visible region that fall outside of the surface.
When all parts of the region fall outside of the buffer geometry, the compositor may
avoid rendering the surface entirely.
The initial value for the visible region is empty. Setting the
visible region has copy semantics, and the wl_region object can be destroyed immediately.
A NULL wl_region causes the visible region to be set to empty.
Does not take effect until wl_surface.commit is called.
Copyright
Copyright © 2022 Vaxry
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
capturing the contents of toplevel windows
This protocol allows clients to ask for exporting another toplevel's
surface(s) to a buffer.
Particularly useful for sharing a single window.
Version 2
Compositor Support
manager to inform clients and begin capturing
This object is a manager which offers requests to start capturing from a
source.
hyprland_toplevel_export_manager_v1
request capture_toplevel(
frame: new_id<hyprland_toplevel_export_frame_v1>,
overlay_cursor: int,
handle: uint,
)- overlay_cursor — composite cursor onto the frame
- handle — the handle of the toplevel (window) to be captured
capture a toplevel
Capture the next frame of a toplevel. (window)
The captured frame will not contain any server-side decorations and will
ignore the compositor-set geometry, like e.g. rounded corners.
It will contain all the subsurfaces and popups, however the latter will be clipped
to the geometry of the base surface.
The handle parameter refers to the address of the window as seen in hyprctl clients.
For example, for d161e7b0 it would be 3512854448.
Version 2
a frame ready for copy
This object represents a single frame.
When created, a series of buffer events will be sent, each representing a
supported buffer type. The "buffer_done" event is sent afterwards to
indicate that all supported buffer types have been enumerated. The client
will then be able to send a "copy" request. If the capture is successful,
the compositor will send a "flags" followed by a "ready" event.
wl_shm buffers are always supported, ie. the "buffer" event is guaranteed to be sent.
If the capture failed, the "failed" event is sent. This can happen anytime
before the "ready" event.
Once either a "ready" or a "failed" event is received, the client should
destroy the frame.
hyprland_toplevel_export_frame_v1
event buffer(
format: uint<wl_shm.format>,
width: uint,
height: uint,
stride: uint,
)- format — buffer format
- width — buffer width
- height — buffer height
- stride — buffer stride
wl_shm buffer information
Provides information about wl_shm buffer parameters that need to be
used for this frame. This event is sent once after the frame is created
if wl_shm buffers are supported.
hyprland_toplevel_export_frame_v1
event damage(
x: uint,
y: uint,
width: uint,
height: uint,
)- x — damaged x coordinates
- y — damaged y coordinates
- width — current width
- height — current height
carries the coordinates of the damaged region
This event is sent right before the ready event when ignore_damage was
not set. It may be generated multiple times for each copy
request.
The arguments describe a box around an area that has changed since the
last copy request that was derived from the current screencopy manager
instance.
The union of all regions received between the call to copy
and a ready event is the total damage since the prior ready event.
hyprland_toplevel_export_frame_v1
enum error {
already_used = 0,
invalid_buffer = 1,
}- already_used — the object has already been used to copy a wl_buffer
- invalid_buffer — buffer attributes are invalid
hyprland_toplevel_export_frame_v1
event ready(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the seconds part of the timestamp
- tv_sec_lo — low 32 bits of the seconds part of the timestamp
- tv_nsec — nanoseconds part of the timestamp
indicates frame is available for reading
Called as soon as the frame is copied, indicating it is available
for reading. This event includes the time at which presentation happened
at.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
each component being an unsigned 32-bit value. Whole seconds are in
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
and the additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999]. The seconds part
may have an arbitrary offset at start.
After receiving this event, the client should destroy the object.
hyprland_toplevel_export_frame_v1
event linux_dmabuf(
format: uint,
width: uint,
height: uint,
)- format — fourcc pixel format
- width — buffer width
- height — buffer height
linux-dmabuf buffer information
Provides information about linux-dmabuf buffer parameters that need to
be used for this frame. This event is sent once after the frame is
created if linux-dmabuf buffers are supported.
hyprland_toplevel_export_frame_v1
event buffer_done()
all buffer types reported
This event is sent once after all buffer events have been sent.
The client should proceed to create a buffer of one of the supported
types, and send a "copy" request.
Copyright
Copyright © 2025 WhySoBad
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mapping of toplevels to windows
This protocol allows clients to retrieve the mapping of toplevels to hyprland window addresses.
Version 1
Compositor Support
manager to request toplevel mappings
This object is a manager which offers requests to retrieve a window address
for a toplevel.
Version 1
toplevel to window mapping
This object represents a mapping of a (wlr) toplevel to a window address.
Once created, the window_address event will be sent containing the address of the window
associated with the toplevel.
Should the mapping fail, the failed event will be sent.
hyprland_toplevel_window_mapping_handle_v1
event window_address(
address_hi: uint,
address: uint,
)- address_hi — upper 32 bits of the window address
- address — lower 32 bits of the window address
address of the window
The full 64bit window address. The address field contains the lower 32 bits whilst the
address_hi contains the upper 32 bits
Copyright
Copyright © 2026 Vaxry
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
image capture sources for workspaces
This protocol is a Hyprland extension for capturing workspace contents.
Version 1
image capture source manager for workspaces
This manager can create ICC capture sources from ext-workspace handles.
hyprland_workspace_image_capture_source_manager_v1
enum capture_mode {
windows_only = 0,
everything = 1,
}- windows_only
workspace windows only
Include only the selected workspace's windows and their associated
surfaces and decorations. The background will be transparent.
- everything
workspace windows and output-global desktop elements
Include the selected workspace's windows together with wallpaper,
panels, pinned windows, and other output-global surfaces, including
layer-shell surfaces, associated with its output.
content included in the source image
This enum describes the allowed capture modes.
Copyright
Copyright 2026 Julian Orth
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.
protocol for assigning icons to subjects
This protocol allows clients to assign icons to subjects.
Each icon has a subject that determines what the icon describes. A subject
might, for example, be an xdg_toplevel, and the compositor might request the
client to draw three icons for the server-side decorations, the task bar,
and a tab-switcher respectively.
Since icons are often displayed in multiple locations with different sizes
and scales, clients only create a factory object. It is up to the compositor
to use this factory to request the client to draw a concrete icon. This
process is dynamic: the compositor can request the client to draw a new icon
at any time and can inform the client that a concrete icon is no longer
required, whenever such a location appears or disappears.
Version 1
the manager singleton
This interface is a singleton global.
jay_icon_surface_manager_v1
enum error {
has_factory = 0,
}- has_factory — the subject already has a factory
fatal error
These fatal protocol errors may be emitted in response to
invalid requests.
This interface is frozen
Version 1
- error — fatal error
- destroy — destroy this object
- stop — stop the factory
- stopped — the reply to the stop request
- surface — a new jay_icon_surface_v1 object
an icon surface factory
This interface allows the compositor to draw a concrete icon for a
subject.
jay_icon_surface_factory_v1
enum error {
not_stopped = 0,
}- not_stopped — the factory has not been stopped
fatal error
These fatal protocol errors may be emitted in response to
invalid requests.
Version 1
a concrete icon for a subject
This interface represents a concrete icon for a subject. It is compositor
policy when jay_icon_surface_v1 objects are created and how they are
displayed.
Unlike with some wl_surface roles, wl_surface.attach requests have no
specified meaning beyond what is specified by wl_surface itself. The
client should destroy this object if it no longer wants to provide an
icon.
The underlying wl_surface is output-only. That is, it will never receive
any input events.
jay_icon_surface_v1
enum error {
invalid_serial = 0,
}- invalid_serial — the serial is invalid
fatal error
These fatal protocol errors may be emitted in response to
invalid requests.
jay_icon_surface_v1
event finished()
the icon is no longer used
The compositor sends this event when it no longer wants to use the
jay_icon_surface_v1. The client should destroy the object.
For example, the compositor might send this event when a task bar is
hidden.
The compositor must send this event when the underlying subject is
destroyed.
This event has no effect on other jay_icon_surface_v1 objects created
from the same factory, which might still be used.
jay_icon_surface_v1
event configure(
serial_hi: uint,
serial_lo: uint,
)- serial_hi — the high 32 bits of the serial
- serial_lo — the low 32 bits of the serial
terminates a configuration sequence
A configuration sequence consists of a number of preceding events
terminated by this event. The client should store the contents of the
preceding events and apply them atomically in response to this event.
Each event that is part of the configuration sequence specifies this,
along with its other semantics.
Upon receiving this event, the client should send a
jay_icon_surface_v1.ack_configure request with the same serial, prepare
the wl_surface content update to match the requested configuration, and
commit the wl_surface as soon as possible. Delaying this process for too
long might cause the icon to be displayed incorrectly. What counts as
too long is compositor policy.
If the client receives multiple configuration sequences, A followed by
B, it may apply this process directly to B and skip A. This applies
transitively.
jay_icon_surface_v1
request ack_configure(
serial_hi: uint,
serial_lo: uint,
)- serial_hi — the high 32 bits of the serial
- serial_lo — the low 32 bits of the serial
ack a configuration sequence
This request informs the compositor that the content update committed
by the next wl_surface.commit request conforms to the configuration
sequence specified by the serial.
The serial must be from a configuration sequence on this object and must
be larger than the previous serial used with this request. Otherwise the
invalid_serial error is raised.
jay_icon_surface_v1
event configure_size(
width: int,
height: int,
)- width — the width
- height — the height
the size of the icon
This event informs the client of the desired surface size.
This event is part of a configuration sequence. See
jay_icon_surface_v1.configure. If a configuration sequence does not
contain this event, the client should consider the desired size
unchanged.
The first configuration sequence must contain this event.
The width and height arguments are greater than 0.
Copyright
Copyright © 2008-2013 Kristian Høgsberg
Copyright © 2013 Rafael Antognolli
Copyright © 2013 Jasper St. Pierre
Copyright © 2010-2013 Intel Corporation
Copyright © 2015-2017 Samsung Electronics Co., Ltd
Copyright © 2015-2017 Red Hat Inc.
Copyright © 2025 Julian Orth
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.
Version 1
- destroy — destroys this manager
- get_ext — creates a jay_popup_ext_v1 extension object
- error — fatal error
Compositor Support
Destructor
destroys this manager
This request has no effect on any created extension objects.
- id — the new jay_popup_ext_v1
- popup — the xdg_popup
creates a jay_popup_ext_v1 extension object
Each xdg_popup can have at most one jay_popup_ext_v1 extension object.
Sending this request while another extension object exists causes the
already_exists error to be emitted.
The extension object must be destroyed before the xdg_popup. Otherwise
the has_extension error is emitted.
- already_exists — extension object already exists for the xdg_popup
fatal error
These fatal protocol errors may be emitted in response to
invalid requests.
Version 1
- destroy — destroys this extension object
- move — start an interactive move
- resize — start an interactive resize
- error — fatal error
xdg_popup extension object
This object can be used to perform additional operations on an xdg_popup.
Destructor
destroys this extension object
This request has no effect on ongoing operations started through this
object.
- seat — the wl_seat of the user event
- serial — the serial of the user event
start an interactive move
Start an interactive, user-driven move of the surface.
This request must be used in response to some sort of user action
like a button press, key press, or touch down event. The passed
serial is used to determine the type of interactive move (touch,
pointer, etc).
The server may ignore move requests. For example, if the passed serial
is no longer valid.
If triggered, the surface will lose the focus of the device
(wl_pointer, wl_touch, etc) used for the move. It is up to the
compositor to visually indicate that the move is taking place, such as
updating a pointer cursor, during the move. There is no guarantee
that the device focus will return when the move is completed.
- seat — the wl_seat of the user event
- serial — the serial of the user event
- edges — which edge or corner is being dragged
start an interactive resize
Start a user-driven, interactive resize of the surface.
This request must be used in response to some sort of user action
like a button press, key press, or touch down event. The passed
serial is used to determine the type of interactive resize (touch,
pointer, etc).
The server may ignore resize requests. For example, if the passed serial
is no longer valid.
If triggered, the client will receive configure events with the
expected sizes. The client must also acknowledge configure events using
"ack_configure".
If triggered, the surface also will lose the focus of the device
(wl_pointer, wl_touch, etc) used for the resize. It is up to the
compositor to visually indicate that the resize is taking place,
such as updating a pointer cursor, during the resize. There is no
guarantee that the device focus will return when the resize is
completed.
The edges parameter specifies how the surface should be resized, and
is one of the values of the resize_edge enum. Values not matching
a variant of the enum will cause the invalid_resize_edge protocol error.
The compositor may use this information to update the surface position
for example when dragging the top left corner. The compositor may also
use this information to adapt its behavior, e.g. choose an appropriate
cursor image.
- invalid_resize_edge — provided value is not a valid variant of the resize_edge enum
- has_extension — the xdg_popup still has an extension object
fatal error
These fatal protocol errors may be emitted in response to
invalid requests.
Copyright
Copyright 2026 Julian Orth
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.
Version 1
manager singleton
This interface is a singleton global.
Copyright
Copyright © 2024 Julian Orth
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.
Version 1
Compositor Support
protocol for system tray items
This is a global that advertises a tray area. It allows clients to
displays items in the tray.
The compositor can advertise multiple globals of this interface. For
example, if there are multiple outputs with one tray area each. In that
case, clients that want to display tray items should bind to and use all
of these globals.
The compositor can remove this global at any time. For example, when an
output containing a tray area is disconnected. In that case, the items
created from the global will no longer be displayed and the client should
destroy all associated objects.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
jay_tray_v1
enum error {
conflicting_role = 0,
already_exists = 1,
}- conflicting_role — the surface already has another role
- already_exists — tray item already exists for the surface
fatal error
These fatal protocol errors may be emitted in response to
invalid requests.
jay_tray_v1
request destroy()
Destructor
destroy this object
Destroy this object.
Created tray items are not affected by this.
jay_tray_v1
request get_tray_item(
id: new_id<jay_tray_item_v1>,
surface: object<wl_surface>,
)- id — the new tray item
- surface — the underlying surface
request tray item interface for surface
Create a tray item for a surface.
The surface is assigned the ext-tray-item-v1 role. If the surface
already has another role, the conflicting_role error is emitted.
If the surface already has a role object, the already_exists error is
emitted.
Version 1
tray item interface
This interface represents an item in a tray. The underlying surface will
be displayed in the tray.
Unless the global has been removed, the compositor will immediately emit a
configuration sequence after this object has been created. If applicable,
the sequence will also contain wl_surface.preferred_buffer_scale and
wp_fractional_scale_v1.preferred_scale events.
After receiving the configuration sequence, the client must ack the
configuration and commit the surface. The item will not be displayed
before this.
The compositor can send configuration sequences at any point.
If a null buffer is committed, the item will not be displayed.
If the client wants the item to be displayed, it must ack and commit the
latest configuration sequence and attach and commit a non-null buffer.
jay_tray_item_v1
enum error {
has_popups = 0,
has_parent = 1,
invalid_seat_serial = 2,
invalid_configure_serial = 3,
invalid_keyboard_focus_hint = 4,
}- has_popups — the item has popups at destroy time
- has_parent — the popup already has a parent
- invalid_seat_serial — invalid serial provided to get_popup
- invalid_configure_serial — invalid serial provided to ack_configure
- invalid_keyboard_focus_hint — invalid keyboard focus hint provided to get_popup
fatal error
These fatal protocol errors may be emitted in response to
invalid requests.
jay_tray_item_v1
request destroy()
Destructor
destroy this object
Destroy this object. The item is immediately removed from the tray.
The client must destroy all popups before this. Otherwise the has_popups
error is emitted.
jay_tray_item_v1
request ack_configure(
serial: uint,
)ack a configuration sequence
Ack a configuration sequence. The acked configuration sequence is
double-buffered state, see wl_surface.commit. If the compositor has
never sent this serial, an invalid_configure_serial error is emitted.
jay_tray_item_v1
enum keyboard_focus_hint {
none = 0,
on_demand = 1,
immediate = 2,
}- none
no keyboard focus
The popup should never get the keyboard focus.
- on_demand
on demand keyboard focus
The popup should get the keyboard focus when the user requests it.
- immediate
immediate keyboard focus
The popup should get the keyboard focus as soon as it becomes visible.
keyboard focus hint
This enum describes when a popup used in the get_popup request should
get keyboard focus.
- popup — the popup to be shown
- seat — the causal seat
- serial — the causal input serial
- focus_hint — a hint for keyboard focus handling
create a popup for tray item
Create a popup for a tray item.
The popup should have been created with a null parent. If the popup
already has a parent, the has_parent error is emitted.
The seat and serial indicate the interaction that causes this popup to
be shown. If the compositor has never sent this serial, the compositor
might emit the invalid_seat_serial error. This is compositor policy.
If the focus_hint is invalid, the invalid_keyboard_focus_hint error is
emitted.
The focus hint indicates how the client wants keyboard focus to be
handled for the popup. The compositor may ignore the hint. This hint has
no effect on nested popups.
The compositor may dismiss the popup at any point.
jay_tray_item_v1
event configure_size(
width: int,
height: int,
)- width — the optimal width in surface coordinates
- height — the optimal height in surface coordinates
optimal tray item size has changed
This event is sent when the optimal size for the item has changed.
This event is part of a configuration sequence that is terminated with
a configure event. The client should not act on it immediately but wait
for the configure event.
When the client receives this event, it should reconfigure the surface
for the new size, ack the sequence, and commit the surface.
If the surface has a different size, the compositor might crop or
stretch the surface. If the surface has subsurfaces that extend beyond
the edges of the surface, the compositor might crop them.
The width and height are at least 1.
If a configuration sequence does not contain this event, the client
should assume that the value is unchanged. The first configuration
sequence must contain this event.
jay_tray_item_v1
event preferred_anchor(
anchor: uint<xdg_positioner.anchor>,
)- anchor — the preferred anchor
preferred anchor has changed
This events is sent when the preferred anchor for popup windows changes.
This event is part of a configuration sequence that is terminated with
a configure event. The client should not act on it immediately but wait
for the configure event.
If a configuration sequence does not contain this event, the client
should assume that the value is unchanged. The first configuration
sequence must contain this event.
jay_tray_item_v1
event preferred_gravity(
gravity: uint<xdg_positioner.gravity>,
)- gravity — the preferred gravity
preferred gravity has changed
This events is sent when the preferred gravity for popup windows changes.
This event is part of a configuration sequence that is terminated with
a configure event. The client should not act on it immediately but wait
for the configure event.
If a configuration sequence does not contain this event, the client
should assume that the value is unchanged. The first configuration
sequence must contain this event.
jay_tray_item_v1
event configure(
serial: uint,
)marks the end of a configuration sequence
This event marks the end of a configuration sequence. The client should
act on the new parameters, ack the sequence, and commit the surface.
Note that this serial is not related to the wl_seat serial used in
get_popup requests.
Copyright
Copyright 2026 Julian Orth
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.
protocol for compositor-created wl_surface objects
This protocol allows the compositor to create wl_surface objects and send
them to the client.
This protocol is frozen, meaning that its API and semantics will never
change.
Version 65535
Version 65535
wl_surface factory
This interface can be used by the compositor to create wl_surface objects
and send them to the client.
The created wl_surface objects will have the same version as this object,
which in turn has the same version as the
jay_wl_surface_factory_manager_v1 object. The client should bind
jay_wl_surface_factory_manager_v1 with the version it wants for the
wl_surface objects.
Each jay_wl_surface_factory_v1 is in one of three states:
Initial: This is the initial state immediately after the object has been
created.
Assigned: The factory is assigned to a higher-level producer.
Abandoned: The factory was previously in the assigned state but has been
abandoned by the producer.
The object can only transition from the initial to the assigned state and
from the assigned to the abandoned state. How and when these transitions
happen is defined by higher-level protocols building on top of this
protocol.
For example, a higher-level protocol might have a constructor request
that accepts a jay_wl_surface_factory_v1 object as an argument and
transitions it from the initial to the assigned state. The created
higher-level object might have a stop request that transitions the
jay_wl_surface_factory_v1 object from the assigned to the abandoned state.
The jay_wl_surface_factory_v1.surface event is only sent while the object
is in the assigned state.
Trying to transition the jay_wl_surface_factory_v1 to the assigned state
while it is not in the initial state raises the already_assigned error.
jay_wl_surface_factory_v1
enum error {
already_assigned = 0,
still_assigned = 1,
}- already_assigned — the factory was already assigned to a producer
- still_assigned — the factory is still assigned to a producer
fatal error
These fatal protocol errors may be emitted in response to
invalid requests.
Copyright
SPDX-FileCopyrightText: 2024 Xaver Hugl <xaver.hugl@gmail.com>
SPDX-License-Identifier: MIT-CMU
Version 3
Compositor Support
external brightness control
Some brightness control mechanisms are somewhat unstable, or require root
privileges, so putting them inside of the compositor is not desired.
This protocol is for outsourcing the actual brightness-setting to a
process outside of the compositor.
Version 3
- destroy — destroy the object and unregister the brightness control device
- set_internal — sets whether or not the brightness device belongs to an internal display
- set_edid — set the EDID data for identification of the display
- set_max_brightness — notifies the compositor of the maximum brightness that can be set on this device
- commit — notifies the compositor that all relevant identifiers and values have been sent
- requested_brightness — requests the client to change the brightness to this value
- set_observed_brightness — notifies the compositor of the brightness that was read from this device
- set_uses_ddc_ci — notifies the compositor that DDC/CI is used to control brightness etc.
brightness control device
After creating this object, the client should issue all relevant setup requests
(set_internal, set_edid, set_max_brightness, optionally set_observed_brightness)
and finish the sequence with commit.
Afterwards, for each change in values, the client must call commit again.
kde_external_brightness_device_v1
event requested_brightness(
value: uint,
)- value — the value to set the device to
requests the client to change the brightness to this value
The client must ensure that if the brightness level changes due to external factors,
that it either overwrites those changes with what the compositor last requested,
or commit again with set_observed_brightness specifying the changed brightness.
kde_external_brightness_device_v1
request set_observed_brightness(
value: uint,
)Available since version 2
- value — the observed value that was read
notifies the compositor of the brightness that was read from this device
The client can set this to notify the compositor of the device's initial brightness.
It can also set this again after the initial commit to notify the compositor that
the brightness level has changed due to external factors.
The compositor is free to use or ignore this value as it sees fit.
kde_external_brightness_device_v1
request set_uses_ddc_ci(
value: uint,
)Available since version 3
- value — 1 if it uses DDC/CI, 0 if not (assumed by default)
notifies the compositor that DDC/CI is used to control brightness etc.
The compositor can use this information to ignore this object if its commands
expose monitor issues. The compositor may also reduce the amount of brightness
requests given potentially slow response times and concerns about monitor EEPROM
longevity/wear-out.
Copyright
SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.1-or-later
Version 1
- error
- allow — Tell about which surface could be raised above the lockscreen
- destroy — Destroy the kde_lockscreen_overlay_v1
Allow surfaces over the lockscreen
Allows a client to request a surface to be visible when the system is locked.
This is meant to be used for specific high urgency cases like phone calls or alarms.
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
kde_lockscreen_overlay_v1
request allow(
surface: object<wl_surface>,
)Tell about which surface could be raised above the lockscreen
Informs the compositor that the surface could be shown when the screen is locked. This request should be called while the surface is unmapped.
kde_lockscreen_overlay_v1
request destroy()
Destructor
Destroy the kde_lockscreen_overlay_v1
This won't affect the surface previously marked with the allow request.
Copyright
SPDX-FileCopyrightText: 2008-2011 Kristian Høgsberg
SPDX-FileCopyrightText: 2010-2011 Intel Corporation
SPDX-FileCopyrightText: 2012-2013 Collabora, Ltd.
SPDX-FileCopyrightText: 2015 Sebastian Kügler <sebas@kde.org>
SPDX-FileCopyrightText: 2021 Méven Car <meven.car@enioka.com>
SPDX-License-Identifier: MIT-CMU
Version 26
- error — kde_output_device_registry_v2 error values
- finished — no new output announcements
- stop — stop receiving updates
- output — new available output
Compositor Support
output devices
This interface can be used to list output devices.
If this global is bound with a version less than 21, the unsupported_version
protocol error will be posted.
kde_output_device_registry_v2
enum error {
unsupported_version = 0,
}- unsupported_version — the registry was bound with an unsupported version
kde_output_device_registry_v2 error values
These errors can be emitted in response to some requests.
kde_output_device_registry_v2
event finished()
DestructorAvailable since version 21
no new output announcements
This event is sent in response to the stop request. The compositor will
immediately destroy the object after sending this event.
Version 26
output configuration representation
An output device describes a display device available to the compositor.
output_device is similar to wl_output, but focuses on output
configuration management.
A client can query all global output_device objects to enlist all
available display devices, even those that may currently not be
represented by the compositor as a wl_output.
The client sends configuration changes to the server through the
outputconfiguration interface, and the server applies the configuration
changes to the hardware and signals changes to the output devices
accordingly.
This object is published as global during start up for every available
display devices, or when one later becomes available, for example by
being hotplugged via a physical connector.
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
kde_output_device_v2
enum subpixel {
unknown = 0,
none = 1,
horizontal_rgb = 2,
horizontal_bgr = 3,
vertical_rgb = 4,
vertical_bgr = 5,
}subpixel geometry information
This enumeration describes how the physical pixels on an output are
laid out.
kde_output_device_v2
enum transform {
normal = 0,
90 = 1,
180 = 2,
270 = 3,
flipped = 4,
flipped_90 = 5,
flipped_180 = 6,
flipped_270 = 7,
}transform from framebuffer to output
This describes the transform, that a compositor will apply to a
surface to compensate for the rotation or mirroring of an
output device.
The flipped values correspond to an initial flip around a
vertical axis followed by rotation.
The purpose is mainly to allow clients to render accordingly and
tell the compositor, so that for fullscreen surfaces, the
compositor is still able to scan out directly client surfaces.
kde_output_device_v2
event geometry(
x: int,
y: int,
physical_width: int,
physical_height: int,
subpixel: int,
make: string,
model: string,
transform: int,
)- x — x position within the global compositor space
- y — y position within the global compositor space
- physical_width — width in millimeters of the output
- physical_height — height in millimeters of the output
- subpixel — subpixel orientation of the output
- make — textual description of the manufacturer
- model — textual description of the model
- transform — transform that maps framebuffer to output
geometric properties of the output
The geometry event describes geometric properties of the output.
The event is sent when binding to the output object and whenever
any of the properties change.
kde_output_device_v2
event mode(
mode: new_id<kde_output_device_mode_v2>,
)advertise available output modes and current one
The mode event describes an available mode for the output.
When the client binds to the output_device object, the server sends this
event once for every available mode the output_device can be operated by.
There will always be at least one event sent out on initial binding,
which represents the current mode.
Later if an output changes, its mode event is sent again for the
eventual added modes and lastly the current mode. In other words, the
current mode is always represented by the latest event sent with the current
flag set.
The size of a mode is given in physical hardware units of the output device.
This is not necessarily the same as the output size in the global compositor
space. For instance, the output may be scaled, as described in
kde_output_device_v2.scale, or transformed, as described in
kde_output_device_v2.transform.
kde_output_device_v2
event done()
sent all information about output
This event is sent after all other properties have been
sent on binding to the output object as well as after any
other output property change have been applied later on.
This allows to see changes to the output properties as atomic,
even if multiple events successively announce them.
kde_output_device_v2
event scale(
factor: fixed,
)- factor — scaling factor of output
output scaling properties
This event contains scaling geometry information
that is not in the geometry event. It may be sent after
binding the output object or if the output scale changes
later. If it is not sent, the client should assume a
scale of 1.
A scale larger than 1 means that the compositor will
automatically scale surface buffers by this amount
when rendering. This is used for high resolution
displays where applications rendering at the native
resolution would be too small to be legible.
It is intended that scaling aware clients track the
current output of a surface, and if it is on a scaled
output it should use wl_surface.set_buffer_scale with
the scale of the output. That way the compositor can
avoid scaling the surface, and the client can supply
a higher detail image.
kde_output_device_v2
event edid(
raw: string,
)- raw — base64-encoded EDID string
advertise EDID data for the output
The edid event encapsulates the EDID data for the outputdevice.
The event is sent when binding to the output object. The EDID
data may be empty, in which case this event is sent anyway.
If the EDID information is empty, you can fall back to the name
et al. properties of the outputdevice.
kde_output_device_v2
event enabled(
enabled: int,
)- enabled — output enabled state
output is enabled or disabled
The enabled event notifies whether this output is currently
enabled and used for displaying content by the server.
The event is sent when binding to the output object and
whenever later on an output changes its state by becoming
enabled or disabled.
kde_output_device_v2
event uuid(
uuid: string,
)A unique id for this outputdevice
The uuid can be used to identify the output. It's controlled by
the server entirely. The server should make sure the uuid is
persistent across restarts. An empty uuid is considered invalid.
kde_output_device_v2
event serial_number(
serialNumber: string,
)- serialNumber — textual representation of serial number
Serial Number
Serial ID of the monitor, sent on startup before the first done event.
kde_output_device_v2
event eisa_id(
eisaId: string,
)- eisaId — textual representation of EISA identifier
EISA ID
EISA ID of the monitor, sent on startup before the first done event.
kde_output_device_v2
enum capability {
overscan = 0x1,
vrr = 0x2,
rgb_range = 0x4,
high_dynamic_range = 0x8,
wide_color_gamut = 0x10,
auto_rotate = 0x20,
icc_profile = 0x40,
brightness = 0x80,
built_in_color = 0x100,
ddc_ci = 0x200,
max_bits_per_color = 0x400,
edr = 0x800,
sharpness = 0x1000,
custom_modes = 0x2000,
auto_brightness = 0x4000,
hdr_icc_profile = 0x8000,
abm_level = 0x10000,
disable = 0x20000,
}This is a bitfield
- overscan — if this output_device can use overscan
- vrr — if this outputdevice supports variable refresh rate
- rgb_range — if setting the rgb range is possible
- high_dynamic_range — if this outputdevice supports high dynamic range
Available since version 3
- wide_color_gamut — if this outputdevice supports a wide color gamut
Available since version 3
- auto_rotate — if this outputdevice supports autorotation
Available since version 4
- icc_profile — if this outputdevice supports icc profiles
Available since version 5
- brightness — if this outputdevice supports the brightness setting
Available since version 9
- built_in_color — if this outputdevice supports the built-in color profile
Available since version 12
- ddc_ci — if this outputdevice supports DDC/CI
Available since version 14
- max_bits_per_color — if this outputdevice supports setting max bpc
Available since version 15
- edr — if this outputdevice supports EDR
Available since version 16
- sharpness — if this outputdevice supports the sharpness setting
Available since version 17
- custom_modes — if this outputdevice supports custom modes
Available since version 18
- auto_brightness
Available since version 19
- hdr_icc_profile — if this outputdevice supports HDR ICC profiles
Available since version 22
- abm_level — if this outputdevice supports the abm level setting
Available since version 23
- disable — if this outputdevice supports being enabled/disabled
Available since version 25
describes capabilities of the outputdevice
Describes what capabilities this device has.
kde_output_device_v2
event overscan(
overscan: uint,
)- overscan — amount of overscan of the monitor
overscan
Overscan value of the monitor in percent, sent on startup before the
first done event.
kde_output_device_v2
enum vrr_policy {
never = 0,
always = 1,
automatic = 2,
}describes vrr policy
Describes when the compositor may employ variable refresh rate
kde_output_device_v2
enum rgb_range {
automatic = 0,
full = 1,
limited = 2,
}describes RGB range policy
Whether full or limited color range should be used
kde_output_device_v2
event high_dynamic_range(
hdr_enabled: uint,
)Available since version 3
- hdr_enabled — 1 if enabled, 0 if disabled
if HDR is enabled
Whether or not high dynamic range is enabled for this output
kde_output_device_v2
event sdr_brightness(
sdr_brightness: uint,
)Available since version 3
the brightness of sdr if hdr is enabled
If high dynamic range is used, this value defines the brightness in nits for content
that's in standard dynamic range format. Note that while the value is in nits, that
doesn't necessarily translate to the same brightness on the screen.
kde_output_device_v2
event wide_color_gamut(
wcg_enabled: uint,
)Available since version 3
- wcg_enabled — 1 if enabled, 0 if disabled
if WCG is enabled
Whether or not the use of a wide color gamut is enabled for this output
kde_output_device_v2
event brightness_metadata(
max_peak_brightness: uint,
max_frame_average_brightness: uint,
min_brightness: uint,
)Available since version 6
- max_peak_brightness — in nits
- max_frame_average_brightness — in nits
- min_brightness — in 0.0001 nits
metadata about the screen's brightness limits
kde_output_device_v2
event brightness_overrides(
max_peak_brightness: int,
max_average_brightness: int,
min_brightness: int,
)Available since version 6
- max_peak_brightness — -1 for no override, positive values are the brightness in nits
- max_average_brightness — -1 for no override, positive values are the brightness in nits
- min_brightness — -1 for no override, positive values are the brightness in 0.0001 nits
overrides for the screen's brightness limits
kde_output_device_v2
event sdr_gamut_wideness(
gamut_wideness: uint,
)Available since version 6
- gamut_wideness — 0 means rec.709 primaries, 10000 means native primaries
describes which gamut is assumed for sRGB applications
This can be used to provide the colors users assume sRGB applications should have based on the
default experience on many modern sRGB screens.
kde_output_device_v2
event brightness(
brightness: uint,
)Available since version 8
- brightness — brightness in 0-10000
brightness multiplier
This is the brightness modifier of the output. It doesn't specify
any absolute values, but is merely a multiplier on top of other
brightness values, like sdr_brightness and brightness_metadata.
0 is the minimum brightness (not completely dark) and 10000 is
the maximum brightness.
This is currently only supported / meaningful while HDR is active.
kde_output_device_v2
enum color_power_tradeoff {
efficiency = 0,
accuracy = 1,
}- efficiency — prefer efficiency and performance
- accuracy — prefer accuracy
tradeoff between power and accuracy
The compositor can do a lot of things that trade between
performance, power and color accuracy. This setting describes
a high level preference from the user about in which direction
that tradeoff should be made.
kde_output_device_v2
event dimming(
multiplier: uint,
)Available since version 11
- multiplier — multiplier in 0-10000
dimming multiplier
This is the dimming multiplier of the output. This is similar to
the brightness setting, except it's meant to be a temporary setting
only, not persistent and may be implemented differently depending
on the display.
0 is the minimum dimming factor (not completely dark) and 10000
means the output is not dimmed.
kde_output_device_v2
event ddc_ci_allowed(
allowed: uint,
)Available since version 14
- allowed — 1 if allowed, 0 if disabled
if DDC/CI should be used to control brightness etc.
If the ddc_ci capability is present, this determines if settings
such as brightness, contrast or others should be set using DDC/CI.
kde_output_device_v2
event max_bits_per_color(
max_bpc: uint,
)Available since version 15
- max_bpc — 0 for the default / automatic
override max bpc
This limits the amount of bits per color that are sent to the display.
kde_output_device_v2
event max_bits_per_color_range(
min_value: uint,
max_value: uint,
)Available since version 15
- min_value — the minimum supported by the driver
- max_value — the maximum supported by the driver
range of max bits per color value
kde_output_device_v2
event edr_policy(
policy: uint<edr_policy>,
)Available since version 16
when the compositor may apply EDR
When EDR is enabled, the compositor may increase the backlight beyond
the user-specified setting, in order to present HDR content on displays
without native HDR support.
This will usually result in better visuals, but also increases battery
usage.
kde_output_device_v2
event sharpness(
sharpness: uint,
)Available since version 17
- sharpness — sharpness in 0-10000
sharpness strength
This is the sharpness modifier of the output.
0 is sharpness disabled and 10000 is the maximum sharpness
kde_output_device_v2
event priority(
priority: uint,
)Available since version 18
output priority
Describes the position of the output in the output order list,
with lower values being earlier in the list. There's no specific
value the list has to start at, this value is only used in sorting
outputs.
Note that the output order protocol is not sufficient for this,
as an output may not be in the output order if it's disabled or
mirroring another screen.
kde_output_device_v2
event abm_level(
level: uint,
)Available since version 23
- level — 0 is off, 4 is the maximum level
allowed level of adaptive backlight modulation
Adaptive backlight modulation is a feature that reduces the backlight
and increases contrast of colors on the screen to improve power usage.
Version 26
output mode
This object describes an output mode.
Some heads don't support output modes, in which case modes won't be
advertised.
Properties sent via this interface are applied atomically via the
kde_output_device.done event. No guarantees are made regarding the order
in which properties are sent.
kde_output_device_mode_v2
event size(
width: int,
height: int,
)- width — width of the mode in hardware units
- height — height of the mode in hardware units
mode size
This event describes the mode size. The size is given in physical
hardware units of the output device. This is not necessarily the same as
the output size in the global compositor space. For instance, the output
may be scaled or transformed.
kde_output_device_mode_v2
event refresh(
refresh: int,
)- refresh — vertical refresh rate in mHz
mode refresh rate
This event describes the mode's fixed vertical refresh rate. It is only
sent if the mode has a fixed refresh rate.
kde_output_device_mode_v2
event removed()
the mode has been destroyed
The compositor will destroy the object immediately after sending this
event, so it will become invalid and the client should release any
resources associated with it.
The client should call the kde_output_device_mode_v2.release request
after receiving this event.
kde_output_device_mode_v2
event cvt(
dot_clock: uint,
hdisplay: uint,
hsync_start: uint,
hsync_end: uint,
htotal: uint,
hskew: uint,
vdisplay: uint,
vsync_start: uint,
vsync_end: uint,
vtotal: uint,
vscan: uint,
flags: uint,
)Available since version 24
- dot_clock — pixel clock in kHz
- hdisplay — horizontal display size
- hsync_start — horizontal sync start
- hsync_end — horizontal sync end
- htotal — horizontal total size
- hskew — horizontal skew
- vdisplay — vertical display size
- vsync_start — vertical sync start
- vsync_end — vertical sync end
- vtotal — vertical total size
- vscan — vertical scan
- flags — flags, see DRM_MODE_FLAG_*
cvt timings
This event describes the CVT timings associated with the mode.
If an output mode has no CVT timings, this event will not be sent.
Copyright
SPDX-FileCopyrightText: 2008-2011 Kristian Høgsberg
SPDX-FileCopyrightText: 2010-2011 Intel Corporation
SPDX-FileCopyrightText: 2012-2013 Collabora, Ltd.
SPDX-FileCopyrightText: 2015 Sebastian Kügler <sebas@kde.org>
SPDX-FileCopyrightText: 2021 Méven Car <meven.car@enioka.com>
SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@kde.org>
SPDX-License-Identifier: MIT-CMU
Version 22
Compositor Support
configuration of server outputs through clients
This interface enables clients to set properties of output devices for screen
configuration purposes via the server. To this end output devices are referenced
by global kde_output_device_v2 objects.
outputmanagement (wl_global)
--------------------------
request:
outputconfiguration (wl_resource)
--------------------------
requests:
enable(outputdevice, bool)
mode(outputdevice, mode)
transformation(outputdevice, flag)
position(outputdevice, x, y)
apply
events:
The server registers one outputmanagement object as a global object. In order
to configure outputs a client requests create_configuration, which provides a
resource referencing an outputconfiguration for one-time configuration. That
way the server knows which requests belong together and can group them by that.
On the outputconfiguration object the client calls for each output whether the
output should be enabled, which mode should be set (by referencing the mode from
the list of announced modes) and the output's global position. Once all outputs
are configured that way, the client calls apply.
At that point and not earlier the server should try to apply the configuration.
If this succeeds the server emits the applied signal, otherwise the failed
signal, such that the configuring client is noticed about the success of its
configuration request.
Through this design the interface enables atomic output configuration changes if
internally supported by the server.
Warning! The protocol described in this file is a desktop environment implementation
detail. Regular clients must not use this protocol. Backward incompatible
changes may be added without bumping the major version of the extension.
Version 22
configure single output devices
outputconfiguration is a client-specific resource that can be used to ask
the server to apply changes to available output devices.
The client receives a list of output devices from the registry. When it wants
to apply new settings, it creates a configuration object from the
outputmanagement global, writes changes through this object's enable, scale,
transform and mode calls. It then asks the server to apply these settings in
an atomic fashion, for example through Linux' DRM interface.
The server signals back whether the new settings have applied successfully
or failed to apply. outputdevice objects are updated after the changes have been
applied to the hardware and before the server side sends the applied event.
kde_output_configuration_v2
request enable(
outputdevice: object<kde_output_device_v2>,
enable: int,
)- outputdevice — outputdevice to be en- or disabled
- enable — 1 to enable or 0 to disable this output
enable or disable an output
Mark the output as enabled or disabled.
kde_output_configuration_v2
request position(
outputdevice: object<kde_output_device_v2>,
x: int,
y: int,
)- outputdevice — outputdevice this position applies to
- x — position on the x-axis
- y — position on the y-axis
position output in global space
Sets the position for this output device. (x,y) describe the top-left corner
of the output in global space, whereby the origin (0,0) of the global space
has to be aligned with the top-left corner of the most left and in case this
does not define a single one the top output.
There may be no gaps or overlaps between outputs, i.e. the outputs are
stacked horizontally, vertically, or both on each other.
kde_output_configuration_v2
request scale(
outputdevice: object<kde_output_device_v2>,
scale: fixed,
)- outputdevice — outputdevice this scale change applies to
- scale — scaling factor
set scaling factor of this output
Sets the scaling factor for this output device.
kde_output_configuration_v2
request apply()
apply configuration changes to all output devices
Asks the server to apply property changes requested through this outputconfiguration
object to all outputs on the server side.
The output configuration can be applied only once. The already_applied protocol error
will be posted if the apply request is called the second time.
kde_output_configuration_v2
request set_priority(
outputdevice: object<kde_output_device_v2>,
priority: uint,
)Available since version 3
- outputdevice — outputdevice the index applies to
- priority — the priority of the output
Set the order of outputs
Set the position of the output in the output order list, with lower values
being earlier in the list. There's no specific value the list has to start
at, this value is only used in sorting outputs.
The order of outputs can be used to assign desktop environment components
to a specific screen, see kde_output_order_v1 and kde-output-device-v2 for
details. Note that for consistent behavior, the priority value needs to be
unique among all enabled outputs.
kde_output_configuration_v2
request set_sdr_brightness(
outputdevice: object<kde_output_device_v2>,
sdr_brightness: uint,
)Available since version 4
- outputdevice — outputdevice this setting applies to
set the brightness for sdr content
Sets the brightness of standard dynamic range content in nits. Only has an effect while the output is in HDR mode.
Note that while the value is in nits, that doesn't necessarily translate to the same brightness on the screen.
kde_output_configuration_v2
request set_wide_color_gamut(
outputdevice: object<kde_output_device_v2>,
enable_wcg: uint,
)Available since version 4
- outputdevice — outputdevice this setting applies to
- enable_wcg — 1 to enable, 0 to disable wcg
change if a wide color gamut should be used
Whether or not the output should use a wide color gamut
kde_output_configuration_v2
request set_brightness_overrides(
outputdevice: object<kde_output_device_v2>,
max_peak_brightness: int,
max_frame_average_brightness: int,
min_brightness: int,
)Available since version 7
- outputdevice — outputdevice this setting applies to
- max_peak_brightness — -1 for not overriding, or positive values in nits
- max_frame_average_brightness — -1 for not overriding, or positive values in nits
- min_brightness — -1 for not overriding, or positive values in 0.0001 nits
override metadata about the screen's brightness limits
kde_output_configuration_v2
request set_sdr_gamut_wideness(
outputdevice: object<kde_output_device_v2>,
gamut_wideness: uint,
)Available since version 7
- outputdevice — outputdevice this setting applies to
- gamut_wideness — 0 means rec.709 primaries, 10000 means native primaries
describes which gamut is assumed for sRGB applications
This can be used to provide the colors users assume sRGB applications should have based on the
default experience on many modern sRGB screens.
kde_output_configuration_v2
request set_brightness(
outputdevice: object<kde_output_device_v2>,
brightness: uint,
)Available since version 9
- outputdevice — outputdevice this setting applies to
- brightness — brightness in 0-10000
brightness multiplier
Set the brightness modifier of the output. It doesn't specify
any absolute values, but is merely a multiplier on top of other
brightness values, like sdr_brightness and brightness_metadata.
0 is the minimum brightness (not completely dark) and 10000 is
the maximum brightness.
This is supported while HDR is active in versions 8 and below,
or when the device supports the "brightness" capability in
versions 9 and above.
kde_output_configuration_v2
enum color_power_tradeoff {
efficiency = 0,
accuracy = 1,
}- efficiency — prefer efficiency and performance
- accuracy — prefer accuracy
tradeoff between power and accuracy
The compositor can do a lot of things that trade between
performance, power and color accuracy. This setting describes
a high level preference from the user about in which direction
that tradeoff should be made.
kde_output_configuration_v2
request set_dimming(
outputdevice: object<kde_output_device_v2>,
multiplier: uint,
)Available since version 11
- outputdevice — outputdevice this setting applies to
- multiplier — multiplier in 0-10000
dimming multiplier
Set the dimming multiplier of the output. This is similar to the
brightness setting, except it's meant to be a temporary setting
only, not persistent and may be implemented differently depending
on the display.
0 is the minimum dimming factor (not completely dark) and 10000
means the output is not dimmed.
This is supported only when the "brightness" capability is
also supported.
kde_output_configuration_v2
event failure_reason(
reason: string,
)Available since version 12
- reason — reason for failure
reason for failure
Describes why applying the output configuration failed. Is only
sent before the failure event.
kde_output_configuration_v2
request set_edr_policy(
outputdevice: object<kde_output_device_v2>,
policy: uint<edr_policy>,
)Available since version 16
- outputdevice — outputdevice this setting applies to
set when the compositor may apply EDR
When EDR is enabled, the compositor may increase the backlight beyond
the user-specified setting, in order to present HDR content on displays
without native HDR support.
This will usually result in better visuals, but also increases battery
usage.
kde_output_configuration_v2
request set_sharpness(
outputdevice: object<kde_output_device_v2>,
sharpness: uint,
)Available since version 17
- outputdevice — outputdevice this setting applies to
- sharpness — sharpness in 0-10000
sharpness strength
This is the sharpness modifier of the output.
0 is sharpness disabled and 10000 is the maximum sharpness
kde_output_configuration_v2
request set_custom_modes(
outputdevice: object<kde_output_device_v2>,
modes: object<kde_mode_list_v2>,
)Available since version 18
- outputdevice — outputdevice this setting applies to
set the custom mode list
Set the list of custom modes for this output. The compositor
will in response generate the requested modes and add them to
the output (or delete ones no longer in the list).
This can be useful for overclocking displays, or for working
around broken EDIDs.
Note that there is no guarantee for any custom mode to
actually work, or even to leave the display undamaged (in the
case of CRTs). It's entirely the responsibility of the user
to ensure each added mode is the right one for their display.
kde_output_configuration_v2
request set_abm_level(
outputdevice: object<kde_output_device_v2>,
level: uint,
)Available since version 21
- outputdevice — outputdevice this setting applies to
- level — 0 is off, 4 is the maximum level
set the allowed level of adaptive backlight modulation
Adaptive backlight modulation is a feature that reduces the backlight
and increases contrast of colors on the screen to improve power usage.
Version 22
a list of custom modes
This list is populated by first setting each relevant property,
and then calling add_mode to add a mode with these properties.
One would for example call
set_resolution
set_refresh_rate
set_reduced_blanking
add_mode
add_mode does not reset the properties that were previously set,
they are valid until the object is destroyed.
The compositor may additionally have sensible defaults for some
properties like reduced_blanking, but for consistent results,
it's best to always set each known property every time.
One can also specify custom modes with CVT timings, for example
The parameters resolution and refresh rate are required, if they
are not set, the missing_parameters error will be emitted.
kde_mode_list_v2
enum error {
missing_parameters = 0,
}- missing_parameters — a required parameter wasn't set
kde_mode_list_v2 error values
These errors can be emitted in response to add_mode requests.
kde_mode_list_v2
request set_reduced_blanking(
reduced: uint,
)- reduced — 1 for reduced blanking, 0 for normal vblank duration
whether or not the mode should have reduced blanking
Reduced blanking is an optimization that can reduce bandwidth / timing
requirements for a display mode by reducing the time vblank takes.
As not all displays support it, it may be desired to still turn it off
though (like with CRTs, where full blanking is required).
kde_mode_list_v2
request add_cvt(
dot_clock: uint,
hdisplay: uint,
hsync_start: uint,
hsync_end: uint,
htotal: uint,
hskew: uint,
vdisplay: uint,
vsync_start: uint,
vsync_end: uint,
vtotal: uint,
vscan: uint,
flags: uint,
)Available since version 22
- dot_clock — pixel clock in kHz
- hdisplay — horizontal display size
- hsync_start — horizontal sync start
- hsync_end — horizontal sync end
- htotal — horizontal total size
- hskew — horizontal skew
- vdisplay — vertical display size
- vsync_start — vertical sync start
- vsync_end — vertical sync end
- vtotal — vertical total size
- vscan — vertical scan
- flags — flags, see DRM_MODE_FLAG_*
new mode with CVT timings
Adds a new mode with the specified CVT timings.
Copyright
SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com>
SPDX-License-Identifier: MIT-CMU
Version 1
Compositor Support
announce order of outputs
Announce the order in which desktop environment components should be placed on outputs.
The compositor will send the list of outputs when the global is bound and whenever there is a change.
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
kde_output_order_v1
event done()
done
Specifies that the output list is complete. On the next output event, a new list begins.
Copyright
SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: MIT-CMU
Version 2
expose which is the primary display
Protocol for telling which is the primary display among the selection
of enabled outputs.
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
kde_primary_output_v1
event primary_output(
output_name: string,
)- output_name — the name of the output
Provide the current primary output's name
Specifies which output is the primary one identified by their uuid. See kde_output_device_v2 uuid event for more information about it.
Copyright
SPDX-FileCopyrightText: 2023 Vlad Zahorodnii
SPDX-License-Identifier: MIT-CMU
Version 1
Compositor Support
screen edge manager
This interface allows clients to associate actions with screen edges. For
example, showing a surface by moving the pointer to a screen edge.
Potential ways to trigger the screen edge are subject to compositor
policies. As an example, the compositor may consider the screen edge to be
triggered if the pointer hits its associated screen border. Other ways may
include using touchscreen or touchpad gestures.
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
kde_screen_edge_manager_v1
enum error {
invalid_border = 0,
invalid_role = 1,
already_constructed = 2,
}- invalid_border — the specified border value is invalid
- invalid_role — the surface has invalid role
- already_constructed — the surface already has a screen edge
kde_screen_edge_manager_v1
request destroy()
Destructor
destroy the screen edge manager
Destroy the screen edge manager. This doesn't destroy objects created
with this manager.
kde_screen_edge_manager_v1
enum border {
top = 1,
bottom = 2,
left = 3,
right = 4,
}- top — top screen edge
- bottom — bottom screen edge
- left — left screen edge
- right — right screen edge
screen border
These values describe possible screen borders.
Version 1
auto hide screen edge
The auto hide screen edge object allows to hide the surface and make it
visible by triggering the screen edge. The screen edge is inactive and
the surface is visible by default.
This interface can be used to implement user interface elements such as
auto-hide panels or docks.
kde_auto_hide_screen_edge_v1.activate activates the screen edge and makes
the surface hidden. The surface can be made visible by triggering the
screen edge or calling kde_auto_hide_screen_edge_v1.deactivate.
If the screen edge has been triggered, it won't be re-activated again.
Another kde_auto_hide_screen_edge_v1.activate request must be made by the
client to activate the screen edge.
kde_auto_hide_screen_edge_v1
request destroy()
Destructor
destroy the auto hide screen edge object
Destroy the auto hide screen edge object. If the screen edge is active,
it will be deactivated and the surface will be made visible.
Copyright
SPDX-FileCopyrightText: 2008-2011 Kristian Høgsberg
SPDX-FileCopyrightText: 2010-2011 Intel Corporation
SPDX-FileCopyrightText: 2012-2013 Collabora, Ltd.
SPDX-FileCopyrightText: 2015 Sebastian Kügler <sebas@kde.org>
SPDX-License-Identifier: MIT-CMU
Version 4
output configuration representation
An outputdevice describes a display device available to the compositor.
outputdevice is similar to wl_output, but focuses on output
configuration management.
A client can query all global outputdevice objects to enlist all
available display devices, even those that may currently not be
represented by the compositor as a wl_output.
The client sends configuration changes to the server through the
outputconfiguration interface, and the server applies the configuration
changes to the hardware and signals changes to the outputdevices
accordingly.
This object is published as global during start up for every available
display devices, or when one later becomes available, for example by
being hotplugged via a physical connector.
org_kde_kwin_outputdevice
enum subpixel {
unknown = 0,
none = 1,
horizontal_rgb = 2,
horizontal_bgr = 3,
vertical_rgb = 4,
vertical_bgr = 5,
}subpixel geometry information
This enumeration describes how the physical pixels on an output are
laid out.
org_kde_kwin_outputdevice
enum transform {
normal = 0,
90 = 1,
180 = 2,
270 = 3,
flipped = 4,
flipped_90 = 5,
flipped_180 = 6,
flipped_270 = 7,
}transform from framebuffer to output
This describes the transform, that a compositor will apply to a
surface to compensate for the rotation or mirroring of an
output device.
The flipped values correspond to an initial flip around a
vertical axis followed by rotation.
The purpose is mainly to allow clients to render accordingly and
tell the compositor, so that for fullscreen surfaces, the
compositor is still able to scan out directly client surfaces.
org_kde_kwin_outputdevice
event geometry(
x: int,
y: int,
physical_width: int,
physical_height: int,
subpixel: int,
make: string,
model: string,
transform: int,
)- x — x position within the global compositor space
- y — y position within the global compositor space
- physical_width — width in millimeters of the output
- physical_height — height in millimeters of the output
- subpixel — subpixel orientation of the output
- make — textual description of the manufacturer
- model — textual description of the model
- transform — transform that maps framebuffer to output
geometric properties of the output
The geometry event describes geometric properties of the output.
The event is sent when binding to the output object and whenever
any of the properties change.
org_kde_kwin_outputdevice
enum mode {
current = 0x1,
preferred = 0x2,
}- current — indicates this is the current mode
- preferred — indicates this is the preferred mode
mode information
These flags describe properties of an output mode. They are
used in the flags bitfield of the mode event.
org_kde_kwin_outputdevice
event mode(
flags: uint,
width: int,
height: int,
refresh: int,
mode_id: int,
)- flags — bitfield of mode flags
- width — width of the mode in hardware units
- height — height of the mode in hardware units
- refresh — vertical refresh rate in mHz
- mode_id — Per outputdevice unique id to identify a mode
advertise available output modes and current one
The mode event describes an available mode for the output.
When the client binds to the outputdevice object, the server sends this
event once for every available mode the outputdevice can be operated by.
There will always be at least one event sent out on initial binding,
which represents the current mode.
Later on if an output changes its mode the event is sent again, whereby
this event represents the mode that has now become current. In other
words, the current mode is always represented by the latest event sent
with the current flag set.
The size of a mode is given in physical hardware units of the output device.
This is not necessarily the same as the output size in the global compositor
space. For instance, the output may be scaled, as described in
org_kde_kwin_outputdevice.scale, or transformed, as described in
org_kde_kwin_outputdevice.transform.
The id can be used to refer to a mode when calling set_mode on an
org_kde_kwin_outputconfiguration object.
org_kde_kwin_outputdevice
event done()
sent all information about output
This event is sent after all other properties have been
sent on binding to the output object as well as after any
other output property change have been applied later on.
This allows to see changes to the output properties as atomic,
even if multiple events successively announce them.
org_kde_kwin_outputdevice
event scale(
factor: int,
)- factor — scaling factor of output
output scaling properties
This event contains scaling geometry information
that is not in the geometry event. It may be sent after
binding the output object or if the output scale changes
later. If it is not sent, the client should assume a
scale of 1.
A scale larger than 1 means that the compositor will
automatically scale surface buffers by this amount
when rendering. This is used for high resolution
displays where applications rendering at the native
resolution would be too small to be legible.
It is intended that scaling aware clients track the
current output of a surface, and if it is on a scaled
output it should use wl_surface.set_buffer_scale with
the scale of the output. That way the compositor can
avoid scaling the surface, and the client can supply
a higher detail image.
org_kde_kwin_outputdevice
event edid(
raw: string,
)- raw — base64-encoded EDID string
advertise EDID data for the output
The edid event encapsulates the EDID data for the outputdevice.
The event is sent when binding to the output object. The EDID
data may be empty, in which case this event is sent anyway.
If the EDID information is empty, you can fall back to the name
et al. properties of the outputdevice.
org_kde_kwin_outputdevice
enum enablement {
disabled = 0,
enabled = 1,
}describes enabled state
Describes whether a device is enabled, i.e. device is used to
display content by the compositor. This wraps a boolean around
an int to avoid a boolean trap.
org_kde_kwin_outputdevice
event enabled(
enabled: int,
)- enabled — output enabled state
output is enabled or disabled
The enabled event notifies whether this output is currently
enabled and used for displaying content by the server.
The event is sent when binding to the output object and
whenever later on an output changes its state by becoming
enabled or disabled.
org_kde_kwin_outputdevice
event uuid(
uuid: string,
)A unique id for this outputdevice
The uuid can be used to identify the output. It's controlled by
the server entirely. The server should make sure the uuid is
persistent across restarts. An empty uuid is considered invalid.
org_kde_kwin_outputdevice
event scalef(
factor: fixed,
)Available since version 2
- factor — scaling factor of output
output scaling properties
This event contains scaling geometry information
that is not in the geometry event. It may be sent after
binding the output object or if the output scale changes
later. If it is not sent, the client should assume a
scale of 1.
A scale larger than 1 means that the compositor will
automatically scale surface buffers by this amount
when rendering. This is used for high resolution
displays where applications rendering at the native
resolution would be too small to be legible.
It is intended that scaling aware clients track the
current output of a surface, and if it is on a scaled
output it should use wl_surface.set_buffer_scale with
the scale of the output. That way the compositor can
avoid scaling the surface, and the client can supply
a higher detail image.
wl_output will keep the output scale as an integer. In every situation except
configuring the window manager you want to use that.
org_kde_kwin_outputdevice
event colorcurves(
red: array,
green: array,
blue: array,
)Available since version 2
- red — red color ramp
- green — green color ramp
- blue — blue color ramp
output color curves
Describes the color intensity profile of the output.
Commonly used for gamma/color correction.
The array contains all color ramp values of the output.
For example on 8bit screens there are 256 of them.
The array elements are unsigned 16bit integers.
org_kde_kwin_outputdevice
event serial_number(
serialNumber: string,
)Available since version 2
- serialNumber — textual representation of serial number
Serial Number
Serial ID of the monitor, sent on startup before the first done event.
org_kde_kwin_outputdevice
event eisa_id(
eisaId: string,
)Available since version 2
- eisaId — textual representation of EISA identifier
EISA ID
EISA ID of the monitor, sent on startup before the first done event.
org_kde_kwin_outputdevice
enum capability {
overscan = 1,
vrr = 2,
}This is a bitfieldAvailable since version 3
describes capabilities of the outputdevice
Describes what capabilities this device has.
org_kde_kwin_outputdevice
event overscan(
overscan: uint,
)Available since version 3
- overscan — amount of overscan of the monitor
overscan
Overscan value of the monitor in percent, sent on startup before the
first done event.
org_kde_kwin_outputdevice
enum vrr_policy {
never = 0,
always = 1,
automatic = 2,
}Available since version 4
describes vrr policy
Describes when the compositor may employ variable refresh rate
Copyright
SPDX-FileCopyrightText: 2018 Marco Martin
SPDX-License-Identifier: LGPL-2.1-or-later
Version 4
Compositor Support
org_kde_plasma_virtual_desktop_management
request get_virtual_desktop(
id: new_id<org_kde_plasma_virtual_desktop>,
desktop_id: string,
)- desktop_id — Unique id of the desktop
get the org_kde_plasma_virtual_desktop interface for a desktop
Given the id of a particular virtual desktop, get the corresponding org_kde_plasma_virtual_desktop which represents only the desktop with that id.
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
org_kde_plasma_virtual_desktop_management
request request_create_virtual_desktop(
name: string,
position: uint,
)- name — The user readable name we want for the desktop
- position — The position we want for the desktop
ask for the creation of a new desktop at a specified position
Ask the server to create a new virtual desktop, and position it at a specified position. If the position is zero or less, it will be positioned at the beginning, if the position is the count or more, it will be positioned at the end.
org_kde_plasma_virtual_desktop_management
event desktop_created(
desktop_id: string,
position: uint,
)- desktop_id — Unique id of the desktop
- position — Position of this desktop, to ensure the client and the server will see desktops in the same order
Emitted when a new desktop has been created
Version 4
org_kde_plasma_virtual_desktop
request request_activate()
Requests this desktop to be activated
Request the server to set the status of this desktop to active: The server is free to consent or deny the request. This will be the new "current" virtual desktop of the system.
org_kde_plasma_virtual_desktop
event desktop_id(
desktop_id: string,
)- desktop_id — Unique id of the desktop
The desktop got an id
The format of the id is decided by the compositor implementation. A desktop id univocally identifies a virtual desktop and must be guaranteed to never exist two desktops with the same id. The format of the string id is up to the server implementation.
org_kde_plasma_virtual_desktop
event activated()
The desktop has been activated
The desktop will be the new "current" desktop of the system. The server may support either one virtual desktop active at a time, or other combinations such as one virtual desktop active per screen.
Windows associated to this virtual desktop will be shown.
org_kde_plasma_virtual_desktop
event done()
sent all information about desktops
This event is sent after all other properties has been
sent after binding to the desktop object and after any
other property changes done after that. This allows
changes to the org_kde_plasma_virtual_desktop properties to be seen as
atomic, even if they happen via multiple events.
org_kde_plasma_virtual_desktop
event removed()
This desktop has been removed
This virtual desktop has just been removed by the server:
All windows will lose the association to this desktop.
org_kde_plasma_virtual_desktop
event position(
index: uint,
)Available since version 3
- index — virtual desktop position
virtual desktop position
The position of the virtual desktop in the desktop list. The virtual
desktop position is in the [0, N - 1] range, where N is the number of
virtual desktops.
org_kde_plasma_virtual_desktop
event output_entered(
output_name: string,
)Available since version 4
- output_name — name of the output
This desktop became active on an output
This event is sent when the desktop becomes active on an output. The desktop can be active on multiple
outputs simultaneously. Each output has exactly one active desktop at a time (the one that entered it last).
org_kde_plasma_virtual_desktop
request request_enter_output(
output_name: string,
)Available since version 4
- output_name — name of the output
Requests this desktop to be activated on an output
Request the server to activate the desktop on a given output.
The server may deny the request.
If the request is granted, the server will deactivate the previous desktop on the output.
The server may activate the desktop on other outputs as well.
Copyright
SPDX-FileCopyrightText: 2013-2014 Pier Luigi Fiorini
SPDX-License-Identifier: LGPL-2.1-or-later
Version 8
Compositor Support
create shell windows and helpers
This interface is used by KF5 powered Wayland shells to communicate with
the compositor and can only be bound one time.
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
Version 8
metadata interface
An interface that may be implemented by a wl_surface, for
implementations that provide the shell user interface.
It provides requests to set surface roles, assign an output
or set the position in output coordinates.
On the server side the object is automatically destroyed when
the related wl_surface is destroyed. On client side,
org_kde_plasma_surface.destroy() must be called before
destroying the wl_surface object.
org_kde_plasma_surface
request set_position(
x: int,
y: int,
)- x — x coordinate in global space
- y — y coordinate in global space
change the shell surface position
Move the surface to new coordinates.
Coordinates are global, for example 50,50 for a 1920,0+1920x1080 output
is 1970,50 in global coordinates space.
Use org_kde_plasma_surface.set_output to assign an output
to this surface.
org_kde_plasma_surface
enum role {
normal = 0,
desktop = 1,
panel = 2,
onscreendisplay = 3,
notification = 4,
tooltip = 5,
criticalnotification = 6,
appletpopup = 7,
}org_kde_plasma_surface
request set_role(
role: uint,
)assign a role to this surface
Assign a role to a shell surface.
The compositor handles surfaces depending on their role.
See the explanation below.
This request fails if the surface already has a role, this means
the surface role may be assigned only once.
== Surfaces with splash role ==
Splash surfaces are placed above every other surface during the
shell startup phase.
The surfaces are placed according to the output coordinates.
No size is imposed to those surfaces, the shell has to resize
them according to output size.
These surfaces are meant to hide the desktop during the startup
phase so that the user will always see a ready to work desktop.
A shell might not create splash surfaces if the compositor reveals
the desktop in an alternative fashion, for example with a fade
in effect.
That depends on how much time the desktop usually need to prepare
the workspace or specific design decisions.
This specification doesn't impose any particular design.
When the startup phase is finished, the shell will send the
org_kde_plasma.desktop_ready request to the compositor.
== Surfaces with desktop role ==
Desktop surfaces are placed below all other surfaces and are used
to show the actual desktop view with icons, search results or
controls the user will interact with. What to show depends on the
shell implementation.
The surfaces are placed according to the output coordinates.
No size is imposed to those surfaces, the shell has to resize
them according to output size.
Only one surface per output can have the desktop role.
== Surfaces with dashboard role ==
Dashboard surfaces are placed above desktop surfaces and are used to
show additional widgets and controls.
The surfaces are placed according to the output coordinates.
No size is imposed to those surfaces, the shell has to resize
them according to output size.
Only one surface per output can have the dashboard role.
== Surfaces with config role ==
A configuration surface is shown when the user wants to configure
panel or desktop views.
Only one surface per output can have the config role.
TODO: This should grab the input like popup menus, right?
== Surfaces with overlay role ==
Overlays are special surfaces that shows for a limited amount
of time. Such surfaces are useful to display things like volume,
brightness and status changes.
Compositors may decide to show those surfaces in a layer above
all surfaces, even full screen ones if so is desired.
== Surfaces with notification role ==
Notification surfaces display informative content for a limited
amount of time. The compositor may decide to show them in a corner
depending on the configuration.
These surfaces are shown in a layer above all other surfaces except
for full screen ones.
== Surfaces with lock role ==
The lock surface is shown by the compositor when the session is
locked, users interact with it to unlock the session.
Compositors should move lock surfaces to 0,0 in output
coordinates space and hide all other surfaces for security sake.
For the same reason it is recommended that clients make the
lock surface as big as the screen.
Only one surface per output can have the lock role.
org_kde_plasma_surface
enum panel_behavior {
always_visible = 1,
auto_hide = 2,
windows_can_cover = 3,
windows_go_below = 4,
}- always_visible
normal panel visibility
The panel is on top of other surfaces, windows cannot cover (full screen
windows excluded).
- auto_hide
hide automatically
The panel is hidden automatically and restored when the mouse is over.
- windows_can_cover
windows can cover
Windows can cover the panel.
- windows_go_below
windows go below
Maximized windows take the whole screen space but the panel is above
the windows.
Behavior for panel surface
org_kde_plasma_surface
request set_panel_behavior(
flag: uint,
)- flag — panel_behavior enum value
set or unset the panel
Set flags bitmask as described by the flag enum.
Pass 0 to unset any flag, the surface will adjust its behavior to
the default.
Deprecated in Plasma 6. Setting this flag will have no effect. Applications should use layer shell where appropriate.
org_kde_plasma_surface
request set_skip_taskbar(
skip: uint,
)Available since version 2
- skip — Boolean value that sets whether to skip the taskbar
make the window skip the taskbar
Setting this bit to the window, will make it say it prefers to not be listed in the taskbar. Taskbar implementations may or may not follow this hint.
org_kde_plasma_surface
enum error {
panel_not_auto_hide = 0,
}Available since version 4
- panel_not_auto_hide — Request panel_auto_hide performed on a surface which does not correspond to an auto-hide panel.
org_kde_plasma_surface
request panel_auto_hide_hide()
Available since version 4
Hide the auto-hiding panel
A panel surface with panel_behavior auto_hide can perform this request to hide the panel
on a screen edge without unmapping it. The compositor informs the client about the panel
being hidden with the event auto_hidden_panel_hidden.
The compositor will restore the visibility state of the
surface when the pointer touches the screen edge the panel borders. Once the compositor restores
the visibility the event auto_hidden_panel_shown will be sent. This event will also be sent
if the compositor is unable to hide the panel.
The client can also request to show the panel again with the request panel_auto_hide_show.
org_kde_plasma_surface
request panel_auto_hide_show()
Available since version 4
Show the auto-hiding panel
A panel surface with panel_behavior auto_hide can perform this request to show the panel
again which got hidden with panel_auto_hide_hide.
org_kde_plasma_surface
request set_skip_switcher(
skip: uint,
)Available since version 5
- skip — Boolean value that sets whether to skip the window switcher.
make the window not appear in a switcher
Setting this bit will indicate that the window prefers not to be listed in a switcher.
org_kde_plasma_surface
request open_under_cursor()
Available since version 7
open under cursor
Request the initial position of this surface to be under the current
cursor position. Has to be called before attaching any buffer to this surface.
Copyright
SPDX-FileCopyrightText: 2013-2014 Pier Luigi Fiorini
SPDX-License-Identifier: LGPL-2.1-or-later
Version 22
application windows management
This interface manages application windows.
It provides requests to show and hide the desktop and emits
an event every time a window is created so that the client can
use it to manage the window.
Only one client can bind this interface at a time.
This global must be bound with a version at least 17.
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
org_kde_plasma_window_management
enum state {
active = 0x1,
minimized = 0x2,
maximized = 0x4,
fullscreen = 0x8,
keep_above = 0x10,
keep_below = 0x20,
on_all_desktops = 0x40,
demands_attention = 0x80,
closeable = 0x100,
minimizable = 0x200,
maximizable = 0x400,
fullscreenable = 0x800,
skiptaskbar = 0x1000,
shadeable = 0x2000,
shaded = 0x4000,
movable = 0x8000,
resizable = 0x10000,
virtual_desktop_changeable = 0x20000,
skipswitcher = 0x40000,
no_border = 0x80000,
can_set_no_border = 0x100000,
exclude_from_capture = 0x200000,
movable_across_screens = 0x400000,
}- skiptaskbar
Available since version 2
- shadeable
Available since version 3
- shaded
Available since version 3
- movable
Available since version 3
- resizable
Available since version 3
- virtual_desktop_changeable
Available since version 3
- skipswitcher
Available since version 9
- no_border
Available since version 19
- can_set_no_border
Available since version 19
- exclude_from_capture
Available since version 20
- movable_across_screens
Available since version 22
org_kde_plasma_window_management
event show_desktop_changed(
state: uint,
)notify the client when the show desktop mode is entered/left
This event will be sent whenever the show desktop mode changes. E.g. when it is entered
or left.
On binding the interface the current state is sent.
org_kde_plasma_window_management
event window(
id: uint,
)- id — Deprecated: internal window Id
notify the client that a window was mapped
This event will be sent immediately after a window is mapped.
org_kde_plasma_window_management
event stacking_order_changed(
ids: array,
)Available since version 11
- ids — internal windows id array
notify the client when stacking order changed
This event will be sent when stacking order changed and on bind.
With version 17 this event is deprecated and will no longer be sent.
org_kde_plasma_window_management
event stacking_order_uuid_changed(
uuids: string,
)Available since version 12
- uuids — internal windows id ;-separated
notify the client when stacking order changed
This event will be sent when stacking order changed and on bind.
With version 17 this event is deprecated and will no longer be sent.
org_kde_plasma_window_management
event window_with_uuid(
id: uint,
uuid: string,
)Available since version 13
- id — Deprecated: internal window Id
- uuid — internal window uuid
notify the client that a window was mapped
This event will be sent immediately after a window is mapped.
Version 21
interface to control application windows
Manages and control an application window.
Only one client can bind this interface at a time.
org_kde_plasma_window
request set_state(
flags: uint,
state: uint,
)- flags — bitfield of set state flags
- state — bitfield of state flags
set window state
Set window state.
Values for state argument are described by org_kde_plasma_window_management.state
and can be used together in a bitfield. The flags bitfield describes which flags are
supposed to be set, the state bitfield the value for the set flags
org_kde_plasma_window
request set_virtual_desktop(
number: uint,
)- number — zero based virtual desktop number
map window on a virtual desktop
Deprecated: use enter_virtual_desktop
Maps the window to a different virtual desktop.
To show the window on all virtual desktops, call the
org_kde_plasma_window.set_state request and specify a on_all_desktops
state in the bitfield.
org_kde_plasma_window
request set_minimized_geometry(
panel: object<wl_surface>,
x: uint,
y: uint,
width: uint,
height: uint,
)set the geometry for a taskbar entry
Sets the geometry of the taskbar entry for this window.
The geometry is relative to a panel in particular.
org_kde_plasma_window
event virtual_desktop_changed(
number: int,
)- number — zero based virtual desktop number
window was moved to another workspace
DEPRECATED: use virtual_desktop_entered and virtual_desktop_left instead
This event will be sent when a window is moved to another
virtual desktop.
It is not sent if it becomes visible on all virtual desktops though.
org_kde_plasma_window
event unmapped()
window's surface was unmapped
This event will be sent immediately after the window is closed
and its surface is unmapped.
org_kde_plasma_window
event initial_state()
Available since version 4
All initial known state is submitted
This event will be sent immediately after all initial state been sent to the client.
org_kde_plasma_window
event geometry(
x: int,
y: int,
width: uint,
height: uint,
)Available since version 6
- x — x position of the org_kde_plasma_window
- y — y position of the org_kde_plasma_window
- width — width of the org_kde_plasma_window
- height — height of the org_kde_plasma_window
The geometry of this window in absolute coordinates
This event will be sent whenever the window geometry of this org_kde_plasma_window changes.
The coordinates are in absolute coordinates of the windowing system.
org_kde_plasma_window
request get_icon(
fd: fd,
)Available since version 7
- fd — file descriptor for the icon
Requests to get the window icon
The compositor will write the window icon into the provided file descriptor.
The data is a serialized QIcon with QDataStream.
org_kde_plasma_window
event icon_changed()
Available since version 7
The icon of the window changed
This event will be sent whenever the icon of the window changes, but there is no themed
icon name. Common examples are Xwayland windows which have a pixmap based icon.
The client can request the icon using get_icon.
org_kde_plasma_window
event pid_changed(
pid: uint,
)Available since version 8
process id of application owning the window has changed
This event will be sent when the compositor has set the process id this window belongs to.
This should be set once before the initial_state is sent.
org_kde_plasma_window
request request_enter_virtual_desktop(
id: string,
)Available since version 8
map window on a virtual desktop
Make the window enter a virtual desktop. A window can enter more
than one virtual desktop. if the id is empty or invalid, no action will be performed.
org_kde_plasma_window
request request_enter_new_virtual_desktop()
Available since version 8
map window on a virtual desktop
RFC: do this with an empty id to request_enter_virtual_desktop?
Make the window enter a new virtual desktop. If the server consents the request,
it will create a new virtual desktop and assign the window to it.
org_kde_plasma_window
event virtual_desktop_entered(
id: string,
)Available since version 8
the window entered a new virtual desktop
This event will be sent when the window has entered a new virtual desktop. The window can be on more than one desktop, or none: then is considered on all of them.
org_kde_plasma_window
event virtual_desktop_left(
is: string,
)Available since version 8
the window left a virtual desktop
This event will be sent when the window left a virtual desktop. If the window leaves all desktops, it can be considered on all.
If the window gets manually added on all desktops, the server has to send virtual_desktop_left for every previous desktop it was in for the window to be really considered on all desktops.
Available since version 10
notify the client that the current appmenu changed
This event will be sent after the application menu
for the window has changed.
org_kde_plasma_window
request request_enter_activity(
id: string,
)Available since version 14
map window on an activity
Make the window enter an activity. A window can enter more activity. If the id is empty or invalid, no action will be performed.
org_kde_plasma_window
request request_leave_activity(
id: string,
)Available since version 14
remove a window from an activity
Make the window exit a an activity. If it exits all activities it will be considered on all of them.
org_kde_plasma_window
event activity_entered(
id: string,
)Available since version 14
the window entered an activity
This event will be sent when the window has entered an activity. The window can be on more than one activity, or none: then is considered on all of them.
org_kde_plasma_window
event activity_left(
id: string,
)Available since version 14
the window left an activity
This event will be sent when the window left an activity. If the window leaves all activities, it will be considered on all.
If the window gets manually added on all activities, the server has to send activity_left for every previous activity it was in for the window to be really considered on all activities.
org_kde_plasma_window
event resource_name_changed(
resource_name: string,
)Available since version 16
- resource_name — resource name
X11 resource name has changed
This event will be sent when the X11 resource name of the window has changed.
This is only set for XWayland windows.
org_kde_plasma_window
event client_geometry(
x: int,
y: int,
width: uint,
height: uint,
)Available since version 18
- x — x position of the org_kde_plasma_window
- y — y position of the org_kde_plasma_window
- width — width of the org_kde_plasma_window
- height — height of the org_kde_plasma_window
The client geometry (i.e. without decorations etc) of this window in absolute coordinates
This event will be sent whenever the window geometry of this org_kde_plasma_window changes.
The coordinates are in absolute coordinates of the windowing system.
org_kde_plasma_window
event mapped()
Available since version 21
ready for painting
Specifies that the window is ready for painting. A window can be
mapped some time later after getting created. This event may be sent
before or after the initial_state event.
Version 1
- destroy — destroy the activation manager object
- activation — notify that an app is starting
activation feedback
The activation manager interface provides a way to get notified
when an application is about to be activated.
org_kde_plasma_activation_feedback
request destroy()
Destructor
destroy the activation manager object
Destroy the activation manager object. The activation objects introduced
by this manager object will be unaffected.
Version 1
- destroy — destroy the org_kde_plasma_activation object
- app_id — Offers the app_id
- finished — Notifies about activation finished, either by activation or because it got invalidated
Version 21
- window — a window in the stacking order list
- done — marks the end of the list
helper object for sending the stacking order
When this object is created, the compositor sends a window event for
each window in the stacking order, and afterwards sends the done event
and destroys this object.
Copyright
SPDX-FileCopyrightText: 2020-2021 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.1-or-later
Version 6
Protocol for managing PipeWire feeds of the different displays and windows
Warning! The protocol described in this file is a desktop environment
implementation detail. Regular clients must not use this protocol.
Backward incompatible changes may be added without bumping the major
version of the extension.
zkde_screencast_unstable_v1
enum pointer {
hidden = 1,
embedded = 2,
metadata = 4,
}- hidden — No cursor
- embedded — Render the cursor on the stream
- metadata — Send metadata about where the cursor is through PipeWire
Stream consumer attachment attributes
zkde_screencast_unstable_v1
request stream_virtual_output(
stream: new_id<zkde_screencast_stream_unstable_v1>,
name: string,
width: int,
height: int,
scale: fixed,
pointer: uint,
)Available since version 2
- name — name of the created output
- width — Logical width resolution
- height — Logical height resolution
- scale — Scaling factor of the display where it's to be displayed
- pointer — Requested pointer mode
requests a feed from a new virtual output
zkde_screencast_unstable_v1
request stream_region(
stream: new_id<zkde_screencast_stream_unstable_v1>,
x: int,
y: int,
width: uint,
height: uint,
scale: fixed,
pointer: uint,
)Available since version 3
- x — Logical left position
- y — Logical top position
- width — Logical width resolution
- height — Logical height resolution
- scale — Scaling factor of the output recording
- pointer — Requested pointer mode
requests a feed from region in the workspace
Since version 5, the compositor will choose the highest scale
factor for the region if the given scale is 0.0.
zkde_screencast_unstable_v1
request stream_virtual_output_with_description(
stream: new_id<zkde_screencast_stream_unstable_v1>,
name: string,
description: string,
width: int,
height: int,
scale: fixed,
pointer: uint,
)Available since version 4
- name — name of the created output
- description — user visible description of the created output
- width — Logical width resolution
- height — Logical height resolution
- scale — Scaling factor of the display where it's to be displayed
- pointer — Requested pointer mode
requests a feed from a new virtual output
Version 6
- close — Indicates we are done with the stream and the communication is over.
- closed — Notifies that the server has stopped the stream. Clients should now call close.
- created — Notifies about a pipewire feed being created
- failed — Offers an error message so the client knows the created event will not arrive, and the client should close the resource.
- serial — the pipewire object serial
zkde_screencast_stream_unstable_v1
event created(
node: uint,
)Deprecated since version 6
- node — node of the pipewire buffer
Notifies about a pipewire feed being created
Deprecated since version 6, use the object serial from the serial event instead
zkde_screencast_stream_unstable_v1
event failed(
error: string,
)- error — A human readable translated error message.
Offers an error message so the client knows the created event will not arrive, and the client should close the resource.
zkde_screencast_stream_unstable_v1
event serial(
object_serial_hi: uint,
object_serial_low: uint,
)Available since version 6
- object_serial_hi — high bits of the pipewire object serial
- object_serial_low — low bits of the pipewire object serial
the pipewire object serial
The pipewire object serial of the stream. Should be preferred over the node id which is prone to id reuse.
Will be sent before the created event.
Copyright
SPDX-FileCopyrightText: © 2025 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
manage seats and input devices
This protocol supports creating/destroying seats, assigning input devices to
seats, and configuring input devices (e.g. setting keyboard repeat rate).
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Version 2
input manager global interface
Input manager global interface.
river_input_manager_v1
request stop()
stop sending events
This request indicates that the client no longer wishes to receive
events on this object.
The Wayland protocol is asynchronous, which means the server may send
further events until the stop request is processed. The client must wait
for a river_input_manager_v1.finished event before destroying this
object.
river_input_manager_v1
request destroy()
Destructor
destroy the river_input_manager_v1 object
This request should be called after the finished event has been received
to complete destruction of the object.
It is a protocol error to make this request before the finished event
has been received.
If a client wishes to destroy this object it should send a
river_input_manager_v1.stop request and wait for a
river_input_manager_v1.finished event. Once the finished event is
received it is safe to destroy this object and any other objects created
through this interface.
river_input_manager_v1
request create_seat(
name: string,
)create a new seat
Create a new seat with the given name. Has no effect if a seat with the
given name already exists.
The default seat with name "default" always exists and does not need to
be explicitly created.
river_input_manager_v1
request destroy_seat(
name: string,
)destroy a seat
Destroy the seat with the given name. Has no effect if a seat with the
given name does not exist.
The default seat with name "default" cannot be destroyed and attempting
to destroy it will have no effect.
Any input devices assigned to the destroyed seat at the time of
destruction are assigned to the default seat.
Version 2
an input device
An input device represents a physical keyboard, mouse, touchscreen, or
drawing tablet tool. It is assigned to exactly one seat at a time.
By default, all input devices are assigned to the default seat.
river_input_device_v1
request destroy()
Destructor
destroy the input device object
This request indicates that the client will no longer use the input
device object and that it may be safely destroyed.
river_input_device_v1
event name(
name: string,
)the name of the input device
The name of the input device. This event is sent once when the
river_input_device_v1 object is created. The device name cannot
change during the lifetime of the object.
river_input_device_v1
request assign_to_seat(
name: string,
)assign the input device to a seat
Assign the input device to a seat. All input devices not explicitly
assigned to a seat are considered assigned to the default seat.
Has no effect if a seat with the given name does not exist.
river_input_device_v1
request set_repeat_info(
rate: int,
delay: int,
)- rate — rate in key repeats per second
- delay — delay in milliseconds
set keyboard repeat rate and delay
Set repeat rate and delay for a keyboard input device. Has no effect if
the device is not a keyboard.
Negative values for either rate or delay are illegal. A rate of zero
will disable any repeating (regardless of the value of delay).
river_input_device_v1
request set_scroll_factor(
factor: fixed,
)set scroll factor
Set the scroll factor for a pointer input device. Has no effect if the
device is not a pointer.
For example, a factor of 0.5 will make scrolling twice as slow while a
factor of 3.0 will make scrolling 3 times as fast.
Setting a scroll factor less than 0 is a protocol error.
river_input_device_v1
request map_to_output(
output: nullable object<wl_output>,
)map input device to the given output
Map the input device to the given output. Has no effect if the device is
not a pointer, touch, or tablet device.
If mapped to both an output and a rectangle, the rectangle has priority.
Passing null clears an existing mapping.
river_input_device_v1
request map_to_rectangle(
x: int,
y: int,
width: int,
height: int,
)map input device to the given rectangle
Map the input device to the given rectangle in the global compositor
coordinate space. Has no effect if the device is not a pointer, touch,
or tablet device.
If mapped to both an output and a rectangle, the rectangle has priority.
Width and height must be greater than or equal to 0.
Passing 0 for width or height clears an existing mapping.
river_input_device_v1
event done()
Available since version 2
all information has been sent
This event is sent after all information about the input device has
been sent.
This allows changes to one or more river_input_device_v1 properties to
be seen as atomic, even if they happen via multiple events.
Copyright
SPDX-FileCopyrightText: © 2025 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
optional layer shell support
This protocol allows the river-window-management-v1 window manager to
support the wlr-layer-shell-unstable-v1 protocol.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Version 1
river layer shell global interface
This global interface should only be advertised to the client if the
river_window_manager_v1 global is also advertised. Binding this interface
indicates that the window manager supports layer shell.
If the window manager does not bind this interface, the compositor should
not allow clients to map layer surfaces. This can be achieved by
closing layer surfaces immediately.
river_layer_shell_v1
enum error {
object_already_created = 0,
}- object_already_created — the layer_shell_output/seat object was already created.
Version 1
layer shell output state
The lifetime of this object is tied to the corresponding river_output_v1.
This object is made inert when the river_output_v1.removed event is sent
and should be destroyed.
river_layer_shell_output_v1
event non_exclusive_area(
x: int,
y: int,
width: int,
height: int,
)- x — global x coordinate
- y — global y coordinate
- width — area width
- height — area height
area left after subtracting exclusive zones
This event indicates the area of the output remaining after subtracting
the exclusive zones of layer surfaces. Exclusive zones are a hint, the
window manager is free to ignore this area hint if it wishes.
The x and y values are in the global coordinate space, not relative to
the position of the output.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_layer_shell_output_v1
request set_default()
Set default output for layer surfaces
Mark this output as the default for new layer surfaces which do not
request a specific output themselves. This request overrides any
previous set_default request on any river_layer_shell_output_v1 object.
If no set_default request is made or if the default output is destroyed,
the default output is undefined until the next set_default request.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
Version 1
layer shell seat state
The lifetime of this object is tied to the corresponding river_seat_v1.
This object is made inert when the river_seat_v1.removed event is sent and
should be destroyed.
river_layer_shell_seat_v1
event focus_exclusive()
layer shell surface has exclusive focus
A layer shell surface will be given exclusive keyboard focus at the end
of the manage sequence in which this event is sent. The window manager
may want to update window decorations or similar to indicate that no
window is focused.
Until the focus_non_exclusive or focus_none event is sent, all window
manager requests to change focus are ignored.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_layer_shell_seat_v1
event focus_non_exclusive()
layer shell surface wants non-exclusive focus
A layer shell surface will be given non-exclusive keyboard focus at the
end of the manage sequence in which this event is sent. The window
manager may want to update window decorations or similar to indicate
that no window is focused.
The window manager continues to control focus and may choose to focus a
different window/shell surface at any time. If the window manager sets
focus during the same manage sequence in which this event is sent, the
layer surface will not be focused.
If the layer surface with non-exclusive focus is closed or the window
manager chooses to move focus away from the layer surface, a focus_none
event will be sent in the next manage sequence.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_layer_shell_seat_v1
event focus_none()
no layer shell surface has focus
No layer shell surface will have keyboard focus at the end of the manage
sequence in which this event is sent. The window manager may want to
return focus to whichever window last had focus, for example.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
Copyright
SPDX-FileCopyrightText: © 2025 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
configure libinput devices
This protocol exposes libinput device configuration APIs. The libinput
documentation should be referred to for detailed information on libinput's
behavior.
Note that the compositor will not be able to expose libinput devices through
this protocol when it does not have access to the hardware, for example when
running nested in another Wayland compositor or X11 session.
This protocol is designed so that (hopefully) any backwards compatible
change to libinput's API can be matched with a backwards compatible change
to this protocol.
Note: the libinput API uses floating point types (float and double in C)
which are not (yet?) natively supported by the Wayland protocol. However,
the Wayland protocol does support sending arbitrary bytes through the array
argument type. This protocol uses e.g. type="array" summary="double" to
indicate a native-endian IEEE-754 64-bit double value.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Version 2
libinput config global interface
Global interface for configuring libinput devices. This global should
only be advertised if river_input_manager_v1 is advertised as well.
river_libinput_config_v1
request stop()
stop sending events
This request indicates that the client no longer wishes to receive
events on this object.
The Wayland protocol is asynchronous, which means the server may send
further events until the stop request is processed. The client must wait
for a river_libinput_config_v1.finished event before destroying this
object.
river_libinput_config_v1
request destroy()
Destructor
destroy the river_libinput_config_v1 object
This request should be called after the finished event has been received
to complete destruction of the object.
It is a protocol error to make this request before the finished event
has been received.
If a client wishes to destroy this object it should send a
river_libinput_config_v1.stop request and wait for a
river_libinput_config_v1.finished event. Once the finished event is
received it is safe to destroy this object and any other objects created
through this interface.
Version 2
a libinput device
In general, *_support events will be sent exactly once directly after the
river_libinput_device_v1 is created. *_default events will be sent after
*_support events if the config option is supported, and *_current events
willl be sent after the *_default events and again whenever the config
option is changed.
river_libinput_device_v1
request destroy()
Destructor
destroy the libinput device object
This request indicates that the client will no longer use the input
device object and that it may be safely destroyed.
river_libinput_device_v1
event tap_support(
finger_count: int,
)tap-to-click/drag support
The number of fingers supported for tap-to-click/drag.
If finger_count is 0, tap-to-click and drag are unsupported.
river_libinput_device_v1
request set_drag_lock(
result: new_id<river_libinput_result_v1>,
state: uint<drag_lock_state>,
)set drag lock state
Configure drag-lock during tapping on this device. When enabled, a
finger may be lifted and put back on the touchpad and the drag process
continues. A timeout for lifting the finger is optional. When disabled,
lifting the finger during a tap-and-drag will immediately stop the drag.
See the libinput documentation for more details.
river_libinput_device_v1
request set_accel_speed(
result: new_id<river_libinput_result_v1>,
speed: array,
)set acceleration speed
Set the acceleration speed within a range of [-1, 1], where 0 is
the default acceleration for this device, -1 is the slowest acceleration
and 1 is the maximum acceleration available on this device.
river_libinput_device_v1
event dwtp_support(
supported: int,
)support for disable-while-trackpointing
Disable-while-trackpointing is supported if the supported argument is
non-zero.
river_libinput_device_v1
event done()
Available since version 2
all information has been sent
This event is sent after all information about the libinput device has
been sent.
This allows changes to one or more river_libinput_device_v1 properties
to be seen as atomic, even if they happen via multiple events.
Version 1
acceleration config
The result returned by libinput on setting configuration for a device.
river_libinput_accel_config_v1
request destroy()
Destructor
destroy the accel object
This request indicates that the client will no longer use the accel
config object and that it may be safely destroyed.
Version 1
config application result
The result returned by libinput on setting configuration for a device.
Copyright
SPDX-FileCopyrightText: © 2026 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
define touchscreen gestures
This protocol allows the river-window-management-v1 window manager to
define touchscreen gestures and the conditions under which they should be
triggered. It also provides continuous updates on e.g. motion and pinch
scale while a gesture is in progress.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Version 1
touch gestures global interface
This global interface should only be advertised to the client if the
river_window_manager_v1 global is also advertised.
Version 1
touch gestures seat
This object manages touch gesture state associated with a specific seat.
river_touch_gestures_seat_v1
request destroy()
Destructor
destroy the gestures seat object
This request indicates that the client will no longer use the gestures
seat object and that it may be safely destroyed.
river_touch_gestures_seat_v1
request set_arbitration_timeout(
msec: uint,
)- msec — arbitration timeout in milliseconds
define a new gesture
The arbitration timeout defines the maximum time after the first touch
down event the compositor should wait before deciding that the touch
sequence is not a gesture and instead routing the touch input to the
respective clients through the wl_touch interface.
This timeout should be short enough that it subjectively does not
negatively impact the responsiveness. The default if this request is
never made for the river_touch_gestures_seat_v1 is 100 milliseconds.
Setting the timeout to 0 milliseconds effectively disables all gestures
with e.g. a finger count greater than 1 or with a non-zero motion
threshold. However, a gesture with finger count 1 and edge trigger area
defined with the river_touch_gesture_v1.set_edge request could still be
triggered even with a 0 millisecond arbitration timeout.
This request may be made at any time but will only take effect on the
next touch sequence to be started.
river_touch_gestures_seat_v1
request get_gesture(
id: new_id<river_touch_gesture_v1>,
finger_count: uint,
)- finger_count — number of touch points
define a new gesture
Define a new touch gesture.
The finger_count argument defines the number of simultaneous touch
points necessary to trigger the gesture. The finger_count must be
greater than 0.
The maximum finger count supported is limited by touchscreen hardware.
If the requested finger count is greater than the maximum supported,
the gesture will never be triggered.
The new gesture is not enabled until the river_touch_gesture_v1.enable
request is made during a manage sequence.
Version 1
define a touch gesture, receive trigger events
Define the requirements for a gesture to be triggered and receive
information on e.g. motion and pinch scale when triggered.
river_touch_gesture_v1
request destroy()
Destructor
destroy the touch gesture object
This request indicates that the client will no longer use the object and
that it may be safely destroyed.
river_touch_gesture_v1
request enable()
enable the gesture
This request should be made after all initial configuration has been
completed and the window manager wishes the gesture to be able to be
triggered.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_touch_gesture_v1
request disable()
disable the gesture
This request may be used to temporarily disable the gesture. It may
be later re-enabled with the enable request.
This request does not affect an in progress gesture that has already
been started. It will prevent the gesture from being triggered again.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_touch_gesture_v1
event start()
gesture started
This event is sent when the required finger_count number of touch points
are active and all threshold requirements are met. After this event is
sent, no other gesture will be triggered until all touch points are
released and the river_touch_gesture_v1.end event is sent.
If the threshold requirements for multiple river_touch_gesture_v1
objects are met at the same time, it is compositor policy which gesture
is triggered.
The wl_touch.cancel event is sent to all surfaces with touch focus, all
touch input is eaten till end of gesture.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_touch_gesture_v1
event end()
gesture ended
All touch points have been released and the gesture is ended.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_touch_gesture_v1
event cancel()
gesture canceled
The gesture is canceled, for example because the hardware palm detection
decided that the touch input should have been ignored.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_touch_gesture_v1
event finger_count(
finger_count: uint,
)- finger_count — number of touch points
number of touch points changed
The number of active touch points changed since the gesture was started.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_touch_gesture_v1
event delta_motion(
dx: int,
dy: int,
)- dx — centroid change in x
- dy — centroid change in y
total change in centroid position
The total change in centroid position since gesture start.
The centroid is defined as the mean position of all touch points.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_touch_gesture_v1
event scale(
scale: fixed,
)current pinch scale
The pinch distance is defined as the diagonal of the bounding box of all
touch points. The pinch scale is defined as the ratio of the current
pinch distance to the distance at gesture start.
Thus, the scale is initially 1.0. If the touch points are moved closer
together, the scale decreases and if the touch points are moved further
apart it increases.
This event is only sent if there are 2 or more touch points.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_touch_gesture_v1
request set_threshold_motion(
min_distance: int,
)- min_distance — minimum distance to trigger
set centroid motion threshold to trigger
Set the minimum centroid motion required to trigger the gesture.
Distance is measured between the current centroid and the centroid of
the touch down events.
If this request is never made, the threshold is considered to be 0.
The threshold argument must be greater than or equal to 0.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_touch_gesture_v1
request set_direction(
direction: uint<direction>,
min_distance: int,
)- direction — motion direction
- min_distance — minimum distance to trigger
set centroid motion direction to trigger
Set the direction and minimum centroid motion distance required to
trigger the gesture.
If direction is none, there is no directional motion required to trigger
the gesture and the min_distance argument is ignored.
If this request is never made, the direction is considered to be none.
The min_distance argument must be greater than or equal to 0.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_touch_gesture_v1
request set_threshold_scale(
in: fixed,
out: fixed,
)- in — inward pinch scale threshold
- out — outward pinch scale threshold
set pinch scale threshold to trigger
Set the pinch scale threshold required to trigger the gesture.
If threshold_scale is less than 1.0 then the scale must be less than
threshold_scale for the gesture to be triggered. If threshold_scale is
greater than 1.0 then the scale must be greater than threshold_scale for
the gesture to be triggered.
If this request is never made, threshold_scale is considered to be 1.0.
This request is ignored if the gesture's finger_count is less than 2.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_touch_gesture_v1
request set_edge(
edge: uint<edge>,
max_distance: int,
)- edge — edge to start from
- max_distance — max distance from edge
set edge from which the gesture must start
Set the touchscreen edge from which the gesture must start and the
maximum allowed distance from that edge.
If edge is none, then there is no required edge to start from and the
max_distance argument is ignored.
If this request is never made, the edge is considered to be none.
The max_distance argument must be greater than or equal to 0.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
Copyright
SPDX-FileCopyrightText: © 2026 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
window manager keyboard event injection
This protocol gives the river-window-management-v1 window manager a
race-free way to send virtual keyboard events to the client with keyboard
focus as part of a window management manage sequence.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Version 1
river virtual global interface
This global interface should only be advertised to the client if the
river_window_manager_v1 global is also advertised.
river_virtual_keyboard_manager_v1
request destroy()
Destructor
destroy the river_virtual_keyboard_v1 object
This request indicates that the client will no longer use the
river_virtual_keyboard_v1 object.
Copyright
SPDX-FileCopyrightText: © 2024 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
frame-perfect window management
This protocol allows a single "window manager" client to determine the
window management policy of the compositor. State is globally
double-buffered allowing for frame perfect state changes involving multiple
windows.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Version 6
window manager global interface
This global interface should only be advertised to the window manager
process. Only one window management client may be active at a time. The
compositor should use the unavailable event if necessary to enforce this.
There are two disjoint categories of state managed by this protocol:
Window management state influences the communication between the
compositor and individual windows (e.g. xdg_toplevels). Window management
state includes window dimensions, fullscreen state, keyboard focus,
keyboard bindings, and more.
Rendering state only affects the rendered output of the compositor and
does not influence communication between the compositor and individual
windows. Rendering state includes the position and rendering order of
windows, shell surfaces, decoration surfaces, borders, and more.
Window management state may only be modified by the window manager as part
of a manage sequence. A manage sequence is started with the manage_start
event and ended with the manage_finish request. It is a protocol error to
modify window management state outside of a manage sequence.
A manage sequence is always followed by at least one render sequence. A
render sequence is started with the render_start event and ended with the
render_finish request.
Rendering state may be modified by the window manager during a manage
sequence or a render sequence. Regardless of when the rendering state is
modified, it is applied with the next render_finish request. It is a
protocol error to modify rendering state outside of a manage or render
sequence.
The server will start a manage sequence by sending new state and the
manage_start event as soon as possible whenever there is a change in state
that must be communicated with the window manager.
If the window manager client needs to ensure a manage sequence is started
due to a state change the compositor is not aware of, it may send the
manage_dirty request.
The server will start a render sequence by sending new state and the
render_start event as soon as possible whenever there is a change in
window dimensions that must be communicated with the window manager.
Multiple render sequences may be made consecutively without a manage
sequence in between, for example if a window independently changes its own
dimensions.
To summarize, the main loop of this protocol is as follows:
The server sends events indicating all changes since the last
manage sequence followed by the manage_start event.
The client sends requests modifying window management state or
rendering state (as defined above) followed by the manage_finish
request.
The server sends new state to windows and waits for responses.
The server sends new window dimensions to the client followed by the
render_start event.
The client sends requests modifying rendering state (as defined above)
followed by the render_finish request.
If window dimensions change, loop back to step 4.
If state that requires a manage sequence changes or if the client makes
a manage_dirty request, loop back to step 1.
For the purposes of frame perfection, the server may delay rendering new
state committed by the windows in step 3 until after step 5 is finished.
It is a protocol error for the client to make a manage_finish or
render_finish request that violates this ordering.
river_window_manager_v1
enum error {
sequence_order = 0,
role = 1,
unresponsive = 2,
}- sequence_order — request violates manage/render sequence ordering
- role — given wl_surface already has a role
- unresponsive — window manager unresponsive
river_window_manager_v1
event unavailable()
window management unavailable
This event indicates that window management is not available to the
client, perhaps due to another window management client already running.
The circumstances causing this event to be sent are compositor policy.
If sent, this event is guaranteed to be the first and only event sent by
the server.
The server will send no further events on this object. The client should
destroy this object and all objects created through this interface.
river_window_manager_v1
request stop()
stop sending events
This request indicates that the client no longer wishes to receive
events on this object.
The Wayland protocol is asynchronous, which means the server may send
further events until the stop request is processed. The client must wait
for a river_window_manager_v1.finished event before destroying this
object.
river_window_manager_v1
request destroy()
Destructor
destroy the river_window_manager_v1 object
This request should be called after the finished event has been received
to complete destruction of the object.
If a client wishes to destroy this object it should send a
river_window_manager_v1.stop request and wait for a
river_window_manager_v1.finished event. Once the finished event is
received it is safe to destroy this object and any other objects created
through this interface.
river_window_manager_v1
event manage_start()
start a manage sequence
This event indicates that the server has sent events indicating all
state changes since the last manage sequence.
In response to this event, the client should make requests modifying
window management state as it chooses. Then, the client must make the
manage_finish request.
See the description of the river_window_manager_v1 interface for a
complete overview of the manage/render sequence loop.
river_window_manager_v1
request manage_finish()
finish a manage sequence
This request indicates that the client has made all changes to window
management state it wishes to include in the current manage sequence and
that the server should atomically send these state changes to the
windows and continue with the manage sequence.
After sending this request, it is a protocol error for the client to
make further changes to window management state until the next
manage_start event is received.
See the description of the river_window_manager_v1 interface for a
complete overview of the manage/render sequence loop.
river_window_manager_v1
request manage_dirty()
ensure a manage sequence is started
This request ensures a manage sequence is started and that a
manage_start event is sent by the server. If this request is made during
an ongoing manage sequence, a new manage sequence will be started as
soon as the current one is completed.
The client may want to use this request due to an internal state change
that the compositor is not aware of (e.g. a dbus event) which should
affect window management or rendering state.
river_window_manager_v1
event render_start()
start a render sequence
This event indicates that the server has sent all
river_window_v1.dimensions events necessary.
In response to this event, the client should make requests modifying
rendering state as it chooses. Then, the client must make the
render_finish request.
See the description of the river_window_manager_v1 interface for a
complete overview of the manage/render sequence loop.
river_window_manager_v1
request render_finish()
finish a render sequence
This request indicates that the client has made all changes to rendering
state it wishes to include in the current manage sequence and that the
server should atomically apply and display these state changes to the
user.
After sending this request, it is a protocol error for the client to
make further changes to rendering state until the next manage_start or
render_start event is received, whichever comes first.
See the description of the river_window_manager_v1 interface for a
complete overview of the manage/render sequence loop.
river_window_manager_v1
event session_locked()
the session has been locked
This event indicates that the session has been locked.
The window manager may wish to restrict which key bindings are available
while locked or otherwise use this information.
If the session is currently locked when the river_window_manager_v1
object is created, the session_locked event will be sent in the first
manage sequence.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_manager_v1
event session_unlocked()
the session has been unlocked
This event indicates that the session has been unlocked.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_manager_v1
event output(
id: new_id<river_output_v1>,
)new output
A new logical output has been created, perhaps due to a new physical
monitor being plugged in or perhaps due to a change in configuration.
This event will be followed by river_output_v1.position and dimensions
events as well as a manage_start event after all other new state has
been sent by the server.
river_window_manager_v1
event seat(
id: new_id<river_seat_v1>,
)new seat
A new seat has been created.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_manager_v1
request exit_session()
Available since version 4
exit the Wayland session
End the current Wayland session and exit the compositor.
All Wayland clients running in the current session, including
the window manager, will be disconnected.
Window managers should only make this request if the user explicitly
asks to exit the Wayland session, not for example on normal window
manager termination.
Version 6
a logical window
This represents a logical window. For example, a window may correspond to
an xdg_toplevel or Xwayland window.
A newly created window will not be displayed until the window manager
makes a propose_dimensions or fullscreen request as part of a manage
sequence, the server replies with a dimensions event as part of a render
sequence, and that render sequence is finished.
river_window_v1
enum error {
node_exists = 0,
invalid_dimensions = 1,
invalid_border = 2,
invalid_clip_box = 3,
}- node_exists — window already has a node object
- invalid_dimensions — proposed dimensions out of bounds
- invalid_border — invalid arg to set_borders
- invalid_clip_box — invalid arg to set_clip_box
river_window_v1
event closed()
the window has been closed
The window has been closed by the server, perhaps due to an
xdg_toplevel.close request or similar.
The server will send no further events on this object and ignore any
request other than river_window_v1.destroy made after this event is
sent. The client should destroy this object with the
river_window_v1.destroy request to free up resources.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
request close()
request that the window be closed
Request that the window be closed. The window may ignore this request or
only close after some delay, perhaps opening a dialog asking the user to
save their work or similar.
The server will send a river_window_v1.closed event if/when the window
has been closed.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request get_node(
id: new_id<river_node_v1>,
)get the window's render list node
Get the node in the render list corresponding to the window.
It is a protocol error to make this request more than once for a single
window.
river_window_v1
event dimensions_hint(
min_width: int,
min_height: int,
max_width: int,
max_height: int,
)- min_width — minimum width
- min_height — minimum height
- max_width — maximum width
- max_height — maximum height
the window's preferred min/max dimensions
This event informs the window manager of the window's preferred min/max
dimensions. These preferences are a hint, and the window manager is free
to propose dimensions outside of these bounds.
All min/max width/height values must be strictly greater than or equal
to 0. A value of 0 indicates that the window has no preference for that
value.
If the max_width/max_height is greater than 0, the min_width/min_height
must be strictly less than or equal to the max_width/max_height.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event dimensions(
width: int,
height: int,
)- width — window content width
- height — window content height
window dimensions
This event indicates the dimensions of the window in the compositor's
logical coordinate space. The width and height must be strictly greater
than zero.
Note that the dimensions of a river_window_v1 refer to the dimensions of
the window content and are unaffected by the presence of borders or
decoration surfaces.
This event is sent as part of a render sequence before the render_start
event.
It may be sent due to a propose_dimensions or fullscreen request in a
previous manage sequence or because a window independently decides to
change its dimensions.
The window will not be displayed until the first dimensions event is
received and the render sequence is finished.
river_window_v1
request propose_dimensions(
width: int,
height: int,
)- width — proposed content width
- height — proposed content height
propose window dimensions
This request proposes dimensions for the window in the compositor's
logical coordinate space.
The width and height must be greater than or equal to zero. If the width
or height is zero the window will be allowed to decide its own
dimensions.
The window may not take the exact dimensions proposed. The actual
dimensions taken by the window will be sent in a subsequent
river_window_v1.dimensions event. For example, a terminal emulator may
only allow dimensions that are multiple of the cell size.
When a propose_dimensions request is made, the server must send a
dimensions event in response as soon as possible. It may not be possible
to send a dimensions event in the very next render sequence if, for
example, the window takes too long to respond to the proposed
dimensions. In this case, the server will send the dimensions event in a
future render sequence.
Note that the dimensions of a river_window_v1 refer to the dimensions of
the window content and are unaffected by the presence of borders or
decoration surfaces.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request hide()
request that the window be hidden
Request that the window be hidden. Has no effect if the window is
already hidden. Hides any window borders and decorations as well.
Newly created windows are considered shown unless explicitly hidden with
the hide request.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_window_v1
request show()
request that the window be shown
Request that the window be shown. Has no effect if the window is not
hidden. Does not guarantee that the window is visible as it may be
completely obscured by other windows placed above it for example.
Newly created windows are considered shown unless explicitly hidden with
the hide request.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_window_v1
event app_id(
app_id: nullable string,
)- app_id — window application ID
the window set an application ID
The window set an application ID.
The app_id argument will be null if the window has never set an
application ID or if the window cleared its application ID. (Xwayland
windows may do this for example, though xdg-toplevels may not.)
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event title(
title: nullable string,
)the window set a title
The window set a title.
The title argument will be null if the window has never set a title or
if the window cleared its title. (Xwayland windows may do this for
example, though xdg-toplevels may not.)
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event parent(
parent: nullable object<river_window_v1>,
)- parent — parent window, if any
the window set a parent
The window set a parent window. If this event is never received or if
the parent argument is null then the window has no parent.
A surface with a parent set might be a dialog, file picker, or similar
for the parent window.
Child windows should generally be rendered directly above their parent.
The compositor must guarantee that there are no loops in the window
tree: a parent must not be the descendant of one of its children.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
enum decoration_hint {
only_supports_csd = 0,
prefers_csd = 1,
prefers_ssd = 2,
no_preference = 3,
}- only_supports_csd — only supports client side decoration
- prefers_csd — client side decoration preferred, both CSD and SSD supported
- prefers_ssd — server side decoration preferred, both CSD and SSD supported
- no_preference — no preference, both CSD and SSD supported
river_window_v1
event decoration_hint(
hint: uint<decoration_hint>,
)supported/preferred decoration style
Information from the window about the supported and preferred client
side/server side decoration options.
This event may be sent multiple times over the lifetime of the window if
the window changes its preferences.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
request use_csd()
tell the client to use CSD
Tell the client to use client side decoration and draw its own title
bar, borders, etc.
This is the default if neither this request nor the use_ssd request is
ever made.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request use_ssd()
tell the client to use SSD
Tell the client to use server side decoration and not draw any client
side decorations.
This request will have no effect if the client only supports client side
decoration, see the decoration_hint event.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request set_borders(
edges: uint<edges>,
width: int,
r: uint,
g: uint,
b: uint,
a: uint,
)- edges — border edges
- width — border width
- r — 32-bit red value
- g — 32-bit green value
- b — 32-bit blue value
- a — 32-bit alpha value
set window borders
This request decorates the window with borders drawn by the compositor
on the specified edges of the window. Borders are drawn above the window
content.
Corners are drawn only between borders on adjacent edges. If e.g. the
left edge has a border and the top edge does not, the border drawn on
the left edge will not extend vertically beyond the top edge of the
window.
Borders are not drawn while the window is fullscreen.
The color is defined by four 32-bit RGBA values. Unless specified in
another protocol extension, the RGBA values use pre-multiplied alpha.
The valid range for the RGBA values is from 0x00000000 to 0xffffffff.
These values are interpreted as a percentage:
Setting the edges to none or the width to 0 disables the borders.
Setting a negative width is a protocol error.
This request completely overrides all previous set_borders requests.
Only the most recent set_borders request has an effect.
Note that the position/dimensions of a river_window_v1 refer to the
position/dimensions of the window content and are unaffected by the
presence of borders or decoration surfaces.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_window_v1
request set_tiled(
edges: uint<edges>,
)set window tiled state
Inform the window that it is part of a tiled layout and adjacent to
other elements in the tiled layout on the given edges.
The window should use this information to change the style of its client
side decorations and avoid drawing e.g. drop shadows outside of the
window dimensions on the tiled edges.
Setting the edges argument to none informs the window that it is not
part of a tiled layout. If this request is never made, the window is
informed that it is not part of a tiled layout.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
event pointer_move_requested(
seat: object<river_seat_v1>,
)window requested interactive pointer move
This event informs the window manager that the window has requested to
be interactively moved using the pointer. The seat argument indicates the
seat for the move.
The xdg-shell protocol for example allows windows to request that an
interactive move be started, perhaps when a client-side rendered
titlebar is dragged.
The window manager may use the river_seat_v1.op_start_pointer request to
interactively move the window or ignore this event entirely.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event pointer_resize_requested(
seat: object<river_seat_v1>,
edges: uint<edges>,
)- seat — requested seat
- edges — requested edges
window requested interactive pointer resize
This event informs the window manager that the window has requested to
be interactively resized using the pointer. The seat argument indicates
the seat for the resize.
The edges argument indicates which edges the window has requested to be
resized from. The edges argument will never be none and will never have
both top and bottom or both left and right edges set.
The xdg-shell protocol for example allows windows to request that an
interactive resize be started, perhaps when the corner of client-side
rendered decorations is dragged.
The window manager may use the river_seat_v1.op_start_pointer request to
interactively resize the window or ignore this event entirely.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
request inform_resize_start()
inform the window it is being resized
Inform the window that it is being resized. The window manager should
use this request to inform windows that are the target of an interactive
resize for example.
The window manager remains responsible for handling the position and
dimensions of the window while it is resizing.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request inform_resize_end()
inform the window it no longer being resized
Inform the window that it is no longer being resized. The window manager
should use this request to inform windows that are the target of an
interactive resize that the interactive resize has ended for example.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request set_capabilities(
caps: uint<capabilities>,
)- caps — supported capabilities
inform window of supported capabilities
This request informs the window of the capabilities supported by the
window manager. If the window manager, for example, ignores requests to
be maximized from the window it should not tell the window that it
supports the maximize capability.
The window might use this information to, for example, only show a
maximize button if the window manager supports the maximize capability.
The window manager client should use this request to set capabilities
for all new windows. If this request is never made, the compositor will
inform windows that all capabilities are supported.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
- x — x offset from top left corner
- y — y offset from top left corner
window requested that the window menu be shown
The xdg-shell protocol for example allows windows to request that a
window menu be shown, for example when the user right clicks on client
side window decorations.
A window menu might include options to maximize or minimize the window.
The window manager is free to ignore this request and decide what the
window menu contains if it does choose to show one.
The x and y arguments indicate where the window requested that the
window menu be shown.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event maximize_requested()
the window requested to be maximized
The xdg-shell protocol for example allows windows to request to be
maximized.
The window manager is free to honor this request using
river_window_v1.inform_maximized or ignore it.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event unmaximize_requested()
the window requested to be unmaximized
The xdg-shell protocol for example allows windows to request to be
unmaximized.
The window manager is free to honor this request using
river_window_v1.inform_unmaximized or ignore it.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
request inform_maximized()
inform the window that it is maximized
Inform the window that it is maximized. The window might use this
information to adapt the style of its client-side window decorations for
example.
The window manager remains responsible for handling the position and
dimensions of the window while it is maximized.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request inform_unmaximized()
inform the window that it is unmaximized
Inform the window that it is unmaximized. The window might use this
information to adapt the style of its client-side window decorations for
example.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
event fullscreen_requested(
output: nullable object<river_output_v1>,
)- output — fullscreen output requested
the window requested to be fullscreen
The xdg-shell protocol for example allows windows to request that they
be made fullscreen and allows them to provide an optional output hint.
If the output argument is null, the window has no preference and the
window manager should choose an output.
The window manager is free to honor this request using
river_window_v1.fullscreen or ignore it.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event exit_fullscreen_requested()
the window requested to exit fullscreen
The xdg-shell protocol for example allows windows to request to exit
fullscreen.
The window manager is free to honor this request using
river_window_v1.exit_fullscreen or ignore it.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
request inform_fullscreen()
inform the window that it is fullscreen
Inform the window that it is fullscreen. The window might use this
information to adapt the style of its client-side window decorations for
example.
This request does not affect the size/position of the window or cause it
to become the only window rendered, see the river_window_v1.fullscreen
and exit_fullscreen requests for that.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request inform_not_fullscreen()
inform the window that it is not fullscreen
Inform the window that it is not fullscreen. The window might use this
information to adapt the style of its client-side window decorations for
example.
This request does not affect the size/position of the window or cause it
to become the only window rendered, see the river_window_v1.fullscreen
and exit_fullscreen requests for that.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request fullscreen(
output: object<river_output_v1>,
)- output — fullscreen output
make the window fullscreen
Make the window fullscreen on the given output. If multiple windows are
fullscreen on the same output at the same time only the "top" window in
rendering order shall be displayed. If the window is already fullscreen
on a different output, the window is switched to the new output.
All river_shell_surface_v1 objects above the top fullscreen window in
the rendering order will continue to be rendered.
The compositor will handle the position and dimensions of the window
while it is fullscreen. The set_position and propose_dimensions requests
shall not affect the current position and dimensions of a fullscreen
window.
When a fullscreen request is made, the server must send a dimensions
event in response as soon as possible. It may not be possible to send a
dimensions event in the very next render sequence if, for example, the
window takes too long to respond. In this case, the server will send the
dimensions event in a future render sequence.
The compositor will clip window content, decoration surfaces, and
borders to the given output's dimensions while the window is fullscreen.
The effects of set_clip_box and set_content_clip_box are ignored while
the window is fullscreen.
If the output on which a window is currently fullscreen is removed, the
windowing state is modified as if there were an exit_fullscreen request
made in the same manage sequence as the river_output_v1.removed event.
This request does not inform the window that it is fullscreen, see the
river_window_v1.inform_fullscreen and inform_not_fullscreen requests.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
request exit_fullscreen()
make the window not fullscreen
Make the window not fullscreen.
The position and dimensions are undefined after this request is made
until a manage sequence in which the window manager makes the
propose_dimensions and set_position requests is completed.
The window manager should make propose_dimensions and set_position
requests in the same manage sequence as the exit_fullscreen request for
frame perfection.
This request does not inform the window that it is fullscreen, see the
river_window_v1.inform_fullscreen and inform_not_fullscreen requests.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
event minimize_requested()
the window requested to be minimized
The xdg-shell protocol for example allows windows to request to be
minimized.
The window manager is free to ignore this request, hide the window, or
do whatever else it chooses.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
request set_clip_box(
x: int,
y: int,
width: int,
height: int,
)Available since version 2
- x — x relative to top left window corner
- y — y relative to top left window corner
- width — clip box width
- height — clip box height
clip the window to a given box
Clip the window, including borders and decoration surfaces, to the box
specified by the x, y, width, and height arguments. The x/y position of
the box is relative to the top left corner of the window.
The width and height arguments must be greater than or equal to 0.
Setting a clip box with 0 width or height disables clipping.
The clip box is ignored while the window is fullscreen.
Both set_clip_box and set_content_clip_box may be enabled simultaneously.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_window_v1
event unreliable_pid(
unreliable_pid: int,
)Available since version 2
- unreliable_pid — unreliable PID
unreliable PID of the window's creator
This event gives an unreliable PID of the process that created the
window. Obtaining this information is inherently racy due to PID reuse.
Therefore, this PID must not be used for anything security sensitive.
Note also that a single process may create multiple windows, so there is
not necessarily a 1-to-1 mapping from PID to window. Multiple windows
may have the same PID.
This event is sent once when the river_window_v1 is created and never
sent again.
river_window_v1
request set_content_clip_box(
x: int,
y: int,
width: int,
height: int,
)Available since version 3
- x — x relative to top left window corner
- y — y relative to top left window corner
- width — clip box width
- height — clip box height
clip the window content to a given box
Clip the content of the window, excluding borders and decoration
surfaces, to the box specified by the x, y, width, and height arguments.
The x/y position of the box is relative to the top left corner of the
window.
Borders drawn by the compositor (see set_borders) are placed around the
intersection of the window content (as defined by the dimensions event)
and the content clip box when content clipping is enabled.
The width and height arguments must be greater than or equal to 0.
Setting a box with 0 width or height disables content clipping.
The content clip box is ignored while the window is fullscreen.
Both set_clip_box and set_content_clip_box may be enabled simultaneously.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_window_v1
event identifier(
identifier: string,
)Available since version 4
- identifier — unique identifier
unique window identifier
The identifier is a string that contains up to 32 printable ASCII bytes.
The identifier must not be an empty string.
It is compositor policy how the identifier is generated, but the following
properties must be upheld:
The identifier must uniquely identify the window. Two windows must not
share the same identifier.
The identifier must not be reused. This avoids races around window
creation/destruction when identifiers are used in out-of-band IPC.
If the compositor implements the ext-foreign-toplevel-list-v1 protocol,
the river_window_v1.identifier event must match the corresponding
ext_foreign_toplevel_handle_v1.identifier event.
This event is sent once when the river_window_v1 is created and never
sent again.
river_window_v1
request set_dimension_bounds(
max_width: int,
max_height: int,
)Available since version 4
- max_width — maximum width
- max_height — maximum height
recommend maximum dimensions to the window
Recommend that the window keep its dimensions within a given
maximum width/height. This recommendation is only a hint and the window
may ignore it.
Setting the width and height to 0 indicates that there are no bounds
and is equivalent to having never made this request.
Setting width or height to a negative value is a protocol error.
The server should communicate this hint to an xdg_toplevel window with
the xdg_toplevel.configure_bounds event for example.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_window_v1
event capture_sessions(
count: uint,
)Available since version 5
- count — count of screen capture sessions
window screen capture sessions
This event informs the window manager of the number of active screen
capture sessions for the window.
This event is sent once when the river_window_v1 is created and again
whenever the number of capture sessions changes.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event touch_move_requested(
seat: object<river_seat_v1>,
touch_point: int,
)Available since version 6
- seat — requested seat
- touch_point — transient touch point ID
window requested interactive touch move
This event informs the window manager that the window has requested to
be interactively moved using touch input. The seat argument indicates
the seat for the move and the touch point argument indicates the
transient ID of the touch point used.
The xdg-shell protocol for example allows windows to request that an
interactive move be started, perhaps when a client-side rendered
titlebar is dragged.
The window manager may use the river_seat_v1.op_start_touch request to
interactively move the window or ignore this event entirely.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_window_v1
event touch_resize_requested(
seat: object<river_seat_v1>,
touch_point: int,
edges: uint<edges>,
)Available since version 6
- seat — requested seat
- touch_point — transient touch point ID
- edges — requested edges
window requested interactive touch resize
This event informs the window manager that the window has requested to
be interactively resized using touch input. The seat argument indicates
the seat for the resize and the touch point argument indicates the
transient ID of the touch point used.
The edges argument indicates which edges the window has requested to be
resized from. The edges argument will never be none and will never have
both top and bottom or both left and right edges set.
The xdg-shell protocol for example allows windows to request that an
interactive resize be started, perhaps when the corner of client-side
rendered decorations is dragged.
The window manager may use the river_seat_v1.op_start_touch request to
interactively resize the window or ignore this event entirely.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
Version 6
a window decoration
The rendering order of windows with decorations is follows:
Decorations created with get_decoration_below at the bottom
Window content
Borders configured with river_window_v1.set_borders
Decorations created with get_decoration_above at the top
The relative ordering of decoration surfaces above/below a window is
undefined by this protocol and left up to the compositor.
river_decoration_v1
enum error {
no_commit = 0,
}- no_commit — failed to commit the surface before the window manager commit
river_decoration_v1
request destroy()
Destructor
destroy the decoration object
This request indicates that the client will no longer use the decoration
object and that it may be safely destroyed.
river_decoration_v1
request set_offset(
x: int,
y: int,
)- x — x relative to top left window corner
- y — y relative to top left window corner
set offset from the window's top left corner
This request sets the offset of the decoration surface from the top left
corner of the window.
If this request is never sent, the x and y offsets are undefined by this
protocol and left up to the compositor.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
Version 6
a surface for window manager UI
The window manager might use a shell surface to display a status bar,
background image, desktop notifications, launcher, desktop menu, or
whatever else it wants.
river_shell_surface_v1
enum error {
node_exists = 0,
no_commit = 1,
}- node_exists — shell surface already has a node object
- no_commit — failed to commit the surface before the window manager commit
river_shell_surface_v1
request destroy()
Destructor
destroy the shell surface object
This request indicates that the client will no longer use the shell
surface object and that it may be safely destroyed.
river_shell_surface_v1
request get_node(
id: new_id<river_node_v1>,
)get the shell surface's render list node
Get the node in the render list corresponding to the shell surface.
It is a protocol error to make this request more than once for a single
shell surface.
Version 6
a node in the render list
The render list is a list of nodes that determines the rendering order of
the compositor. Nodes may correspond to windows or shell surfaces. The
relative ordering of nodes may be changed with the place_above and
place_below requests, changing the rendering order.
The initial position of a node in the render list is undefined, the window
manager client must use the place_above or place_below request to
guarantee a specific rendering order.
river_node_v1
request destroy()
Destructor
destroy the decoration object
This request indicates that the client will no longer use the node
object and that it may be safely destroyed.
river_node_v1
request set_position(
x: int,
y: int,
)- x — global x coordinate
- y — global y coordinate
set absolute position of the node
Set the absolute position of the node in the compositor's logical
coordinate space. The x and y coordinates may be positive or negative.
Note that the position of a river_window_v1 refers to the position of
the window content and is unaffected by the presence of borders or
decoration surfaces.
If this request is never sent, the position of the node is undefined by
this protocol and left up to the compositor.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_node_v1
request place_top()
place node above all other nodes
This request places the node above all other nodes in the compositor's
render list.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_node_v1
request place_bottom()
place node below all other nodes
This request places the node below all other nodes in the compositor's
render list.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_node_v1
request place_above(
other: object<river_node_v1>,
)place node above another node
This request places the node directly above another node in the
compositor's render list.
Attempting to place a node above itself has no effect.
Given nodes A, B, C currently rendered in that order with C on top
and A on the bottom, the following example demonstrates the behavior
of this request and the meaning of "directly above":
A.place_above(C) -> B, C, A
A.place_above(B) -> B, A, C
B.place_above(A) -> A, B, C
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_node_v1
request place_below(
other: object<river_node_v1>,
)place node below another node
This request places the node directly below another node in the
compositor's render list.
Attempting to place a node below itself has no effect.
Given nodes A, B, C currently rendered in that order with C on top
and A on the bottom, the following example demonstrates the behavior
of this request and the meaning of "directly below":
C.place_below(A) -> C, A, B
C.place_below(B) -> A, C, B
B.place_below(C) -> A, B, C
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
Version 6
a logical output
An area in the compositor's logical coordinate space that should be
treated as a single output for window management purposes. This area may
correspond to a single physical output or multiple physical outputs in the
case of mirroring or tiled monitors depending on the hardware and
compositor configuration.
river_output_v1
request destroy()
Destructor
destroy the output object
This request indicates that the client will no longer use the output
object and that it may be safely destroyed.
This request should be made after the river_output_v1.removed event is
received to complete destruction of the output.
river_output_v1
event removed()
the output is removed
This event indicates that the logical output is no longer conceptually
part of window management space.
The server will send no further events on this object and ignore any
request (other than river_output_v1.destroy) made after this event is
sent. The client should destroy this object with the
river_output_v1.destroy request to free up resources.
This event may be sent because a corresponding physical output has been
physically unplugged or because some output configuration has changed.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_output_v1
event position(
x: int,
y: int,
)- x — global x coordinate
- y — global y coordinate
output position
This event indicates the position of the output in the compositor's
logical coordinate space. The x and y coordinates may be positive or
negative.
This event is sent once when the river_output_v1 is created and again
whenever the position changes.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The server must guarantee that the position and dimensions events do not
cause the areas of multiple logical outputs to overlap when the
corresponding manage_start event is received.
river_output_v1
event dimensions(
width: int,
height: int,
)- width — output width
- height — output height
output dimensions
This event indicates the dimensions of the output in the compositor's
logical coordinate space. The width and height will always be strictly
greater than zero.
This event is sent once when the river_output_v1 is created and again
whenever the dimensions change.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The server must guarantee that the position and dimensions events do not
cause the areas of multiple logical outputs to overlap when the
corresponding manage_start event is received.
river_output_v1
enum presentation_mode {
vsync = 0,
async = 1,
}Available since version 4
- vsync
tearing-free presentation
Output page-flips should be synchronized to the vertical blanking
period, eliminating tearing. This is the default presentation mode.
- async
asynchronous presentation
Output page-flips should not be synchronized to the vertical blanking
period, visual screen tearing may occur.
river_output_v1
request set_presentation_mode(
mode: uint<presentation_mode>,
)Available since version 4
- mode — preferred presentation mode
set the preferred presentation mode
Set the preferred presentation mode of the output. The compositor should
always respect the preference of the window manager if possible. If this
request is never made, the preferred presentation mode is vsync.
This request modifies rendering state and may only be made as part of a
manage or render sequence, see the river_window_manager_v1 description.
river_output_v1
event capture_sessions(
count: uint,
)Available since version 5
- count — count of screen capture sessions
output screen capture sessions
This event informs the window manager of the number of active screen
capture sessions for the output.
This event is sent once when the river_output_v1 is created and again
whenever the number of capture sessions changes.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
Version 6
a window management seat
This object represents a single user's collection of input devices. It
allows the window manager to route keyboard input to windows, get
high-level information about pointer input, define pointer bindings, etc.
For keyboard bindings, see the river-xkb-bindings-v1 protocol.
Since version 4: The cursor surface/shape set by the window manager on the
wl_pointer of this seat is used when no client has pointer focus, for
example during a pointer operation. Since the window manager is allowed to
set cursor surface/shape even when it does not have pointer focus, the
compositor must ignore the serial argument of wl_pointer.set_cursor and
wp_cursor_shape_device_v1.set_shape requests made by the window manager.
The most recent cursor surface/shape set by the window manager is
remembered by the compositor and restored whenever no client has pointer
focus. If the window manager never sets a cursor surface/shape, the
"default" shape is used.
river_seat_v1
request destroy()
Destructor
destroy the seat object
This request indicates that the client will no longer use the seat
object and that it may be safely destroyed.
This request should be made after the river_seat_v1.removed event is
received to complete destruction of the seat.
river_seat_v1
event removed()
the seat is removed
This event indicates that seat is no longer in use and should be
destroyed.
The server will send no further events on this object and ignore any
request (other than river_seat_v1.destroy) made after this event is
sent. The client should destroy this object with the
river_seat_v1.destroy request to free up resources.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
event wl_seat(
name: uint,
)- name — name of the wl_seat global
corresponding wl_seat
The wl_seat object corresponding to the river_seat_v1. The argument is
the global name of the wl_seat advertised with wl_registry.global.
It is guaranteed that the corresponding wl_seat is advertised before
this event is sent.
This event is sent exactly once. The wl_seat associated with a
river_seat_v1 cannot change. It is guaranteed that there is a 1-to-1
mapping between wl_seat and river_seat_v1 objects.
The global_remove event for the corresponding wl_seat may be sent before
the river_seat_v1.removed event. This is due to the fact that
river_seat_v1 state changes are synced to the river window management
manage sequence while changes to globals are not.
Rationale: The window manager may want to trigger window management
state changes based on normal input events received by its shell
surfaces for example.
river_seat_v1
request clear_focus()
clear keyboard focus
Request that the compositor not send keyboard input to any client.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_seat_v1
event pointer_enter(
window: object<river_window_v1>,
)pointer entered a window
The seat's pointer entered the given window's area.
The area of a window is defined to include the area defined by the
window dimensions, borders configured using river_window_v1.set_borders,
and the input regions of decoration surfaces. In particular, it does not
include input regions of surfaces belonging to the window that extend
outside the window dimensions.
The pointer of a seat may only enter a single window at a time. When the
pointer moves between windows, the pointer_leave event for the old
window must be sent before the pointer_enter event for the new window.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
event pointer_leave()
pointer left the entered window
The seat's pointer left the window for which pointer_enter was most
recently sent. See pointer_enter for details.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
event window_interaction(
window: object<river_window_v1>,
)- window — window interacted with
a window has been interacted with
A window has been interacted with beyond the pointer merely passing over
it. This event might be sent due to a pointer button press or due to a
touch/tablet tool interaction with the window.
There are no guarantees regarding how this event is sent in relation to
the pointer_enter and pointer_leave events as the interaction may use
touch or tablet tool input.
Rationale: this event gives window managers necessary information to
determine when to send keyboard focus, raise a window that already has
keyboard focus, etc. Rather than expose all pointer, touch, and tablet
events to window managers, a policy over mechanism approach is taken.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
event shell_surface_interaction(
shell_surface: object<river_shell_surface_v1>,
)- shell_surface — shell surface interacted with
a shell surface has been interacted with
A shell surface has been interacted with beyond the pointer merely
passing over it. This event might be sent due to a pointer button press
or due to a touch/tablet tool interaction with the shell_surface.
There are no guarantees regarding how this event is sent in relation to
the pointer_enter and pointer_leave events as the interaction may use
touch or tablet tool input.
Rationale: While the shell surface does receive all wl_pointer,
wl_touch, etc. input events for the surface directly, these events do
not necessarily trigger a manage sequence and therefore do not allow the
window manager to update focus or perform other actions in response to
the input in a race-free way.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
request op_start_pointer()
start an interactive pointer operation
Start an interactive pointer operation. During the operation, op_delta
events will be sent based on pointer input.
When all pointer buttons are released, the op_release event is sent.
The pointer operation continues until the op_end request is made during
a manage sequence and that manage sequence is finished.
The window manager may use this operation to implement interactive
move/resize of windows by setting the position of windows and proposing
dimensions based off of the op_delta events.
This request is ignored if a pointer operation is already in progress.
The compositor must ensure that no client has pointer focus from this
seat during the pointer operation. This means that the window manager
has control over the pointer's cursor surface/shape during the pointer
operation. See the river_seat_v1 description.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_seat_v1
event op_delta(
dx: int,
dy: int,
)- dx — total change in x
- dy — total change in y
total cumulative motion since op start
This event indicates the total change in position since the start of the
pointer operation.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
event op_release()
all pointer buttors have been released
All pointer buttons on the pointer device driving the operation have
been released.
The compositor will continue to send op_delta events until the op is
ended with the op_end request.
This event is sent at most once during a pointer operation.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
request op_end()
end an interactive pointer operation
End an interactive pointer operation.
This request is ignored if there is no pointer operation in progress.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_seat_v1
enum modifiers {
none = 0,
shift = 1,
ctrl = 4,
mod1 = 8,
mod3 = 32,
mod4 = 64,
mod5 = 128,
}This is a bitfield
- mod1 — commonly called alt
- mod4 — commonly called super or logo
a set of keyboard modifiers
This enum is used to describe the keyboard modifiers that must be held
down to trigger a key binding or pointer binding.
Note that river and wlroots use the values 2 and 16 for capslock and
numlock internally. It doesn't make sense to use locked modifiers for
bindings however so these values are not included in this enum.
river_seat_v1
request get_pointer_binding(
id: new_id<river_pointer_binding_v1>,
button: uint,
modifiers: uint<modifiers>,
)- id — new pointer binding
- button — a Linux input event code
- modifiers — keyboard modifiers
define a new pointer binding
Define a pointer binding in terms of a pointer button, keyboard
modifiers, and other configurable properties.
The button argument is a Linux input event code defined in the
linux/input-event-codes.h header file (e.g. BTN_RIGHT).
The new pointer binding is not enabled until initial configuration is
completed and the enable request is made during a manage sequence.
river_seat_v1
request set_xcursor_theme(
name: string,
size: uint,
)Available since version 2
- name — xcursor theme name
- size — cursor size
set the xcursor theme for the seat
Set the XCursor theme for the seat. This theme is used for cursors
rendered by the compositor, but not necessarily for cursors rendered by
clients.
Note: The window manager may also wish to set the XCURSOR_THEME and
XCURSOR_SIZE environment variable for programs it starts.
river_seat_v1
event pointer_position(
x: int,
y: int,
)Available since version 2
- x — global x coordinate
- y — global y coordinate
The current position of the pointer
The current position of the pointer in the compositor's logical
coordinate space.
This state is special in that a change in pointer position alone must
not cause the compositor to start a manage sequence.
Assuming the seat has a pointer, this event must be sent in every manage
sequence unless there is no change in x/y position since the last time this
event was sent.
river_seat_v1
request pointer_warp(
x: int,
y: int,
)Available since version 3
- x — global x coordinate
- y — global y coordinate
warp the pointer to a given position
Warp the pointer to the given position in the compositor's logical
coordinate space.
If the given position is outside the bounds of all outputs, the pointer
will be warped to the closest point inside an output instead.
If an op_start_pointer request is made during the same manage sequence
as a pointer_warp request, the warp is applied first by the server
regardless of the relative ordering of the two requests.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_seat_v1
request op_start_touch(
touch_point: int,
)Available since version 6
- touch_point — transient touch point ID
start an interactive touch operation
Start an interactive touch operation. During the operation,
op_delta_touch events will be sent based movement of the given touch
point.
When the touch point is released, the op_release_touch event is sent and
the operation is automatically ended.
The window manager may end the operation before the touch point is released
using the op_end_touch request.
The window manager may use this operation to implement interactive
move/resize of windows by setting the position of windows and proposing
dimensions based off of the op_delta_touch events.
This request is ignored if a touch operation is already in progress for
the given touch point or if the given touch point does not exist.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_seat_v1
event op_delta_touch(
touch_point: int,
dx: int,
dy: int,
)Available since version 6
- touch_point — transient touch point ID
- dx — total change in x
- dy — total change in y
total cumulative motion since op start
This event indicates the total change in position since the start of the
operation for the given touch point.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
event op_release_touch(
touch_point: int,
)Available since version 6
- touch_point — transient touch point ID
operation touch point has been released
The touch point for the operation has been released and the operation is
ended.
No further op_delta_touch events will be sent for the operation.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
event op_cancel_touch(
touch_point: int,
)Available since version 6
- touch_point — transient touch point ID
operation touch point has been canceled
The touch point for the operation has been canceled. For example, this
might happen due to palm detection determining that the touch point was
actually a accidental palm contact point all along and should have been
ignored from the start.
The client should ideally behave as if this operation was never started.
No further op_delta_touch events will be sent for the operation.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_seat_v1
request op_end_touch(
touch_point: int,
)Available since version 6
- touch_point — transient touch point ID
end an touch operation
End a touch operation for the given touch point.
This request is ignored if there is no operation in progress for the
given touch point or if the operation has already been ended by the
op_release_touch event.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
Version 6
- destroy — destroy the pointer binding object
- enable — enable the pointer binding
- disable — disable the pointer binding
- pressed — the bound pointer button has been pressed
- released — the bound pointer button has been released
configure a pointer binding, receive trigger events
This object allows the window manager to configure a pointer binding and
receive events when the binding is triggered.
The new pointer binding is not enabled until the enable request is made
during a manage sequence.
Normally, all pointer button events are sent to the surface with pointer
focus by the compositor. Pointer button events that trigger a pointer
binding are not sent to the surface with pointer focus.
If multiple pointer bindings would be triggered by a single physical
pointer event on the compositor side, it is compositor policy which
pointer binding(s) will receive press/release events or if all of the
matched pointer bindings receive press/release events.
river_pointer_binding_v1
request destroy()
Destructor
destroy the pointer binding object
This request indicates that the client will no longer use the pointer
binding object and that it may be safely destroyed.
river_pointer_binding_v1
request enable()
enable the pointer binding
This request should be made after all initial configuration has been
completed and the window manager wishes the pointer binding to be able
to be triggered.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_pointer_binding_v1
request disable()
disable the pointer binding
This request may be used to temporarily disable the pointer binding. It
may be later re-enabled with the enable request.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_pointer_binding_v1
event pressed()
the bound pointer button has been pressed
This event indicates that the pointer button triggering the binding has
been pressed.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite.
river_pointer_binding_v1
event released()
the bound pointer button has been released
This event indicates that the pointer button triggering the binding has
been released.
Releasing the modifiers for the binding without releasing the pointer
button does not trigger the release event. This event is sent when the
pointer button is released, even if the modifiers have changed since the
pressed event.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite.
Copyright
SPDX-FileCopyrightText: © 2025 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
xkbcommon-based key bindings
This protocol allows the river-window-management-v1 window manager to
define key bindings in terms of xkbcommon keysyms and other configurable
properties.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Version 3
xkbcommon bindings global interface
This global interface should only be advertised to the client if the
river_window_manager_v1 global is also advertised.
river_xkb_bindings_v1
request get_xkb_binding(
seat: object<river_seat_v1>,
id: new_id<river_xkb_binding_v1>,
keysym: uint,
modifiers: uint<river_seat_v1.modifiers>,
)- keysym — an xkbcommon keysym
define a new xkbcommon key binding
Define a key binding for the given seat in terms of an xkbcommon keysym
and other configurable properties.
The new key binding is not enabled until initial configuration is
completed and the enable request is made during a manage sequence.
Version 3
configure a xkb key binding, receive trigger events
This object allows the window manager to configure a xkbcommon key binding
and receive events when the key binding is triggered.
The new key binding is not enabled until the enable request is made during
a manage sequence.
Normally, all key events are sent to the surface with keyboard focus by
the compositor. Key events that trigger a key binding are not sent to the
surface with keyboard focus.
If multiple key bindings would be triggered by a single physical key event
on the compositor side, it is compositor policy which key binding(s) will
receive press/release events or if all of the matched key bindings receive
press/release events.
Key bindings might be matched by the same physical key event due to shared
keysym and modifiers. The layout override feature may also cause the same
physical key event to trigger two key bindings with different keysyms and
different layout overrides configured.
river_xkb_binding_v1
request destroy()
Destructor
destroy the xkb binding object
This request indicates that the client will no longer use the xkb key
binding object and that it may be safely destroyed.
river_xkb_binding_v1
request set_layout_override(
layout: uint,
)- layout — 0-indexed xkbcommon layout
override currently active xkb layout
Specify an xkb layout that should be used to translate key events for
the purpose of triggering this key binding irrespective of the currently
active xkb layout.
The layout argument is a 0-indexed xkbcommon layout number for the
keyboard that generated the key event.
If this request is never made, the currently active xkb layout of the
keyboard that generated the key event will be used.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_xkb_binding_v1
request enable()
enable the key binding
This request should be made after all initial configuration has been
completed and the window manager wishes the key binding to be able to be
triggered.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_xkb_binding_v1
request disable()
disable the key binding
This request may be used to temporarily disable the key binding. It may
be later re-enabled with the enable request.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_xkb_binding_v1
event pressed()
the key triggering the binding has been pressed
This event indicates that the physical key triggering the binding has
been pressed.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite.
river_xkb_binding_v1
event released()
the key triggering the binding has been released
This event indicates that the physical key triggering the binding has
been released.
Releasing the modifiers for the binding without releasing the "main"
physical key that produces the bound keysym does not trigger the release
event. This event is sent when the "main" key is released, even if the
modifiers have changed since the pressed event.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite.
river_xkb_binding_v1
event stop_repeat()
Available since version 2
repeating should be stopped
This event indicates that repeating should be stopped for the binding if
the window manager has been repeating some action since the pressed
event.
This event is generally sent when some other (possibly unbound) key is
pressed after the pressed event is sent and before the released event
is sent for this binding.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
Version 3
xkb bindings seat
This object manages xkb bindings state associated with a specific seat.
river_xkb_bindings_seat_v1
request destroy()
DestructorAvailable since version 2
destroy the object
This request indicates that the client will no longer use the object and
that it may be safely destroyed.
river_xkb_bindings_seat_v1
request ensure_next_key_eaten()
Available since version 2
ensure the next key press event is eaten
Ensure that the next non-modifier key press and corresponding release
events for this seat are not sent to the currently focused surface.
If the next non-modifier key press triggers a binding, the
pressed/released events are sent to the river_xkb_binding_v1 object as
usual.
If the next non-modifier key press does not trigger a binding, the
ate_unbound_key event is sent instead.
Rationale: the window manager may wish to implement "chorded"
keybindings where triggering a binding activates a "submap" with a
different set of keybindings. Without a way to eat the next key
press event, there is no good way for the window manager to know that it
should error out and exit the submap when a key not bound in the submap
is pressed.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_xkb_bindings_seat_v1
request cancel_ensure_next_key_eaten()
Available since version 2
cancel an ensure_next_key_eaten request
This requests cancels the effect of the latest ensure_next_key_eaten
request if no key has been eaten due to the request yet. This request
has no effect if a key has already been eaten or no
ensure_next_key_eaten was made.
Rationale: the window manager may wish cancel an uncompleted "chorded"
keybinding after a timeout of a few seconds. Note that since this
timeout use-case requires the window manager to trigger a manage sequence
with the river_window_manager_v1.manage_dirty request it is possible that
the ate_unbound_key key event may be sent before the window manager has
a chance to make the cancel_ensure_next_key_eaten request.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_xkb_bindings_seat_v1
event ate_unbound_key()
Available since version 2
an unbound key press event was eaten
An unbound key press event was eaten due to the ensure_next_key_eaten
request.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
river_xkb_bindings_seat_v1
request modifiers_watch(
modifiers: uint<river_seat_v1.modifiers>,
)Available since version 3
watch for change in active modifiers
Request that the server send the modifiers_update event whenever a state
change occurs for at least one of the modifiers specified by the
modifiers argument.
The window manager should make this request with the modifiers argument
set to 0 when it no longer wishes to take action based on a change in
modifiers.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description.
river_xkb_bindings_seat_v1
event modifiers_update(
old: uint<river_seat_v1.modifiers>,
new: uint<river_seat_v1.modifiers>,
)Available since version 3
- old — previously active modifiers
- new — currently active modifiers
active modifiers for the seat changed
The set of currently active modifiers for the seat changed. This event
is only sent when there is a change in state for modifiers marked as
watched using the modifiers_watch request.
The old and new arguments convey the set of modifiers active before and
after the change. All modifiers are included in the old and new
arguments, including modifiers that are not watched.
Since this event is only sent when there is a change in state for
watched modifiers, it follows that at least one watched modifier is
active in old but inactive in new or vice-versa.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite.
Copyright
SPDX-FileCopyrightText: © 2026 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
configure xkbcommon keyboards
This protocol allow a client to set the xkbcommon keymap of individual
keyboard input devices. It also allows switching between the layouts of a
keymap and toggling capslock/numlock/scrolllock state.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in IETF RFC 2119.
Version 3
xkb config global interface
Global interface for configuring xkb devices.
This global should only be advertised if river_input_manager_v1 is
advertised as well.
river_xkb_config_v1
request stop()
stop sending events
This request indicates that the client no longer wishes to receive
events on this object.
The Wayland protocol is asynchronous, which means the server may send
further events until the stop request is processed. The client must wait
for a river_xkb_config_v1.finished event before destroying this object.
river_xkb_config_v1
request destroy()
Destructor
destroy the river_xkb_config_v1 object
This request should be called after the finished event has been received
to complete destruction of the object.
It is a protocol error to make this request before the finished event
has been received.
If a client wishes to destroy this object it should send a
river_xkb_config_v1.stop request and wait for a
river_xkb_config_v1.finished event. Once the finished event is received
it is safe to destroy this object and any other objects created through
this interface.
river_xkb_config_v1
request create_keymap(
id: new_id<river_xkb_keymap_v1>,
fd: fd,
format: uint<keymap_format>,
)create a keymap object
The server must be able to mmap the fd with MAP_PRIVATE.
The server will fstat the fd to obtain the size of the keymap.
The client must not modify the contents of the fd after making this request.
The client should seal the fd with fcntl.
Version 3
xkbcommon keymap
This object is the result of attempting to create an xkbcommon keymap.
river_xkb_keymap_v1
request destroy()
Destructor
destroy the keymap object
This request indicates that the client will no longer use the keymap
object and that it may be safely destroyed.
Version 3
xkbcommon keyboard device
This object represent a physical keyboard which has its configuration and
state managed by xkbcommon.
river_xkb_keyboard_v1
request destroy()
Destructor
destroy the xkb keyboard object
This request indicates that the client will no longer use the keyboard
object and that it may be safely destroyed.
river_xkb_keyboard_v1
request set_layout_by_index(
index: int,
)set the active layout by index
Set the active layout for the keyboard's keymap. Has no effect if the
layout index is out of bounds for the current keymap.
river_xkb_keyboard_v1
request set_layout_by_name(
name: string,
)set the active layout by name
Set the active layout for the keyboard's keymap. Has no effect if there
is no layout with the give name for the keyboard's keymap.
river_xkb_keyboard_v1
event layout(
index: uint,
name: nullable string,
)currently active layout
The currently active layout index and name. The name arg may be null if
the active layout does not have a name.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the layout changes.
river_xkb_keyboard_v1
event done()
Available since version 2
all information has been sent
This event is sent after all information about the keyboard has been
sent.
This allows changes to one or more river_xkb_keyboard_v1 properties to
be seen as atomic, even if they happen via multiple events.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
seat activity notification for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows a privileged DDE client such as the dock or shell
to observe seat activity that the compositor detects: pointer button
and wheel activity, and drag and drop lifecycle events, scoped to a
given seat.
The compositor must reject bind attempts from non-privileged
clients.
The terms "must", "must not", "should", and "may" in this document
are to be interpreted as described in RFC 2119.
Version 1
factory for seat activity notifiers
A global that creates treeland_active_notify_v1 objects for
privileged DDE clients. Each notifier reports activity for
one seat; clients observing several seats create several
notifiers.
The compositor must reject bind attempts from non-privileged
clients.
Version 1
seat activity notifier
A notifier object reports seat activity that the compositor
detects. Activity is reported as activity_changed events
tagged with the source that triggered them and the new
activity state. Drag and drop lifecycle changes are reported
as drag_changed events tagged with the new drag state.
The mouse and wheel sources have different semantics:
For mouse, activity_changed reports the aggregate state of
the left pointer button only. It is sent with state active
when the left button is pressed and state inactive when it
is released. Other pointer buttons do not generate these
events. The compositor sends these events as matched pairs:
it must not send a state active event before the matching
state inactive event, nor a state inactive event when the
left button is not pressed.
For wheel, activity_changed is a discrete per-event pulse,
not a persistent state. It is sent with state active for
each wheel event whose angle delta is positive, and state
inactive for each whose angle delta is negative; the
compositor may send several active (or several inactive)
events in a row without an intervening opposite state.
Clients must treat each wheel event independently and must
not infer a lasting state from a single event.
The drag_changed event reports the lifecycle of a drag and
drop operation on the seat. It is sent with state started
when the operation begins. Exactly one terminal event
follows each started event: one with state dropped when the
operation completes with a successful drop, or one with
state cancelled when the operation ends without a drop
(for example because the drag was cancelled or the source
destroyed). No further drag events are sent after the
terminal event until the next started event.
treeland_active_notify_v1
enum reason {
mouse = 0,
wheel = 1,
}- mouse — left pointer button activity
- wheel — pointer wheel activity
activity source
The input source that triggered an activity event. Used
by the activity_changed event. See the interface
description for the per-source semantics.
treeland_active_notify_v1
enum activity_state {
inactive = 0,
active = 1,
}- inactive — the activity source is inactive
- active — the activity source is active
activity state
The state reported by the activity_changed event. See
the interface description for the per-source semantics.
treeland_active_notify_v1
enum drag_state {
started = 0,
dropped = 1,
cancelled = 2,
}- started — a drag and drop operation started
- dropped — a drag and drop operation completed with a drop
- cancelled — a drag and drop operation ended without a drop
drag and drop lifecycle state
The state reported by the drag_changed event.
treeland_active_notify_v1
event activity_changed(
reason: uint<reason>,
state: uint<activity_state>,
)- reason — the activity source
- state — the new activity state
an activity source changed state
For mouse, sent when the left pointer button is pressed
(state active) or released (state inactive). The
compositor sends these events as matched pairs.
For wheel, sent for each wheel event: state active when
the angle delta is positive, state inactive when it is
negative; the compositor may send several active (or
several inactive) events in a row without an
intervening opposite state.
See the interface description for the per-source
semantics.
treeland_active_notify_v1
event drag_changed(
state: uint<drag_state>,
)- state — the new drag and drop lifecycle state
a drag and drop operation changed state
Sent when the state of a drag and drop operation on the
seat bound to this notifier changes.
A started event is followed by exactly one terminal
event: dropped when the operation completes with a
successful drop, or cancelled when the operation ends
without a drop (for example because the drag was
cancelled or the drag source destroyed). No further
drag events are sent after the terminal event until
the next started event.
Copyright
SPDX-FileCopyrightText: 2025 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
app id resolver bridge for treeland
Internal bridge between treeland and the user-session treeland-session-helper.
Treeland is a multi-user compositor and does not host per-user-session D-Bus
itself, so it asks treeland-session-helper, running in the user session, to
map a process (identified by a pidfd) to its application identifier and
sandbox engine name. treeland-session-helper answers over this Wayland
protocol; it in turn resolves the request through D-Bus with
dde-application-manager. This protocol is only for that dedicated
treeland-session-helper bridge, not a general application-developer API,
and regular clients must not bind it.
The key words "must", "must not", "required", "shall",
"shall not", "should", "should not", "recommended", "may",
and "optional" in this document are to be interpreted as
described in RFC 2119.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
manager for the app id resolver bridge
Factory global for creating resolver objects. Typically exactly one
treeland-session-helper instance (a Wayland client in the user
session) binds this interface and serves identification requests
coming from the compositor. Only the treeland-session-helper bridge
should bind this global; regular application clients must not use it.
treeland_app_id_resolver_manager_v2
request get_resolver(
id: new_id<treeland_app_id_resolver_v2>,
)create a resolver object
Create a resolver object. Only one resolver may be registered
per session. Treeland is a multi-user compositor; different user
sessions may each register their own resolver. If a resolver is
already bound in the same session, the compositor will raise
the resolver_already_exists error and will not create a new
resolver object.
Version 1
app id resolver
Per-session resolver object created through the manager. The
compositor sends identify_request events carrying a pidfd, and
treeland-session-helper must respond exactly once per request via
the respond request. If resolution fails it responds with an empty
app_id.
treeland_app_id_resolver_v2
request destroy()
Destructor
destroy the resolver
Destroy the resolver object. The compositor will no longer send
identify_request events after this request is processed.
treeland_app_id_resolver_v2
request respond(
request_id: uint,
app_id: string,
sandbox_engine_name: string,
)- request_id — the request ID from identify_request
- app_id — the resolved application identifier, or empty string on failure
- sandbox_engine_name — the sandbox engine or security context name
respond with resolved application identifier
Respond to a prior identify_request event. treeland-session-helper
must call this exactly once for each identify_request. If the
application cannot be identified, respond with an empty app_id. The
sandbox_engine_name must always be provided and describes the
security context in which the process is running (container,
sandbox, etc.).
treeland_app_id_resolver_v2
event identify_request(
request_id: uint,
pidfd: fd,
)- request_id — monotonic id generated by compositor
- pidfd — pidfd referencing the target process
request identification of a process
Sent by the compositor to ask treeland-session-helper to resolve
a process to an application identifier. The compositor emits this
event each time it needs to identify a process for which it does not
already have a cached result. treeland-session-helper must respond
exactly once via the respond request using the provided request_id.
Failure to respond in a timely manner may cause the compositor
to treat the process as unidentified.
Copyright
SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
resolve application identifiers for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
Compositor Support
manager for app id resolver
Create a resolver object. Typically exactly one privileged helper
(a Wayland client with DBus access) binds this interface and serves
identification requests coming from the compositor.
treeland_app_id_resolver_manager_v1
request get_resolver(
id: new_id<treeland_app_id_resolver_v1>,
)create/bind a resolver object
Create or bind a resolver object. Only one resolver may be registered
per session. Treeland is a multi-user compositor; different user
sessions may each register their own resolver. If a resolver is
already bound in the same session, the compositor will report an
error on the manager and will NOT create a new resolver object for
this request.
Version 1
- identify_request — ask client to resolve pidfd to application id
- respond — respond with app id and sandbox_engine_name (empty app_id on failure)
- destroy — destroy resolver
app id resolver
The compositor sends identify_request with a unique request_id and a pidfd.
The client must answer exactly once via respond(request_id, app_id). If
resolution fails respond with an empty string.
treeland_app_id_resolver_v1
event identify_request(
request_id: uint,
pidfd: fd,
)- request_id — monotonic id generated by compositor
- pidfd — pidfd referencing the target process
ask client to resolve pidfd to application id
Sent by the compositor to ask the helper to resolve a process to an application identifier.
treeland_app_id_resolver_v1
request respond(
request_id: uint,
app_id: string,
sandbox_engine_name: string,
)- request_id — the request ID from identify_request
- app_id — the resolved application identifier, or empty string on failure
- sandbox_engine_name — the sandbox engine / security context name (required, non-empty)
respond with app id and sandbox_engine_name (empty app_id on failure)
Respond to an identify_request. The sandbox_engine_name must be provided and
matches the context in which the process is running (container, sandbox, etc).
If resolution fails, respond with an empty app_id.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
user-level appearance configuration management
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows privileged clients such as the desktop control
center to configure user-level appearance settings managed by the
compositor, including cursor theme and size, fonts, and visual theming
(icon theme, accent color, window opacity, color scheme, titlebar height,
and corner radius).
This protocol is privileged. Binding it without compositor-level
authorization may result in requests being silently ignored or the
connection being terminated.
The terms "must", "must not", "should", and "may" in this document are
to be interpreted as described in RFC 2119.
Version 1
user-level appearance settings manager
A singleton privileged global for modifying user-level appearance
settings of the current user. These settings are shared by all
windows and clients of the user rather than being per-window.
Settings take effect immediately when a set_* request is sent.
The compositor applies each change and broadcasts the new value
to all clients bound to treeland_appearance_v1.
treeland_appearance_manager_v1
enum color_scheme {
light = 0,
dark = 1,
}- light — prefer light color scheme
- dark — prefer dark color scheme
user-level color scheme hint
A user-level hint for the preferred color scheme. Clients
should use this value to style their self-drawn widgets and
UI elements accordingly. The compositor also applies this
hint to server-side decorations. This is semantically
equivalent to org.freedesktop.appearance color-scheme and
the CSS prefers-color-scheme media feature.
This enum mirrors treeland_appearance_v1.color_scheme
(in the read-only treeland-appearance-unstable-v1
protocol): the entry names and values are identical and must
stay in sync. Any new value must be added to both at once.
treeland_appearance_manager_v1
request set_cursor_theme(
name: string,
)- name — cursor theme name as recognized by the cursor theme subsystem
set the cursor theme
Set the cursor theme name. The compositor applies
the change immediately and broadcasts a cursor_theme event to
all active appearance observers. If the requested theme is
empty or not installed, the compositor falls back to a
default cursor theme.
treeland_appearance_manager_v1
request set_cursor_size(
width: uint,
height: uint,
)- width — cursor width in pixels
- height — cursor height in pixels
set the cursor size
Set the cursor size in pixels. Width and height
are specified independently to accommodate hardware cursor
planes that support non-square sizes. The compositor applies
the change immediately and broadcasts a cursor_size event to
all active appearance observers. Values of 0 or exceeding
compositor limits are clamped to the minimum or maximum
supported size.
treeland_appearance_manager_v1
request set_font(
font_name: string,
)- font_name — font family name
set the proportional font
Set the proportional font family. The compositor
applies the change immediately and broadcasts a font event to
all active appearance observers. If the requested font family
is empty or not installed, the compositor falls back to a
default font.
treeland_appearance_manager_v1
request set_monospace_font(
font_name: string,
)- font_name — monospace font family name
set the monospace font
Set the monospace font family. The compositor
applies the change immediately and broadcasts a monospace_font
event to all active appearance observers. If the requested font
family is empty or not installed, the compositor falls back to
a default monospace font.
treeland_appearance_manager_v1
request set_font_size(
size: uint,
)- size — font size in points
set the font size
Set the base font size in points. The compositor
applies the change immediately and broadcasts a font_size
event to all active appearance observers. A size of 0 or
exceeding compositor limits is clamped to the minimum or maximum
supported size.
treeland_appearance_manager_v1
request set_icon_theme(
theme_name: string,
)- theme_name — icon theme name
set the icon theme
Set the icon theme name. The compositor applies
the change immediately and broadcasts an icon_theme event to
all active appearance observers. If the specified theme is
empty or not installed, the compositor falls back to a
default icon theme or ignores the change.
treeland_appearance_manager_v1
request set_accent_color(
r: uint,
g: uint,
b: uint,
)- r — accent color red component [0, 255]
- g — accent color green component [0, 255]
- b — accent color blue component [0, 255]
set the accent color
Set the accent color used for window
decorations, focus indicators, and compositor UI elements.
Color components are unsigned values in the range [0, 255].
The compositor handles out-of-range values according to its
own policy and may clamp a component to a supported bound.
The compositor applies the change immediately and broadcasts
an accent_color event to all active appearance observers.
treeland_appearance_manager_v1
request set_window_opacity(
opacity: fixed,
)- opacity — window background opacity [0.0, 1.0]
set the global window background opacity
Set the global window background opacity as a fixed-point
value in the range [0.0, 1.0]. A value of 1.0 means fully
opaque; 0.0 means fully transparent. The compositor handles
out-of-range values according to its own policy and may clamp
a value to a supported bound.
The compositor applies the change immediately and broadcasts
a window_opacity event to all active appearance observers.
treeland_appearance_manager_v1
request set_color_scheme(
scheme: uint<color_scheme>,
)- scheme — color scheme hint to apply
set the color scheme hint
Set the color scheme hint. Values outside the color_scheme
enum range are silently ignored; the current color scheme
is kept unchanged.
The compositor applies the change immediately, updates
server-side decorations, and broadcasts a color_scheme event
to all active appearance observers so that clients can
restyle their self-drawn components.
treeland_appearance_manager_v1
request set_titlebar_height(
height: uint,
)- height — titlebar height in pixels; 0 to hide titlebar
set the compositor titlebar height
Set the height of the compositor-drawn titlebar in pixels.
A value of 0 hides the compositor titlebar. The compositor
handles out-of-range values according to its own policy and
may clamp a value to a supported bound.
The compositor applies the change immediately and broadcasts
a titlebar_height event to all active appearance observers.
treeland_appearance_manager_v1
request set_corner_radius(
radius: uint,
)- radius — corner radius in pixels; 0 for square corners
set the global window corner radius
Set the global default corner radius applied to window
decorations in pixels. This is the default for all windows;
individual windows may override it via
treeland_decoration_context_v1.set_corner_radius.
A value of 0 specifies square (unrounded) corners. The
compositor handles out-of-range values according to its own
policy and may clamp a value to a supported bound.
The compositor applies the change immediately and broadcasts
a corner_radius event to all active appearance observers.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
query and observe user-level appearance settings
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows general applications to query and receive live
notifications for user-level appearance settings managed by the
compositor, including cursor theme and size, fonts (proportional,
monospace, size), and visual appearance (icon theme, accent color,
window opacity, color scheme, titlebar height, and corner radius).
Any client may bind this interface. The compositor pushes the current
value of every setting immediately after the client binds this global,
and broadcasts events to all bound clients whenever a setting changes.
The terms "must", "must not", "should", and "may" in this document are
to be interpreted as described in RFC 2119.
Version 1
user-level appearance settings observer
A singleton global for observing user-level appearance settings
of the current user. These settings are shared by all windows
and clients of the user rather than being per-window. Each
bound client receives events reporting the initial values of
all settings immediately after binding, and subsequent events
whenever any setting changes.
treeland_appearance_v1
enum color_scheme {
light = 0,
dark = 1,
}- light — prefer light color scheme
- dark — prefer dark color scheme
user-level color scheme hint
A user-level hint for the preferred color scheme. Clients
should use this value to style their self-drawn widgets and
UI elements accordingly. The compositor also applies this
hint to server-side decorations. This is semantically
equivalent to org.freedesktop.appearance color-scheme and
the CSS prefers-color-scheme media feature.
This enum mirrors treeland_appearance_manager_v1.color_scheme
(in the privileged treeland-appearance-manager-unstable-v1
protocol): the entry names and values are identical and must
stay in sync. Any new value must be added to both at once.
treeland_appearance_v1
event cursor_theme(
name: string,
)- name — current cursor theme name
cursor theme has changed
Emitted by the compositor when the cursor theme changes.
Also emitted immediately after binding to report the
current theme.
treeland_appearance_v1
event cursor_size(
width: uint,
height: uint,
)- width — current cursor width in pixels
- height — current cursor height in pixels
cursor size has changed
Emitted by the compositor when the cursor size changes.
Also emitted immediately after binding to report the
current size in pixels. Width and height may differ on
hardware that supports non-square cursor planes.
treeland_appearance_v1
event font(
font_name: string,
)- font_name — current proportional font family name
proportional font has changed
Emitted when the proportional font family changes.
Also emitted immediately after binding to report the current
font.
treeland_appearance_v1
event monospace_font(
font_name: string,
)- font_name — current monospace font family name
monospace font has changed
Emitted when the monospace font family changes.
Also emitted immediately after binding to report the current
font.
treeland_appearance_v1
event font_size(
size: uint,
)- size — current font size in points
font size has changed
Emitted when the base font size changes.
Also emitted immediately after binding to report the current
size in points.
treeland_appearance_v1
event icon_theme(
theme_name: string,
)- theme_name — current icon theme name
icon theme has changed
Emitted when the icon theme changes. Also emitted
immediately after binding to report the current theme.
treeland_appearance_v1
event accent_color(
r: uint,
g: uint,
b: uint,
)- r — current accent color red component [0, 255]
- g — current accent color green component [0, 255]
- b — current accent color blue component [0, 255]
accent color has changed
Emitted when the accent color changes. Also emitted
immediately after binding to report the current color.
Color components are unsigned values in the range [0, 255].
treeland_appearance_v1
event window_opacity(
opacity: fixed,
)- opacity — current window background opacity [0.0, 1.0]
global window opacity has changed
Emitted when the global window background opacity changes.
Also emitted immediately after binding to report the current
value. The value is a fixed-point value in the range [0.0, 1.0].
treeland_appearance_v1
event color_scheme(
scheme: uint<color_scheme>,
)- scheme — current color scheme hint
color scheme hint has changed
Emitted when the color scheme hint changes. Also
emitted immediately after binding to report the current
scheme. Clients should restyle their self-drawn components
whenever this event is received.
treeland_appearance_v1
event titlebar_height(
height: uint,
)- height — current compositor titlebar height in pixels
compositor titlebar height has changed
Emitted when the compositor titlebar height changes. Also
emitted immediately after binding to report the current
value in pixels.
treeland_appearance_v1
event corner_radius(
radius: uint,
)- radius — current global corner radius in pixels
global window corner radius has changed
Emitted when the global default corner radius changes.
Also emitted immediately after binding to report the current
value in pixels.
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
protocol for capturing output contents or window contents
This protocol allows authorized application to capture output contents or window
contents(useful for window streaming).
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
- cancel_reason
- flags
- destroy — delete this object
- start — start session
- frame_done — Indicates current frame is done.
- frame — supply the client with information about the frame
- object — supply the client with object fd
- ready — indicates frame is available for reading
- cancel — Notifies current frame is no longer valid.
persistent screen capture session
Represents a persistent screen capture session that continuously sends frames.
treeland_capture_session_v1
enum cancel_reason {
temporary = 0,
permanent = 1,
resizing = 2,
}- temporary — temporary error, source will produce more frames
- permanent — fatal error, source will not produce frames
- resizing — temporary error, source will produce more frames
treeland_capture_session_v1
request frame_done(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_usec: uint,
)- tv_sec_hi — high 32 bits of the ready timestamp seconds
- tv_sec_lo — low 32 bits of the ready timestamp seconds
- tv_usec — ready timestamp microseconds
Indicates current frame is done.
This is the ACK to the current "ready" event. The next "frame" event will be sent only when current
"ready" event is acknowledged. The timestamp should be the same as the one sent in "ready" event.
If the frame has the "transient" flag, all objects sent before become invalid after this event.
treeland_capture_session_v1
event frame(
offset_x: int,
offset_y: int,
width: uint,
height: uint,
buffer_flags: uint,
flags: uint<flags>,
format: uint,
mod_high: uint,
mod_low: uint,
num_objects: uint,
)- offset_x — crop offset x
- offset_y — crop offset y
- width — frame width in pixels
- height — frame height in pixels
- buffer_flags — buffer flags
- format — DRM format code
- mod_high — DRM format modifier high bits
- mod_low — DRM format modifier low bits
- num_objects — number of DMA-BUF objects in the frame
supply the client with information about the frame
Main event supplying the client with information about the frame. If the capture didn't fail, this event is always
emitted first before any other events.
When mask is provided, x and y should be offset relative to mask surface origin. Otherwise offset_x and offset_y should always
be zero.
treeland_capture_session_v1
event object(
index: uint,
fd: fd,
size: uint,
offset: uint,
stride: uint,
plane_index: uint,
)- index — object index
- fd — DMA-BUF file descriptor
- size — size of the DMA-BUF in bytes
- offset — offset into the DMA-BUF
- stride — line stride in bytes
- plane_index — plane index within the buffer
supply the client with object fd
Provides a DMA-BUF object for the current frame.
treeland_capture_session_v1
event ready(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the presentation timestamp seconds
- tv_sec_lo — low 32 bits of the presentation timestamp seconds
- tv_nsec — presentation timestamp nanoseconds
indicates frame is available for reading
This event is sent as soon as the frame is presented, indicating it is available for reading. This event
includes the time at which presentation happened at.
treeland_capture_session_v1
event cancel(
reason: uint<cancel_reason>,
)Notifies current frame is no longer valid.
If the capture failed or if the frame is no longer valid after the "frame" event has been emitted, this
event will be used to inform the client to scrap the frame.
Version 1
Version 1
treeland_capture_context_v1
enum source_failure {
selector_busy = 1,
user_cancel = 2,
source_destroyed = 3,
other = 4,
}- selector_busy — selector is occupied by other context
- user_cancel — User cancel this context from compositor
- source_destroyed — Source has been destroyed
- other — other failure
treeland_capture_context_v1
request select_source(
source_hint: uint<source_type>,
freeze: uint,
with_cursor: uint,
mask: nullable object<wl_surface>,
)- source_hint — hint for the type of source to select
- freeze — freeze compositing or not
- with_cursor — whether source content contains cursor or not
- mask — this mask is guaranteed to be at the top most
select source interactively
Selector is provided by compositor. Client can provide source hint to hint compositor
to provide certain kinds of source.
treeland_capture_context_v1
event source_ready(
region_x: int,
region_y: int,
region_width: uint,
region_height: uint,
source_type: uint<source_type>,
)- region_x — offset x of capture region relative to mask for capture contents
- region_y — offset y of capture region relative to mask for capture contents
- region_width — width of capture region
- region_height — height of capture region
- source_type — final capture source type
notify client that source is ready
This event supplies the client some information about the capture source, including
the capture region relative to mask and source type.
Version 1
Compositor Support
capture manager
Global factory for creating capture sessions and capture contexts.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
compositor action triggering for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows a privileged DDE client such as the dock, the
shutdown applet, or the greeter to trigger compositor actions
directly, without registering a keyboard or gesture shortcut.
This protocol is independent of treeland_shortcut_manager_v3 and of
any other Treeland protocol. The action values defined here form
their own value space: they are not aligned with, and must not be
assumed to match, the action enum of the shortcut manager. The
compositor maps them to internal actions through its own table, and
future versions of either protocol may add, renumber, or remove
entries without regard to the other.
Following the split used by KWin, this protocol exposes only actions
that are independent of the currently active window and of an
in-progress keyboard task-switching sequence: workspace switching,
show-desktop, the multitask overview, screen zoom, the FPS overlay,
and session-level actions (lock, shutdown menu, user switch). Actions
that act on the currently active window (maximize, minimize, close,
move, resize, show the window menu, snap tiling, and moving a window
across workspaces) and the task-switch stepping actions depend on
implicit runtime state (the active window or an ongoing Alt-Tab-like
sequence) and are not exposed here; they remain available only as
keyboard or gesture shortcuts registered through
treeland_shortcut_manager_v3. Exposing those window-level actions as
a directly callable interface would let a background client manipulate
a window chosen by keyboard focus rather than by explicit reference,
which is the same reason KWin keeps them behind kglobalaccel instead
of offering them on its DBus interface.
The compositor must reject bind attempts from non-privileged
clients.
This interface is stateless: each request is an independent one-shot
action. The compositor does not send events in response to these
requests; clients that need to observe the resulting session state
should use the appropriate session or idle protocols instead.
The terms "must", "must not", "should", and "may" in this document
are to be interpreted as described in RFC 2119.
Version 1
- action — compositor actions
- destroy — destroy the compositor action object
- trigger — trigger a compositor action
compositor action trigger
A global that exposes compositor actions to a privileged
DDE client.
The compositor must reject bind attempts from non-privileged
clients.
Only window-independent actions are exposed here; actions
that target the currently active window or step an in-progress
task switch are not part of this interface and must be triggered
as shortcuts through treeland_shortcut_manager_v3. See the
protocol-level description for the rationale.
All actions are triggered with the trigger request, which takes
an action argument.
The compositor should ignore an action it cannot perform, for
example locking while a lock screen is already active; clients
must not assume an action has taken effect.
The shutdown-menu actions show the shutdown and session menu;
they differ only in which menu button receives the default
keyboard focus. shutdown_menu expresses no preference; the
power_off, reboot, suspend, hibernate, and log_out entries
request focus on the matching button. Showing the menu does not
perform the power action itself; the compositor or greeter
carries out the chosen action after the user confirms.
treeland_compositor_action_v1
enum action {
workspace_1 = 1,
workspace_2 = 2,
workspace_3 = 3,
workspace_4 = 4,
workspace_5 = 5,
workspace_6 = 6,
workspace_7 = 7,
workspace_8 = 8,
workspace_9 = 9,
workspace_10 = 10,
workspace_11 = 11,
workspace_12 = 12,
prev_workspace = 13,
next_workspace = 14,
show_desktop = 15,
open_multitask_view = 16,
close_multitask_view = 17,
toggle_multitask_view = 18,
zoom_in = 19,
zoom_out = 20,
zoom_reset = 21,
toggle_fps_display = 22,
lockscreen = 23,
shutdown_menu = 24,
show_user_switch = 25,
shutdown_menu_power_off = 26,
shutdown_menu_reboot = 27,
shutdown_menu_suspend = 28,
shutdown_menu_hibernate = 29,
shutdown_menu_log_out = 30,
}- workspace_1 — switch to workspace 1
- workspace_2 — switch to workspace 2
- workspace_3 — switch to workspace 3
- workspace_4 — switch to workspace 4
- workspace_5 — switch to workspace 5
- workspace_6 — switch to workspace 6
- workspace_7 — switch to workspace 7
- workspace_8 — switch to workspace 8
- workspace_9 — switch to workspace 9
- workspace_10 — switch to workspace 10
- workspace_11 — switch to workspace 11
- workspace_12 — switch to workspace 12
- prev_workspace — switch to the previous workspace
- next_workspace — switch to the next workspace
- show_desktop — toggle show-desktop mode
- open_multitask_view — open the multitask overview
- close_multitask_view — close the multitask overview
- toggle_multitask_view — toggle the multitask overview
- zoom_in — zoom in the screen
- zoom_out — zoom out the screen
- zoom_reset — reset the screen zoom level
- toggle_fps_display — toggle the compositor FPS overlay
- lockscreen — lock the screen
- shutdown_menu — show the shutdown/session menu with no default-focus preference
- show_user_switch — show the user switch UI
- shutdown_menu_power_off — show the shutdown/session menu, focusing the power-off button
- shutdown_menu_reboot — show the shutdown/session menu, focusing the reboot button
- shutdown_menu_suspend — show the shutdown/session menu, focusing the suspend button
- shutdown_menu_hibernate — show the shutdown/session menu, focusing the hibernate button
- shutdown_menu_log_out — show the shutdown/session menu, focusing the log-out button
compositor actions
Shell actions exposed through the trigger request, limited
to those independent of the currently active window.
The values are specific to this protocol. They are not
aligned with the action enum of
treeland_shortcut_manager_v3, and clients must not build any
mapping between the two enums.
Actions that target the currently active window (maximize,
minimize, close, move, resize, show the window menu, snap
tiling, and moving a window across workspaces) and the
task-switch stepping actions are not part of this enum; they
depend on the active window or an in-progress switching
sequence and are reachable only as shortcuts via
treeland_shortcut_manager_v3.
Values 25-30 (show_user_switch and the focused shutdown-menu
actions) have no counterpart in the shortcut manager because
they are triggered by a shell client rather than a keyboard
shortcut. The focused shutdown-menu entries behave like
shutdown_menu but request default focus on the matching
button.
treeland_compositor_action_v1
request trigger(
action: uint<action>,
)- action — the compositor action to trigger
trigger a compositor action
Trigger the compositor action identified by the action argument.
The compositor should ignore the request when the action
cannot be performed, for example locking while a lock
screen is already active, or showing the shutdown menu while
a lock screen is already active. Clients must not assume
the action has taken effect.
The shutdown-menu actions show the menu; they do not perform
the power action itself.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
DDE shell surface role for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol lets a privileged DDE client turn a wl_surface
into a shell surface that renders below the wlr-layer-shell
layer stack, at the overlay level of the workspace, and position
it at coordinates relative to an output or auto-place it below
the cursor.
The compositor must reject bind attempts from non-privileged
clients.
The terms "must", "must not", "should", and "may" in this document
are to be interpreted as described in RFC 2119.
Version 1
factory for DDE shell surfaces
A global that creates treeland_dde_shell_surface_v2 objects for
privileged DDE clients implementing parts of the shell user
interface.
The compositor must reject bind attempts from non-privileged
clients.
Version 1
shell surface role
A shell surface object assigns the DDE shell surface role to a
wl_surface. A shell surface renders either at the overlay level
of the workspace (above normal toplevel windows but below
layer-shell surfaces) or at the normal window layer, as
selected by the set_role request. The default role is overlay.
The role carries no requests that map, commit, or configure
buffer state; the client commits buffers with wl_surface
semantics as usual.
On the server side the object is automatically destroyed when
the related wl_surface is destroyed. On the client side,
treeland_dde_shell_surface_v2.destroy() must be called before
destroying the wl_surface object.
Positioning requests are mutually exclusive: set_position_hint
suggests fixed coordinates relative to an output, while
set_cursor_placement_hint asks the compositor to place the
surface relative to the cursor. The most recently sent
request determines the placement mode. Both requests are
hints for the initial placement of the surface: the
compositor decides the final position and may adjust it to
keep the surface accessible, for example to keep its
titlebar area within the output. Clients must not assume the
requested position is honored exactly.
treeland_dde_shell_surface_v2
enum role {
normal = 0,
overlay = 1,
}- normal — normal window layer, below the overlay layer and participating in regular toplevel stacking
- overlay — workspace overlay layer, above normal toplevels and below layer-shell surfaces
rendering layer for a shell surface
The layer a shell surface renders in. Layers are ordered by
z depth. Multiple surfaces can share a single role, and
ordering within a single role is undefined.
treeland_dde_shell_surface_v2
enum skip_flag {
switcher = 0x1,
dock_preview = 0x2,
multitask_view = 0x4,
}This is a bitfield
- switcher — do not list the window in the task switcher
- dock_preview — do not show the window in dock window previews
- multitask_view — do not list the window in the multitask view
window-listing preferences
Flags indicating that the surface prefers not to be listed
in specific shell views. Used by the set_skip_flags
request. Compositors should honor these preferences but
may ignore them, for example for windows the user must
always be able to reach.
treeland_dde_shell_surface_v2
request set_role(
role: uint<role>,
)- role — the rendering layer for this surface
assign a rendering layer to this surface
Assign the role identified by the role enum to this shell
surface, selecting the layer it renders in. The default
role before this request is overlay.
Assigning the normal role returns the surface to the
regular window layer, participating in normal toplevel
stacking again.
treeland_dde_shell_surface_v2
request set_position_hint(
output: nullable object<wl_output>,
x: int,
y: int,
)- output — the output whose origin anchors the coordinates, or null for the primary output
- x — x coordinate relative to the output origin
- y — y coordinate relative to the output origin
suggest a fixed position relative to an output
Suggest a position for the surface. The coordinates are
relative to the origin of the given output; for example
50,50 suggests placing the surface 50 units right of and
50 units below the output's top-left corner, wherever
that output currently sits in the global space spanning
all outputs.
The output argument may be null, in which case the
compositor uses the primary output as the anchor.
Otherwise the output must be a valid, current wl_output.
The position is resolved at request time; the compositor
does not keep the output associated with this surface
afterwards, and the client may release the wl_output
proxy once the request has been sent. If the output is
later destroyed, the already-applied position is not
affected.
This request is a hint for the initial placement of the
surface: the compositor decides the final position and
may adjust it to keep the surface accessible. Clients
must not assume the requested position is honored
exactly.
treeland_dde_shell_surface_v2
request set_cursor_placement_hint(
x_offset: int,
y_offset: int,
)- x_offset — horizontal offset of the surface center from the cursor center, positive to the right
- y_offset — distance from the bottom of the cursor to the top of the surface
suggest placing the surface relative to the cursor
Suggest placing the surface relative to the current cursor
position: horizontally offset by x_offset from the cursor
center and vertically offset by y_offset from the bottom
of the cursor.
This request is a hint for the initial placement of the
surface: the compositor decides the final position and
may adjust it to keep the surface accessible. Clients
must not assume the requested position is honored
exactly.
Sending this request switches the placement mode to
cursor-relative; see the interface description for the
interaction with set_position_hint.
treeland_dde_shell_surface_v2
request set_skip_flags(
flags: uint<skip_flag>,
)- flags — bitfield of views that should not list this surface
set window-listing preferences
Set the shell views that should not list this surface. The
flags argument is a bitfield of skip_flag values; setting
a flag asks the shell view not to include the surface,
clearing it restores default listing. This request
replaces any previously set flags.
treeland_dde_shell_surface_v2
request set_accept_keyboard_focus(
accept: uint,
)- accept — 0 to refuse keyboard focus, 1 to accept it
control whether the surface accepts keyboard focus
Set whether this surface can receive keyboard focus. When
set to 0, the surface will not receive keyboard focus even
when clicked or activated. When set to 1 (the default), the
surface receives keyboard focus normally.
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
DDE shell integration for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
Compositor Support
dde shell manager
This interface allows DDE to configure some treeland functions.
treeland_dde_shell_manager_v1
request set_xwindow_position_relative(
callback: new_id<wl_callback>,
wid: uint,
anchor: object<wl_surface>,
dx: fixed,
dy: fixed,
)- wid — X11 window ID
- anchor — the reference surface
- dx — horizontal offset from anchor
- dy — vertical offset from anchor
Move a XWayland surface to a position relative to a wl_surface
Deprecated: this request is non-functional and has no
effect. Superseded by the set_xwindow_position_relative
request of the treeland_xwindow_control_v1 global of the
treeland-xwindow-control-unstable-v1 protocol.
Version 1
- enter — detected window has become overlapped
- leave — detected window is no longer overlapped
- anchor — same layershell
- update — Register the detected surface
- destroy — destroy the treeland_window_overlap_checker object
A window overlap checker
Deprecated: this interface is non-functional. Apart from
the destroy request, all requests have no effect and no
events are ever emitted. New code must not use it.
Superseded by the treeland_region_watch_manager_v1
global of the treeland-region-watch-unstable-v1
protocol.
treeland_window_overlap_checker
event enter()
detected window has become overlapped
Sent when the detected window region begins to overlap
with any xdg-shell toplevel. Sent at most once per
update cycle.
treeland_window_overlap_checker
event leave()
detected window is no longer overlapped
Sent when the detected window region no longer overlaps
with any xdg-shell toplevel. Sent at most once per
update cycle.
treeland_window_overlap_checker
enum anchor {
top = 1,
bottom = 2,
left = 4,
right = 8,
}This is a bitfield
- top — the top edge of the anchor rectangle
- bottom — the bottom edge of the anchor rectangle
- left — the left edge of the anchor rectangle
- right — the right edge of the anchor rectangle
same layershell
same layershell
treeland_window_overlap_checker
request update(
width: int,
height: int,
anchor: uint<anchor>,
output: object<wl_output>,
)- width — width of the detected window region
- height — height of the detected window region
Register the detected surface
This interface is used to receive the detected surface.
When the xdgshell window in the workspace overlaps with the detected window,
an event will be sent to notify the client to process it.
The window position will only be recorded when this interface is called.
If the window moves, this interface needs to be called again.
Version 1
metadata interface
An interface that may be implemented by a wl_surface, for
implementations that provide the shell user interface.
It provides requests to set surface role, set skip, set the position
set auto placement in output coordinates.
On the server side the object is automatically destroyed when
the related wl_surface is destroyed. On client side,
treeland_dde_shell_surface_v1.destroy() must be called before
destroying the wl_surface object.
treeland_dde_shell_surface_v1
request set_surface_position(
x: int,
y: int,
)- x — x coordinate in global space
- y — y coordinate in global space
change the shell surface position
Move the surface to new coordinates.
Coordinates are global, for example 50,50 for a 1920,0+1920x1080 output
is 1970,50 in global coordinates space.
treeland_dde_shell_surface_v1
enum role {
overlay = 1,
}available roles for surfaces
These values indicate which roles a surface can be rendered in, They
are ordered by z depth.
Displayed below wlr-layer-shell, at the overlay level of the workspace.
Multiple surfaces can share a single role, and ordering within a single
role is undefined.
treeland_dde_shell_surface_v1
request set_auto_placement(
y_offset: uint,
)- y_offset — y position is relative to the cursor bottom
Place the surface at the bottom of the cursor area
Set the vertical alignment of the surface within the cursor width.
Do not use it together with set_surface_position to avoid exceptions.
The position of the surface will be controlled by the compositor after the
request, including preventing it from being displayed beyond the edge of
the output.
treeland_dde_shell_surface_v1
request set_skip_switcher(
skip: uint,
)- skip — Boolean value that sets whether to skip the window switcher.
make the window not appear in a switcher
Setting this bit will indicate that the window prefers not to be listed in a switcher.
treeland_dde_shell_surface_v1
request set_skip_dock_preview(
skip: uint,
)- skip — Boolean value that sets whether to skip the dock preview.
make the window not appear in a dock preview
Setting this bit will indicate that the window prefers not to be listed in a dock preview.
treeland_dde_shell_surface_v1
request set_skip_muti_task_view(
skip: uint,
)- skip — Boolean value that sets whether to skip the mutitask view.
make the window not appear in a mutitask view
Setting this bit will indicate that the window prefers not to be listed in a mutitask view.
treeland_dde_shell_surface_v1
request set_accept_keyboard_focus(
accept: uint,
)- accept — Boolean value that sets whether to accept keyboard focus
control whether the surface accepts keyboard focus
Setting this will determine whether the surface can receive keyboard focus.
When set to 0, the surface will not receive keyboard focus even when clicked or activated.
When set to 1 (default), the surface will receive keyboard focus normally.
Version 1
- destroy — destroy the treeland_dde_active_v1 object
- reason — event reason
- active_in — active in event was triggered
- active_out — active out event was triggered
- start_drag — sent when the compositor starts a drag operation
- drop — sent when the compositor completes a drop operation
metadata interface
Deprecated: this interface is non-functional. Apart from
the destroy request, all requests have no effect and no
events are ever emitted. New code must not use it.
Superseded by the treeland_active_notify_manager_v1 global of
the treeland-active-notify-unstable-v1 protocol.
Version 1
- destroy — destroy the treeland_multitaskview_v1 object
- toggle — toggle multitaskview
multitaskview context interface
An interface used to control multitaskview.
Deprecated: superseded by the open_multitask_view,
close_multitask_view, and toggle_multitask_view actions of the
treeland_compositor_action_v1 global of the
treeland-compositor-action-unstable-v1 protocol. The interface
must not be used in new code.
Version 1
- destroy — destroy the treeland_window_picker_v1 object
- pick — pick a window
- window — window picked
window picker interface
An interface used to pick window and return credentials.
Version 1
lockscreen interface
An interface used to operate lockscreen.
Deprecated: superseded by the lockscreen, shutdown_menu, and
show_user_switch actions of the treeland_compositor_action_v1
global of the treeland-compositor-action-unstable-v1 protocol.
The interface must not be used in new code.
Copyright
SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
private communication between treeland and ddm
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
core global for treeland - ddm connection
This is the treeland - ddm private communication protocol.
This object is primarily used for establish connection between
treeland and ddm.
treeland_ddm_v1
request switch_to_user(
username: string,
)- username — the user to switch to
call treeland to switch lockscreen user
Set lockscreen user to username. Ignore when username is "ddm". This is used to prevent ddm from triggering a user switch back to the greeter.
treeland_ddm_v1
request deactivate_session()
deactivate wayland session
Deactivate treeland session. This will release control of the
screen, but not to close the current seats.
treeland_ddm_v1
request enable_render()
start treeland rendering
Enable treeland rendering. This is primarily called after
disable_render to resume treeland.
treeland_ddm_v1
request disable_render(
callback: new_id<wl_callback>,
)- callback — callback sent when rendering has been disabled
stop treeland rendering
Disable treeland rendering. This will prevent treeland from
output to DRM device.
treeland_ddm_v1
event switch_to_vt(
vtnr: int,
)- vtnr — the virtual terminal number to switch to
switch to virtual terminal
Call ddm to switch current virtual terminal to vtnr. ddm should
take care of the switch and call ioctl respectively.
treeland_ddm_v1
event acquire_vt(
vtnr: int,
)- vtnr — the virtual terminal number to acquire
acquire control of virtual terminal
Call ddm to acquire control of VT at vtnr. ddm should call
VT_SETMODE respectively.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
per-window server-side decoration customization
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol fine-tunes the compositor-drawn server-side decorations
(SSD) of the client's own toplevel windows: corner radius, shadow,
border, and titlebar visibility.
It is not standalone: the client must first negotiate SSD for the
surface via xdg-decoration. The compositor applies these requests
according to its own policy; in particular it may silently ignore a
set_* request on a surface that has not negotiated SSD, or clamp an
out-of-range value to a supported bound instead of raising an error.
This enables a "half-CSD, half-SSD" configuration: keep the
compositor's border, corners and shadow while hiding its titlebar
(set_titlebar_mode(hide)) and drawing a custom one.
Each property is opt-in: if a set_* request is never sent, the
compositor applies its own default for that window's SSD. Sending a
request takes ownership of that property for the lifetime of the
context.
The terms "must", "must not", "should", and "may" in this document are
to be interpreted as described in RFC 2119.
Version 1
factory for per-window SSD customization contexts
A global that creates per-surface SSD customization contexts.
Each surface may have at most one active decoration context.
Attempting to create a second context for the same surface while
one is already alive is a protocol error (already_used).
treeland_decoration_manager_v1
enum error {
already_used = 0,
invalid_surface = 1,
}- already_used — a decoration context already exists for this surface
- invalid_surface — the surface is not owned by the requesting client
protocol errors for this interface
Error codes sent as protocol errors via wl_display.error.
treeland_decoration_manager_v1
request get_decoration_context(
id: new_id<treeland_decoration_context_v1>,
surface: object<wl_surface>,
)- id — new decoration context for the given surface
- surface — surface to decorate; must be owned by this client
create a decoration context for a surface
Create a treeland_decoration_context_v1 for the given
surface. The surface must be owned by the requesting client;
passing a surface owned by another client raises the
invalid_surface protocol error.
The surface should hold a toplevel role (xdg_toplevel). The
context itself may be created before SSD is negotiated; until
SSD is negotiated via xdg-decoration, set_* requests on the
context have no effect and are silently ignored by the
compositor.
Creating a second context for the same surface while one is
already alive is a protocol error (already_used).
Version 1
per-surface server-side decoration customization
Controls the compositor-drawn server-side decorations for a single
surface. Created by
treeland_decoration_manager_v1.get_decoration_context.
All requests take effect immediately; there is no pending/commit
model. The compositor applies each change as soon as it processes
the request.
This object becomes inert when the underlying wl_surface is
destroyed; requests on an inert context are silently ignored.
The client should destroy this context before or immediately after
destroying the associated wl_surface.
treeland_decoration_context_v1
enum titlebar_mode {
show = 0,
hide = 1,
}- show — show the compositor titlebar (the SSD default)
- hide — hide the compositor titlebar; the client is expected to draw its own titlebar inside the window content while keeping the rest of the SSD
SSD titlebar visibility override
Controls whether the compositor-drawn (server-side) titlebar
is visible, overriding the compositor's default. Hiding the
titlebar while keeping the rest of the SSD is what produces a
"half-CSD, half-SSD" configuration.
treeland_decoration_context_v1
request destroy()
Destructor
destroy the decoration context
Destroy the context. The compositor may revert any or all
customized properties to its default behavior after this
request.
treeland_decoration_context_v1
request set_corner_radius(
radius: uint,
)- radius — corner radius in pixels; 0 for square corners
override the SSD corner radius
Override the compositor's corner rounding for this surface.
Once set, the compositor no longer applies its global corner
radius to this window.
A value of 0 requests square corners. The compositor applies
this request according to its own policy and may clamp an
out-of-range value to a supported bound.
treeland_decoration_context_v1
request set_shadow(
radius: uint,
offset_x: int,
offset_y: int,
r: uint,
g: uint,
b: uint,
a: uint,
)- radius — shadow blur radius in pixels; 0 to disable shadow
- offset_x — horizontal shadow offset in pixels; positive is right
- offset_y — vertical shadow offset in pixels; positive is down
- r — shadow color red component [0, 255]
- g — shadow color green component [0, 255]
- b — shadow color blue component [0, 255]
- a — shadow color alpha component [0, 255]
configure the compositor-drawn shadow
Override the compositor-drawn drop shadow for this surface.
When radius is 0 the shadow is disabled and all other
arguments are ignored. Color components are unsigned in
[0, 255]. The compositor applies this request according to its
own policy and may clamp an out-of-range radius to a supported
bound.
treeland_decoration_context_v1
request set_border(
width: uint,
r: uint,
g: uint,
b: uint,
a: uint,
)- width — border width in pixels; 0 to disable border
- r — border color red component [0, 255]
- g — border color green component [0, 255]
- b — border color blue component [0, 255]
- a — border color alpha component [0, 255]
configure the compositor-drawn border
Override the compositor-drawn border for this surface.
When width is 0 the border is disabled and the color
arguments are ignored. Color components are unsigned in
[0, 255]. The compositor applies this request according to its
own policy and may clamp an out-of-range width to a supported
bound.
treeland_decoration_context_v1
request set_titlebar_mode(
mode: uint<titlebar_mode>,
)- mode — titlebar visibility override
control SSD titlebar visibility
Override whether the compositor draws a server-side titlebar
for this surface, per the titlebar_mode enum. A mode value
outside the titlebar_mode enum range is silently ignored; the
current titlebar visibility is kept.
Hiding the titlebar leaves the rest of the SSD (border,
corner radius, shadow) in effect; the client is then expected
to draw its own titlebar inside the window content.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
one-line protocol summary
Replace this description with the protocol's purpose, object model, and
lifecycle guarantees.
If this specification uses RFC 2119 keywords normatively, include the
standard interpretation paragraph here.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
manager global
Describe what this global creates, any singleton or binding rules,
and a brief high-level workflow for clients.
Version 1
example per-object interface
Describe the object's state, lifetime, and relation to Wayland core objects.
treeland_example_object_v1
event configured(
serial: uint,
)- serial — configuration serial
notify current state
Describe event meaning, compositor-side trigger timing, and what
the client should do next.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
manage foreign toplevel windows
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows privileged clients such as dock or taskbar
components to observe and manage toplevel windows on behalf of the
compositor. It provides access to window metadata (title, app-id,
state, parent, outputs), allows requests to maximize, minimize,
activate, close, or fullscreen a toplevel, and supports a dock
preview context for thumbnail display and tooltip overlays.
The terms "must", "must not", "should", "may", and "recommended"
in this document are to be interpreted as described in RFC 2119.
Version 1
- error — protocol errors for this interface
- destroy — destroy the manager object
- stop — stop sending events
- get_dock_preview_context — create a dock preview context for a surface
- toplevel — a toplevel window has been mapped
- finished — the compositor has finished with the toplevel manager
observe and manage toplevel windows
A singleton global that emits one treeland_foreign_toplevel_handle_v2
object per mapped toplevel window. Clients bind this global to
receive the toplevel event stream and to create dock preview
contexts.
A toplevel is defined as a surface with a role similar to
xdg_toplevel. XWayland surfaces may be treated like toplevels
in this protocol.
Clients which only care about the current state can perform a
roundtrip after binding this global.
The typical lifecycle is:
Client binds treeland_foreign_toplevel_manager_v2.
Compositor emits a toplevel event for each already-mapped
toplevel, followed by individual property events and a done
event on each handle.
As windows appear and disappear the compositor emits further
toplevel events and closed events on the corresponding handles.
When the client no longer needs the manager it sends stop,
waits for the finished event, destroys the handles, and then
the manager itself. Outstanding handles remain usable until
the client destroys them individually.
treeland_foreign_toplevel_manager_v2
enum error {
invalid_surface = 0,
context_already_exists = 1,
}- invalid_surface — the relative_surface passed to get_dock_preview_context is not a valid wl_surface owned by the calling client
- context_already_exists — get_dock_preview_context was called for a surface that already has an active dock preview context; the client must destroy the existing context first
treeland_foreign_toplevel_manager_v2
request destroy()
Destructor
destroy the manager object
This request should be called either when the client will no
longer use the manager, or after the finished event has been
received.
If a client wishes to destroy this object it should send a
stop request and wait for a finished event, then destroy the
handles and then this object.
Existing treeland_foreign_toplevel_handle_v2 objects created
through this manager are not affected and must be destroyed
separately by the client.
treeland_foreign_toplevel_manager_v2
request stop()
stop sending events
This request indicates that the client no longer wishes to
receive events for new toplevels.
The Wayland protocol is asynchronous, meaning the compositor
may send further toplevel events until the stop request is
processed. The client should wait for a finished event
before destroying this object.
treeland_foreign_toplevel_manager_v2
event toplevel(
toplevel: new_id<treeland_foreign_toplevel_handle_v2>,
)- toplevel — the new toplevel handle
a toplevel window has been mapped
Emitted by the compositor whenever a new toplevel window is
mapped. The event is sent for all toplevels regardless of
which application created them.
Immediately after this event the compositor will send the
initial property events (title, app_id, pid, identifier,
state, output_enter, parent, and so on) on the new handle,
followed by a done event. The client should treat all
property events received before the first done as the
initial snapshot.
Version 1
- state — toplevel window state flags
- error — protocol errors for this interface
- destroy — destroy the handle object
- set_maximized — request that the toplevel be maximized
- unset_maximized — request that the toplevel be unmaximized
- set_minimized — request that the toplevel be minimized
- unset_minimized — request that the toplevel be unminimized
- set_fullscreen — request that the toplevel enter fullscreen
- unset_fullscreen — request that the toplevel leave fullscreen
- activate — request that the toplevel be activated
- close — request that the toplevel close itself
- set_icon_geometry — set the icon geometry of the toplevel
- pid — process ID of the owning application
- title — toplevel title has changed
- app_id — toplevel app-id has changed
- identifier — a stable identifier for a toplevel
- output_enter — toplevel is now visible on an output
- output_leave — toplevel is no longer visible on an output
- state — toplevel state has changed
- done — all pending property changes have been sent
- closed — the toplevel window has been unmapped
- parent — parent toplevel has changed
handle for a foreign toplevel window
Represents a single mapped toplevel window. The compositor
creates this object in response to the manager's toplevel event
and destroys the server-side resource when the window is
unmapped (signalled by the closed event).
After the compositor sends closed, the client must not send
any requests other than destroy. The client should call destroy
promptly after receiving closed to release compositor-side
tracking state.
All property events (title, app_id, pid, identifier,
output_enter, output_leave, state, parent) are grouped by a
trailing done event so that a batch of related changes appears
atomic to the client.
treeland_foreign_toplevel_handle_v2
enum state {
maximized = 0,
minimized = 1,
activated = 2,
fullscreen = 3,
attention = 4,
}- maximized — the toplevel is maximized
- minimized — the toplevel is minimized
- activated — the toplevel has keyboard focus
- fullscreen — the toplevel is fullscreen
- attention — the toplevel is requesting user attention
toplevel window state flags
Flags that describe the current state of a toplevel window.
These correspond to the states with the same names defined
in the xdg-toplevel interface. Each flag is encoded as a
uint32 value in the array sent by the state event.
treeland_foreign_toplevel_handle_v2
request destroy()
Destructor
destroy the handle object
Destroy the treeland_foreign_toplevel_handle_v2 object and
release all associated client-side resources.
This request may be sent at any time, including before the
compositor sends the closed event. When sent after closed,
it finalizes the destruction sequence initiated by the
compositor. When sent before closed, the compositor will
silently drop any further events for this handle.
When a handle is destroyed, a new handle may not be created
by the compositor until the toplevel is unmapped and then
remapped. Destroying a toplevel handle is not recommended
unless the client is cleaning up child objects before
destroying the manager, the toplevel was closed, or the
handle will not be used in the future.
Other protocols which extend the
treeland_foreign_toplevel_handle_v2 interface should
require destructors for extension interfaces to be called
before allowing the toplevel handle to be destroyed.
treeland_foreign_toplevel_handle_v2
request set_maximized()
request that the toplevel be maximized
Request that the compositor maximize the toplevel. The
compositor may ignore the request. If the maximized state
changes, the compositor will reflect this in a subsequent
state event followed by done.
treeland_foreign_toplevel_handle_v2
request unset_maximized()
request that the toplevel be unmaximized
Request that the compositor restore the toplevel from the
maximized state. The compositor may ignore the request. If
the state changes, it is reflected via state and done events.
treeland_foreign_toplevel_handle_v2
request set_minimized()
request that the toplevel be minimized
Request that the compositor minimize the toplevel. The
compositor may ignore the request. If the minimized state
changes, the compositor will reflect this in a subsequent
state event followed by done.
treeland_foreign_toplevel_handle_v2
request unset_minimized()
request that the toplevel be unminimized
Request that the compositor restore the toplevel from the
minimized state. The compositor may ignore the request. If
the state changes, it is reflected via state and done events.
treeland_foreign_toplevel_handle_v2
request set_fullscreen(
output: nullable object<wl_output>,
)- output — preferred output for fullscreen, or null for compositor choice
request that the toplevel enter fullscreen
Request that the compositor fullscreen the toplevel on the
given output. If output is null, the compositor chooses the
output. The output argument is a hint only; the compositor
may fullscreen on a different output or not at all.
If the fullscreen state or visible outputs change, the
compositor will reflect this via state and output_enter /
output_leave events followed by done.
treeland_foreign_toplevel_handle_v2
request unset_fullscreen()
request that the toplevel leave fullscreen
Request that the compositor exit the fullscreen state for
the toplevel. The compositor may ignore the request. If the
state changes, it is reflected via state and done events.
treeland_foreign_toplevel_handle_v2
request activate(
seat: object<wl_seat>,
)- seat — the seat on which to activate the toplevel
request that the toplevel be activated
Request that the compositor give keyboard focus to the
toplevel on the given seat. There is no guarantee the
toplevel will actually be activated; the compositor may
ignore the request based on seat focus policy or security
considerations.
treeland_foreign_toplevel_handle_v2
request close()
request that the toplevel close itself
Send a close request to the toplevel. The compositor
typically forwards this to the application using a
shell-specific mechanism such as xdg_toplevel.close.
There is no guarantee the application will honour the
request. If the toplevel is eventually unmapped, the
compositor will emit the closed event on this handle.
treeland_foreign_toplevel_handle_v2
request set_icon_geometry(
surface: object<wl_surface>,
x: int,
y: int,
width: int,
height: int,
)- surface — surface that contains the visual representation
- x — x offset in surface-local coordinates
- y — y offset in surface-local coordinates
- width — width of the rectangle in surface-local coordinates
- height — height of the rectangle in surface-local coordinates
set the icon geometry of the toplevel
Inform the compositor of the rectangle on surface that
visually represents this toplevel (for example the taskbar
icon or thumbnail), similar to the EWMH
_NET_WM_ICON_GEOMETRY property. The compositor may use this
as a hint for minimize animations or similar effects.
The client is not required to set this geometry. If unset,
the compositor applies an implementation-defined default.
If the client sets multiple rectangles, only the last one
takes effect.
Coordinates are in surface-local space of the given surface.
Setting width = height = 0 removes a previously set geometry.
The compositor raises the invalid_geometry error if the
provided dimensions are otherwise out of range.
treeland_foreign_toplevel_handle_v2
event pid(
pid: uint,
)- pid — process ID of the application
process ID of the owning application
Emitted by the compositor when it knows the process ID of
the application that owns this toplevel. This event is sent
once as part of the initial property snapshot, before the
first done event, and is not re-sent unless the owning
process changes.
treeland_foreign_toplevel_handle_v2
event title(
title: string,
)- title — the current title of the toplevel
toplevel title has changed
Emitted whenever the title of the toplevel changes. The
initial title is sent as part of the snapshot before the
first done event.
treeland_foreign_toplevel_handle_v2
event app_id(
app_id: string,
)- app_id — the current application ID of the toplevel
toplevel app-id has changed
Emitted whenever the app-id of the toplevel changes. The
initial app-id is sent as part of the snapshot before the
first done event.
treeland_foreign_toplevel_handle_v2
event identifier(
identifier: uint,
)- identifier — unique stable identifier for this toplevel
a stable identifier for a toplevel
This identifier is used to check if two or more toplevel
handles belong to the same toplevel.
The identifier is useful for command line tools or
privileged clients which may need to reference an exact
toplevel across processes or instances of the
treeland_foreign_toplevel_manager_v2 global.
The compositor sends this event exactly once, when the
handle is created, as part of the initial property
snapshot.
The identifier must be unique per toplevel and its
handles. Two different toplevels must not have the same
identifier. The identifier is only valid as long as the
toplevel is mapped. If the toplevel is unmapped the
identifier must not be reused. An identifier must not be
reused by the compositor to ensure there are no races when
sharing identifiers between processes.
treeland_foreign_toplevel_handle_v2
event output_enter(
output: object<wl_output>,
)- output — the output the toplevel entered
toplevel is now visible on an output
Emitted when the toplevel becomes visible on the given
output. A toplevel may be visible on multiple outputs
simultaneously. This event is sent as part of the initial
snapshot and whenever the set of visible outputs changes.
treeland_foreign_toplevel_handle_v2
event output_leave(
output: object<wl_output>,
)- output — the output the toplevel left
toplevel is no longer visible on an output
Emitted when the toplevel stops being visible on the given
output. A corresponding output_enter event for the same
output is guaranteed to have been sent before this event.
treeland_foreign_toplevel_handle_v2
event state(
state: array,
)- state — array of active treeland_foreign_toplevel_handle_v2.state enum values encoded as uint32
toplevel state has changed
Emitted immediately after the handle is created as part of
the initial property snapshot, and again each time the
toplevel state changes due to a compositor action or a
client request on this protocol.
The state argument is an array of uint32 values, each
corresponding to an entry in the treeland_foreign_toplevel_handle_v2.state
enum. An entry is present in the array when the corresponding
state is active.
treeland_foreign_toplevel_handle_v2
event closed()
the toplevel window has been unmapped
Emitted when the toplevel is unmapped or destroyed by the
compositor. No further property events will be sent on this
handle after closed. The handle becomes inert; the client
must not send any requests except destroy, which it should
call promptly to release compositor-side tracking resources.
Other protocols which extend the
treeland_foreign_toplevel_handle_v2 interface must also
ignore requests other than their destructors.
treeland_foreign_toplevel_handle_v2
event parent(
parent: nullable object<treeland_foreign_toplevel_handle_v2>,
)- parent — the parent toplevel handle, or null if there is no parent
parent toplevel has changed
Emitted whenever the parent-child relationship of this
toplevel changes. The parent arg is null when the toplevel
has no parent (i.e. it is a top-level root window).
This event is not re-sent when the client destroys the
parent handle; the relationship on the compositor side is
unchanged by client-side destruction of the parent object.
Version 1
- direction — position of the preview relative to the anchor surface
- destroy — destroy the dock preview context
- show — show a thumbnail preview of the given toplevels
- show_tooltip — show a tooltip near the anchor surface
- close — hide the preview popup
- enter — pointer entered the preview area
- leave — pointer left the preview area
dock preview and tooltip context for a surface
Provides the dock or taskbar component with the ability to
display a thumbnail preview of one or more toplevels and to
show tooltip overlays, both positioned relative to the anchor
surface supplied to get_dock_preview_context.
The object is created by
treeland_foreign_toplevel_manager_v2.get_dock_preview_context
and is valid until the client calls destroy. The compositor
emits enter and leave events when the pointer enters or leaves
the active preview area.
treeland_dock_preview_context_v2
enum direction {
top = 0,
right = 1,
bottom = 2,
left = 3,
}- top — preview appears above the anchor surface
- right — preview appears to the right of the anchor surface
- bottom — preview appears below the anchor surface
- left — preview appears to the left of the anchor surface
position of the preview relative to the anchor surface
Specifies on which side of the anchor surface the preview
popup or tooltip should appear. The compositor uses this
value as a placement hint; it may choose a different side
if the requested side would be clipped by the screen edge.
treeland_dock_preview_context_v2
request show(
identifiers: array,
x: int,
y: int,
direction: uint<direction>,
)- identifiers — array of uint32 toplevel identifiers to preview
- x — x offset of the preview popup in anchor-surface-local coordinates
- y — y offset of the preview popup in anchor-surface-local coordinates
- direction — which side of the anchor surface the preview appears on
show a thumbnail preview of the given toplevels
Request that the compositor display thumbnail previews for
the toplevels identified by the identifiers array. The popup
is positioned at (x, y) in the coordinate space of the
anchor surface supplied at context creation, on the side
indicated by direction.
The identifiers argument is a wl_array of uint32 identifier
values, each matching the identifier sent by the
treeland_foreign_toplevel_handle_v2.identifier event. The
compositor ignores identifiers that do not correspond to a
currently mapped toplevel.
Calling show while a preview is already visible replaces
the previous content atomically.
treeland_dock_preview_context_v2
request show_tooltip(
tooltip: string,
x: int,
y: int,
direction: uint<direction>,
)- tooltip — UTF-8 text to display in the tooltip
- x — x offset of the tooltip in anchor-surface-local coordinates
- y — y offset of the tooltip in anchor-surface-local coordinates
- direction — which side of the anchor surface the tooltip appears on
show a tooltip near the anchor surface
Request that the compositor display a text tooltip at
(x, y) in the coordinate space of the anchor surface,
on the side indicated by direction. Any previously visible
tooltip from this context is replaced.
Calling show_tooltip while a preview is visible does not
hide the preview; both may be visible simultaneously
depending on compositor policy.
treeland_dock_preview_context_v2
request close()
hide the preview popup
Request that the compositor hide the currently visible
preview popup. If no preview is visible this request is
a no-op. The tooltip, if any, is not affected.
treeland_dock_preview_context_v2
event enter()
pointer entered the preview area
Emitted when the pointer device enters the active preview
popup area managed by this context. The compositor sends
this event only while a preview is visible (i.e. after
show and before close or destroy).
treeland_dock_preview_context_v2
event leave()
pointer left the preview area
Emitted when the pointer device leaves the active preview
popup area managed by this context. A corresponding enter
event is guaranteed to have been sent before this event.
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
manage foreign toplevel windows
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
Compositor Support
foreign toplevel manager
This interface allows a client to observe information about toplevel windows managed by the compositor.
treeland_foreign_toplevel_manager_v1
request stop()
Stop sending events
Indicates the client no longer wishes to receive events for new toplevels.
However the compositor may emit further toplevel_created events, until
the finished event is emitted.
The client must not send any more requests after this one.
Version 2
treeland_foreign_toplevel_handle_v1
event pid(
pid: uint,
)- pid — process ID of the application
Process id of application owning the window has changed
This event will be sent when the compositor has set the process id this window
belongs to. This should be set once before the initial_state is sent.
treeland_foreign_toplevel_handle_v1
event identifier(
identifier: uint,
)- identifier — a unique stable identifier for this toplevel
a stable identifier for a toplevel
The identifier of each top level and its handle must be unique.
Two different top layers cannot have the same identifier.
This identifier is only valid as long as the top level is mapped.
Identifiers must not be reused if the top level is not mapped.
The compositor must not reuse identifiers to ensure there are no races when
identifiers are shared between processes.
treeland_foreign_toplevel_handle_v1
event output_leave(
output: object<wl_output>,
)- output — the output the toplevel left
toplevel left an output
This event is emitted whenever the toplevel stops being visible on
the given output. It is guaranteed that an entered-output event
with the same output has been emitted before this event.
treeland_foreign_toplevel_handle_v1
request activate(
seat: object<wl_seat>,
)- seat — the seat to activate on
activate the toplevel
Request that this toplevel be activated on the given seat.
There is no guarantee the toplevel will be actually activated.
treeland_foreign_toplevel_handle_v1
enum state {
maximized = 0,
minimized = 1,
activated = 2,
fullscreen = 3,
attention = 4,
}types of states on the toplevel
The different states that a toplevel can have. These have the same meaning
as the states with the same names defined in xdg-toplevel
treeland_foreign_toplevel_handle_v1
request set_rectangle(
surface: object<wl_surface>,
x: int,
y: int,
width: int,
height: int,
)- surface — the reference surface
- x — x offset in surface-local coordinates
- y — y offset in surface-local coordinates
- width — width of the rectangle
- height — height of the rectangle
the rectangle which represents the toplevel
The rectangle of the surface specified in this request corresponds to
the place where the app using this protocol represents the given toplevel.
It can be used by the compositor as a hint for some operations, e.g
minimizing. The client is however not required to set this, in which
case the compositor is free to decide some default value.
If the client specifies more than one rectangle, only the last one is
considered.
The dimensions are given in surface-local coordinates.
Setting width=height=0 removes the already-set rectangle.
treeland_foreign_toplevel_handle_v1
request set_fullscreen(
output: nullable object<wl_output>,
)- output — the output to fullscreen on, or null for compositor choice
request that the toplevel be fullscreened
Requests that the toplevel be fullscreened on the given output. If the
fullscreen state and/or the outputs the toplevel is visible on actually
change, this will be indicated by the state and output_enter/leave
events.
The output parameter is only a hint to the compositor. Also, if output
is NULL, the compositor should decide which output the toplevel will be
fullscreened on, if at all.
Version 1
handle dock preview
This interface allows dock set windows preview.
treeland_dock_preview_context_v1
enum direction {
top = 0,
right = 1,
bottom = 2,
left = 3,
}- top — above the anchor
- right — to the right of the anchor
- bottom — below the anchor
- left — to the left of the anchor
types of direction on the dock preview
Direction of the dock preview relative to the anchor surface.
treeland_dock_preview_context_v1
request show_tooltip(
tooltip: string,
x: int,
y: int,
direction: uint<direction>,
)- tooltip — tooltip text to display
- x — x position relative to relative_surface
- y — y position relative to relative_surface
show a tooltip
Show a tooltip at the specified position relative to the relative_surface.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
configure input devices managed by treeland
This protocol allows a privileged client to discover seat capabilities
and configure compositor-managed mouse, touchpad, and keyboard devices.
A treeland_input_manager_v1 object is a global manager. It creates
settings objects that represent configuration state for existing input
devices; those settings objects are not the device objects themselves.
For mouse and touchpad devices, pointer device settings such as
acceleration speed, acceleration profile, natural scrolling, scroll
factor, handed mode, double-click interval, send events mode,
disable-while-typing and tap-to-click are managed through a
treeland_pointer_device_configuration_v1 object created from the
device-specific settings interface.
Keyboard settings include repeat behavior, num lock state, and XKB
layout, model, variant, and option strings for the target seat.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
global input device manager
The treeland_input_manager_v1 interface is a global object used to
create per-device settings objects for input devices exposed by the
compositor.
The compositor advertises device capability changes with the
capability_available and capability_unavailable events.
For each target device or seat-level settings scope, the compositor
may allow at most one live settings object of a given interface
created from one manager object.
virtual-pointer and virtual-keyboard are not included in the list.
treeland_input_manager_v1
enum device_type {
mouse = 1,
touchpad = 2,
keyboard = 4,
}This is a bitfield
- mouse — mouse input device
- touchpad — touchpad input device
- keyboard — keyboard input device
treeland_input_manager_v1
request destroy()
Destructor
destroy the input manager
This informs the compositor that the treeland input manager object
will no longer be used.
Existing objects created through this interface are not destroyed
automatically. Clients should destroy those objects before destroying
the manager.
treeland_input_manager_v1
event capability_available(
type: uint<device_type>,
seat: object<wl_seat>,
)- type — type of the device capability
- seat — seat associated with the capability
report an available device capability
This event is emitted when the compositor detects that a seat
now exposes the specified device capability.
The compositor sends this event immediately after the
treeland_input_manager_v1 object is created to report
capabilities currently available on a seat.
The compositor may also send this event later when input
devices are hot-plugged and a seat gains the specified
capability.
A client may create a treeland_mouse_settings_v1 object for a
given seat only if the compositor has advertised device_type
mouse capability for that seat. Likewise, a client may create a
treeland_touchpad_settings_v1 or treeland_keyboard_settings_v1
object for a given seat only if the compositor has advertised
device_type touchpad or keyboard capability for that seat.
Version 1
pointer device configuration object
The treeland_pointer_device_configuration_v1 interface represents
pending configuration for pointer devices associated with the parent
device settings object.
This object is created via get_pointer_configuration on a
treeland_mouse_settings_v1 or treeland_touchpad_settings_v1 object.
It collects configuration that applies to the associated device
type.
Requests on this object update pending state. The compositor
applies the accumulated settings when the client sends apply.
Destroying the object before apply discards any pending state that
has not yet been applied.
The compositor sends configuration events after object creation to
report the current effective settings. It may later send additional
state batches when those effective settings change for
compositor-defined reasons. A done event terminates each event
batch.
treeland_pointer_device_configuration_v1
enum feature {
scroll_factor = 1,
handed_mode = 2,
accel_speed = 4,
acceleration_profile = 8,
send_events_mode = 16,
natural_scroll = 32,
disable_while_typing = 64,
tap_to_click = 128,
}This is a bitfield
- scroll_factor — device supports configuring scroll factor
- handed_mode — device supports configuring handed mode
- accel_speed — device supports configuring acceleration speed
- acceleration_profile — device supports configuring acceleration profile
- send_events_mode — device supports configuring event delivery mode
- natural_scroll — device supports configuring natural scrolling
- disable_while_typing — device supports disable-while-typing
- tap_to_click — device supports tap-to-click
pointer device features
Optional features supported by pointer devices. The compositor
sends a feature event to indicate which features are supported
by at least one device associated with the parent settings
object. A client must only send a set request if the
corresponding feature has been advertised. It is a protocol error
to send a set request for a feature that has not been
advertised.
treeland_pointer_device_configuration_v1
enum acceleration_profile {
none = 0,
flat = 1,
adaptive = 2,
custom = 4,
}- none — device does not have a configurable acceleration profile
- flat — use a flat acceleration profile
- adaptive — use an adaptive acceleration profile
- custom — use a custom acceleration profile
pointer acceleration profiles
Pointer acceleration profiles. The semantics correspond to
libinput acceleration profiles.
treeland_pointer_device_configuration_v1
enum send_events_mode {
enabled = 0,
disabled = 1,
disabled_on_external_mouse = 2,
}- enabled — send events from this device normally
- disabled — do not send events from this device
- disabled_on_external_mouse — if an external pointer device is plugged in, do not send events from this device; may be available on built-in pointer devices
pointer event delivery mode
Modes controlling whether the target pointer device should send
events and whether those events depend on the presence of an
external pointer device on the same seat.
treeland_pointer_device_configuration_v1
request set_scroll_factor(
factor: fixed,
)- factor — scaling factor applied to scroll axis delta,
The factor must be greater than 0.
set the scroll delta scaling factor
Set a scaling factor applied to scroll axis delta generated
by wheel and other continuous scrolling input sources. This
request requires the scroll_factor feature to be advertised via
the feature event.
The compositor multiplies scroll axis values by the specified
factor before forwarding them to clients. This affects
continuous scroll delta only and does not modify discrete
scroll step events.
This request updates only the pending state associated with
this object. The change takes effect after the next apply
request.
Sending this request or the corresponding apply request does
not by itself cause a scroll_factor event to be emitted.
delta = factor * _delta
treeland_pointer_device_configuration_v1
request set_handed_mode(
mode: uint<handed_mode>,
)- mode — desired handedness mode
set the handedness mode
Set whether primary and secondary buttons use left-handed or
right-handed ordering. This request requires the handed_mode
feature to be advertised via the feature event. The change
takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a handed_mode event to be emitted.
treeland_pointer_device_configuration_v1
request set_accel_speed(
accel_speed: fixed,
)- accel_speed — desired pointer acceleration speed, The valid range is -1.0 to 1.0,
where 0.0 is the neutral default meaning no acceleration adjustment. Negative
values reduce acceleration (cursor moves more slowly at higher speeds), positive
values increase acceleration (cursor moves faster at higher speeds).
set the pointer acceleration speed
Set the pointer acceleration speed. This request requires the
accel_speed feature to be advertised via the feature event. The
change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause an accel_speed event to be emitted.
treeland_pointer_device_configuration_v1
request set_acceleration_profile(
profile: uint<acceleration_profile>,
)- profile — desired acceleration profile
set the acceleration profile
Set the acceleration profile. This request requires the
acceleration_profile feature to be advertised via the feature
event. The change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause an acceleration_profile event to be
emitted.
treeland_pointer_device_configuration_v1
request set_send_events_mode(
mode: uint<send_events_mode>,
)- mode — desired pointer event delivery mode
set the pointer event delivery mode
Set how events from the target pointer device are delivered.
This request requires the send_events_mode feature to be
advertised via the feature event. The change takes effect on the
next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a send_events_mode event to be emitted.
treeland_pointer_device_configuration_v1
request set_natural_scroll(
state: uint<treeland_input_manager_v1.state>,
)- state — desired natural scrolling state
enable or disable natural scrolling
Enable or disable natural scrolling. This request requires the
natural_scroll feature to be advertised via the feature event.
The change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a natural_scroll event to be emitted.
treeland_pointer_device_configuration_v1
request set_disable_while_typing(
state: uint<treeland_input_manager_v1.state>,
)- state — desired disable-while-typing state
set disable-while-typing
Enable or disable temporarily disabling pointer devices while
the user is typing. This request requires the
disable_while_typing feature to be advertised via the feature
event. The change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a disable_while_typing event to be
emitted.
treeland_pointer_device_configuration_v1
request set_tap_to_click(
state: uint<treeland_input_manager_v1.state>,
)- state — desired tap-to-click state
set tap-to-click
Enable or disable tap-to-click. This request requires the
tap_to_click feature to be advertised via the feature event.
The change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a tap_to_click event to be emitted.
treeland_pointer_device_configuration_v1
event feature(
feature: uint<feature>,
)- feature — supported pointer device features
report supported pointer device features
This event reports which optional features are supported by at
least one device associated with the parent settings object.
The compositor sends this event as part of the initial state
batch after the treeland_pointer_device_configuration_v1 object
is created.
The compositor may also send this event again when devices are
added to or removed from the target seat and the set of
supported features changes.
treeland_pointer_device_configuration_v1
event scroll_factor(
factor: fixed,
)- factor — current scroll factor
report the current scroll factor
This event reports the current scroll factor used for wheel and
similar scroll input.
The compositor sends this event immediately after the
treeland_pointer_device_configuration_v1 object is created as
part of the initial state batch.
Changes requested through set_scroll_factor do not cause this
event to be emitted automatically.
treeland_pointer_device_configuration_v1
event accel_speed(
accel_speed: fixed,
)- accel_speed — current pointer acceleration speed
report the current pointer acceleration speed
This event reports the current pointer acceleration speed.
The compositor sends this event immediately after the
treeland_pointer_device_configuration_v1 object is created as
part of the initial state batch.
Changes requested through set_accel_speed do not cause this
event to be emitted automatically.
treeland_pointer_device_configuration_v1
event disable_while_typing(
state: uint<treeland_input_manager_v1.state>,
)- state — current disable-while-typing state
report disable-while-typing state
This event reports whether pointer devices are temporarily
disabled while the user is typing.
The compositor sends this event as part of the initial state
batch if the disable_while_typing feature has been advertised.
Changes requested through set_disable_while_typing do not cause
this event to be emitted automatically.
treeland_pointer_device_configuration_v1
event tap_to_click(
state: uint<treeland_input_manager_v1.state>,
)- state — current tap-to-click state
report tap-to-click state
This event reports whether tap-to-click is enabled.
The compositor sends this event as part of the initial state
batch if the tap_to_click feature has been advertised.
Changes requested through set_tap_to_click do not cause this
event to be emitted automatically.
treeland_pointer_device_configuration_v1
event failed()
apply failed
This event indicates that the compositor failed to apply one or
more pending pointer device configuration changes carried by
this object.
This event does not destroy the object. The client may continue
using the object and send further requests.
treeland_pointer_device_configuration_v1
event done(
serial: uint,
)- serial — current configuration serial
end of a pointer device state batch
This event is sent once when all pointer device configuration
state events in the current batch have been sent.
The compositor must always end a batch of pointer device
configuration state events with this event, regardless of
whether it sends the initial state or a later update.
The serial is used in a future get_pointer_configuration
request to ensure the client's configuration is based on
up-to-date state.
Version 1
Version 1
Version 2
keyboard settings object
The treeland_keyboard_settings_v1 interface represents pending
settings for all keyboards associated with the target seat.
Requests on this object update pending keyboard state. The
compositor applies the accumulated settings when the client sends
apply.
The compositor sends keyboard-specific state events after object
creation to report the current effective settings for the target
seat. It may later send additional state batches when those
effective settings change for compositor-defined reasons. A done
event terminates each event batch.
treeland_keyboard_settings_v1
enum feature {
num_lock = 1,
}This is a bitfield
- num_lock — device supports configuring num lock state
keyboard features
Optional features supported by keyboard devices. The compositor
sends a feature event to indicate which features are supported
by at least one keyboard device associated with the target seat.
A client must only send a set request if the corresponding
feature has been advertised. It is a protocol error to send a
set request for a feature that has not been advertised.
treeland_keyboard_settings_v1
request set_repeat(
rate: int,
delay: int,
)- rate — repeat rate in characters per second
- delay — delay in milliseconds before repeating starts
set keyboard repeat rate and delay
Set the keyboard repeat rate and delay to apply on the next
apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a repeat event to be emitted.
treeland_keyboard_settings_v1
request set_num_lock(
state: uint<toggle_state>,
)- state — desired num lock state
set num lock state
Set the num lock state to apply on the next apply request.
This request requires the num_lock feature to be advertised
via the feature event.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a num_lock event to be emitted.
treeland_keyboard_settings_v1
request set_xkb_rules(
layout: nullable string,
model: nullable string,
variant: nullable string,
options: nullable string,
)Available since version 2
- layout — comma-separated XKB layout names, or empty for the default
- model — XKB keyboard model, or empty for the default
- variant — comma-separated XKB variants, or empty for none
- options — comma-separated XKB options, or empty for none
set the pending XKB rules configuration
Set the XKB layout, model, variant, and options to apply on the
next apply request. These four values form one configuration
snapshot and replace the complete pending XKB rules state.
Layout contains one or more comma-separated layout names, for
example "us" or "cz,us". An empty layout selects the XKB
default layout, which is "us".
Model identifies the keyboard model, for example "pc104" or
"pc105". An empty model selects the XKB default model.
Variant contains a comma-separated list whose entries
correspond to the layouts, for example "" or ",dvorak".
Empty entries select no variant for the corresponding layout.
Options contains a comma-separated list of XKB options, for
example "grp:win_space_toggle". An empty options string
selects no extra options.
This request updates only the pending state tracked by this
object. Multiple calls before apply replace the complete
pending XKB rules configuration; only the last configuration
is applied. Sending this request, or the following apply
request, does not by itself cause an xkb_rules event to be
emitted.
treeland_keyboard_settings_v1
event feature(
feature: uint<feature>,
)- feature — supported keyboard features
report supported keyboard features
This event reports which optional features are supported by at
least one keyboard device associated with the target seat.
The compositor sends this event as part of the initial state
batch after the treeland_keyboard_settings_v1 object is created.
The compositor may also send this event again when keyboard
devices are added to or removed from the target seat and the
set of supported features changes.
treeland_keyboard_settings_v1
event repeat(
rate: int,
delay: int,
)- rate — repeat rate in characters per second
- delay — delay in milliseconds before repeating starts
report the current repeat configuration
This event reports the current keyboard repeat configuration.
The compositor sends this event immediately after the
treeland_keyboard_settings_v1 object is created as part of the
initial keyboard state batch.
Changes requested through set_repeat do not cause this event to
be emitted automatically.
treeland_keyboard_settings_v1
event num_lock(
state: uint<toggle_state>,
)- state — current num lock state
report the current num lock state
This event reports the current num lock state.
The compositor sends this event immediately after the
treeland_keyboard_settings_v1 object is created as part of the
initial keyboard state batch.
Changes requested through set_num_lock do not cause this event
to be emitted automatically.
treeland_keyboard_settings_v1
event failed()
apply failed
This event indicates that the compositor failed to apply one or
more pending keyboard settings carried by this object.
This event does not destroy the object. The client may continue
using the object and send further requests.
treeland_keyboard_settings_v1
event done()
end of a keyboard state batch
This event is sent once when all keyboard state events in the
current batch have been sent.
The compositor must always end a batch of keyboard state events
with this event, regardless of whether it sends the initial
state or a later update.
treeland_keyboard_settings_v1
event xkb_rules(
layout: string,
model: string,
variant: string,
options: string,
)Available since version 2
- layout — comma-separated XKB layout names, or empty for the default
- model — XKB keyboard model, or empty for the default
- variant — comma-separated XKB variants, or empty for none
- options — comma-separated XKB options, or empty for none
report the current XKB rules configuration
This event reports the current XKB layout, model, variant, and
options as one consistent configuration snapshot. The string
formats and empty-value semantics match set_xkb_rules.
The compositor sends this event after object creation as part
of the initial keyboard state batch. It may send the event
again in a later batch when any effective XKB rules value
changes.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
global keyboard state notification
This protocol allows privileged clients to subscribe to global keyboard
state changes (e.g. Caps Lock, Num Lock).
Clients create watcher objects through the manager global, each bound
to a seat. The client then configures the watcher with set_modifiers to
choose which modifiers to monitor, and set_flags to choose which event
types (locked, unlocked, or both) to receive. Configuration changes are
double-buffered and take effect atomically when the client sends apply.
Both set_modifiers and set_flags can be called multiple times before
apply; only the values from the most recent calls are committed. This
allows changing the configuration at runtime without destroying and
recreating the watcher. After apply, the compositor sends a
current_state event for each watched modifier containing its
current lock state, so the client can synchronize its initial
state without waiting for the next physical key press. The
compositor then sends
state_changed events on the watcher whenever any of the watched
modifiers changes lock state globally, regardless of which surface
has keyboard focus.
This protocol is observation-only. Keyboard state changes are never
consumed or intercepted by this protocol.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
global keyboard state notification manager
The treeland_keyboard_state_notify_manager_v1 interface is a
singleton global object used to create watcher objects for monitoring
keyboard state changes on a given seat.
A client may create multiple watcher objects for the same seat if
needed.
Version 1
keyboard state watcher
The treeland_keyboard_state_watcher_v1 interface represents a
subscription to keyboard state changes on a specific
seat.
This object is created via get_keyboard_state_watcher on the
treeland_keyboard_state_notify_manager_v1 global. The client
configures the watcher with set_modifiers to choose which modifiers
to monitor and set_flags to choose which state transitions to
receive. Both can be changed at runtime. Configuration changes are
double-buffered: set_modifiers and set_flags only update the pending
state, which is applied atomically when apply is called.
The compositor sends a current_state event for each modifier in
the committed modifier set immediately after apply is called.
It then sends
state_changed events whenever any of the watched modifiers
changes lock state, according to the committed modifiers and
flags.
treeland_keyboard_state_watcher_v1
enum modifier {
caps_lock = 1,
num_lock = 2,
}This is a bitfield
- caps_lock — Caps Lock modifier
- num_lock — Num Lock modifier
keyboard modifier type
Bitfield of keyboard modifiers whose lock state can be
monitored. Multiple modifier values can be combined using
bitwise OR.
caps_lock: the Caps Lock modifier.
num_lock: the Num Lock modifier.
Examples:
caps_lock: monitor only Caps Lock.
caps_lock | num_lock: monitor both Caps Lock and Num Lock.
treeland_keyboard_state_watcher_v1
enum watch_flag {
locked = 1,
unlocked = 2,
}This is a bitfield
- locked — notify when modifier is locked
- unlocked — notify when modifier is unlocked
modifier state transition flags
Flags to specify which modifier lock state transitions the
client wants to be notified about.
none: do not notify on any state transition.
locked: notify when a watched modifier becomes locked.
unlocked: notify when a watched modifier becomes unlocked.
Examples:
locked: the client receives events only when a modifier is
locked.
unlocked: the client receives events only when a modifier is
unlocked.
locked | unlocked: the client receives events on both.
treeland_keyboard_state_watcher_v1
request set_modifiers(
modifiers: uint<modifier>,
)- modifiers — bitfield of modifier enum values to watch
set the modifiers to watch
Set the keyboard modifiers to watch on this watcher.
The modifiers argument is a bitfield of values from the modifier
enum (e.g. caps_lock = 1, num_lock = 2).
Multiple modifiers can be combined using bitwise OR.
Calling set_modifiers replaces any previously pending modifiers.
This request only updates the pending configuration. The change
takes effect when apply is called. If set_modifiers is called
multiple times before apply, only the values from the most
recent call are used.
treeland_keyboard_state_watcher_v1
request set_flags(
flags: uint<watch_flag>,
)change which state transitions to notify about
Change the watch flags for this watcher, selecting which modifier
state transitions (locked, unlocked, or both) the client wants
to be notified about.
This request only updates the pending configuration. The change
takes effect when apply is called. If set_flags is called
multiple times before apply, only the values from the most
recent call are used.
treeland_keyboard_state_watcher_v1
request apply()
apply pending configuration changes
Apply the pending configuration state for this watcher
atomically.
The compositor will use the modifiers and flags set by the most
recent set_modifiers and set_flags calls as the new active
configuration for this watcher. If set_modifiers or set_flags
have not been called since the last apply (or since the watcher
was created), the corresponding pending values remain unchanged.
After this request, the pending configuration is considered
consumed. Subsequent calls to set_modifiers or set_flags will
begin a new pending configuration.
The compositor will send a current_state event for each
modifier in the newly committed modifier set immediately
after processing this request.
treeland_keyboard_state_watcher_v1
event current_state(
modifier: uint<modifier>,
state: uint<modifier_state>,
)- modifier — the modifier whose lock state is being reported
- state — the current lock state of the modifier
current state of a watched modifier
Sent for each modifier in the committed modifier set after
each apply call to provide its current lock state. For
example, if the client watches caps_lock and num_lock, the
compositor will send two current_state events, one for each
modifier.
This event is emitted before any subsequent state_changed
events for the new configuration. It may be sent again
after future apply calls if the client reconfigures the
watcher.
treeland_keyboard_state_watcher_v1
event state_changed(
modifier: uint<modifier>,
state: uint<modifier_state>,
)- modifier — the modifier that changed lock state
- state — the new lock state of the modifier
a watched modifier has changed state
This event is sent when one of the watched modifiers changes
lock state globally, according to the modifiers and flags
currently set on this watcher.
The modifier argument identifies which modifier changed state.
The state argument indicates whether the modifier is now locked
or unlocked.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
layer surface interactive move and resize integration for treeland
This protocol lets a layer-shell client hand interactive move and
resize over to the compositor: the client starts an operation with
begin_resize or begin_move, the compositor drives the surface size or
position through layer-surface configure events, and reports state,
rejection reasons, and placement through this interface.
The key words "must", "must not", "required", "shall", "shall not",
"should", "should not", "recommended", "may", and "optional" in this
document are to be interpreted as described in RFC 2119.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
manager for layer surface interactive move and resize
This interface allows a layer-shell client (typically a dock
surface) to opt in to compositor-driven interactive move and
resize, so the compositor owns the drag state machine and the
client follows the resulting layer-surface configure events
instead of racing its own set_size requests.
This protocol applies to any layer-shell surface. The compositor
drives the surface's size (begin_resize) or position (begin_move)
over an interactive drag; whether a particular axis is freely
resizable depends on the concrete anchor configuration.
treeland_layer_shell_extension_manager_v1
enum error {
layer_shell_extension_exists = 0,
wl_surface_invalid = 1,
}- layer_shell_extension_exists — the wl_surface already has a layer shell extension object bound
- wl_surface_invalid — the get_layer_shell_extension_object wl_surface argument is invalid
treeland_layer_shell_extension_manager_v1
request destroy()
Destructor
destroy the layer shell extension manager
Destroy the manager object. This does not destroy layer shell
objects created with get_layer_shell_extension_object; those remain
valid until their wl_surface is destroyed or the client
destroys them.
Version 1
compositor-driven interactive resize and move for a layer surface
The client starts an interactive resize with begin_resize, passing
a serial from a recent pointer event. The compositor validates the
serial, takes over the drag (like xdg_toplevel.resize) and drives
the surface size through the standard layer-surface configure
events, reporting the resize state and any size restrictions
through this interface.
The client may also start an interactive move with begin_move; the
exact move semantics and state reporting are not yet finalized.
treeland_layer_shell_extension_object_v1
enum resize_edge {
top = 1,
bottom = 2,
left = 4,
top_left = 5,
bottom_left = 6,
right = 8,
top_right = 9,
bottom_right = 10,
}edge values for resizing
Values indicate which edge (or corner) of the surface is being
dragged in a resize operation, named from the surface's own
perspective. Values are bit flags matching
xdg_toplevel.resize_edge exactly: 1=top, 2=bottom, 4=left,
8=right; corner values are the OR of two adjacent edges
(top_left=5=1|4, bottom_left=6=2|4, top_right=9=1|8,
bottom_right=10=2|8).
The layer surface is anchored to one screen edge and changes
height, vertical surfaces (left/right) change width. Whether an
edge may be dragged at all depends on the surface's anchor; see
begin_resize.
treeland_layer_shell_extension_object_v1
enum resize_error {
bad_serial = 1,
bad_edges = 2,
inactive = 3,
bad_surface = 4,
bad_seat = 5,
}- bad_serial — serial does not match a recent pointer button press on the seat
- bad_edges — edges is not a valid resize_edge value
- inactive — the compositor cannot take over the resize right now (no container, surface not layer, animation running, or seat refused the takeover)
- bad_surface — the surface is invalid or has been destroyed
- bad_seat — the seat is invalid or has been destroyed
reason a begin_resize request was rejected
begin_resize is rejected (no resize starts) when the serial is
stale (bad_serial), the edges value is not a valid resize_edge
(bad_edges), or the compositor cannot take over the resize
right now (inactive). It is also rejected when the associated
surface is invalid or has been destroyed (bad_surface), or
the seat is invalid or has been destroyed (bad_seat). The
compositor then emits resize_rejected with the reason; an
accepted request instead emits resizing(1).
treeland_layer_shell_extension_object_v1
request begin_resize(
seat: object<wl_seat>,
serial: uint,
edges: uint<resize_edge>,
min_width: int,
min_height: int,
max_width: int,
max_height: int,
)- seat — seat the resize is initiated from
- serial — serial of a recent pointer button press on seat
- edges — edge(s) the client wants to drag, none of which may be anchored
- min_width — minimum width for this resize, 0 for none
- min_height — minimum height for this resize, 0 for none
- max_width — maximum width for this resize, 0 for none
- max_height — maximum height for this resize, 0 for none
start an interactive resize
Start a compositor-driven interactive resize of the associated
surface. The seat and serial must come from a recent pointer
button press on that seat; an invalid serial makes the
compositor reject the request with resize_error.bad_serial.
edges names which edge (or corner) of the surface the client
wants to drag, using the xdg_toplevel.resize_edge values. The
client owns which edge it drags; the compositor executes the
drag on the reported edge.
The compositor rejects the request with resize_error.bad_edges
when any of the requested edges is anchored: an anchored edge
is already fixed in place by the layer-shell layout, so
dragging it has no effect. A corner value (top_left etc.)
requires both of its edges to be unanchored, otherwise the
request is rejected. A dock anchored to a single screen edge,
for example, may only be dragged on the edge opposite to its
anchor.
Any other value is rejected with resize_error.bad_edges. The
compositor emits resizing(1) once the drag actually starts,
resizing(0) when it ends, and drives the surface size through
the standard layer-surface configure events. On a rejected
request it emits resize_rejected with a resize_error reason;
in that case no resize starts and resizing is never emitted
for this request. A request on a destroyed surface or with a
destroyed seat is also rejected, with resize_error.bad_surface
or resize_error.bad_seat respectively.
The min/max size arguments bound this resize only: they apply
while this drag is active and are not a persistent property
of the surface. A value of 0 means no limit in that direction
(minimum 0 / maximum unbounded); negative values are treated
as 0. The compositor clamps the target size to these limits
and reflects the clamped size through the standard
layer-surface configure event. Invalid limits (min > max with
both non-zero) are ignored for that axis.
treeland_layer_shell_extension_object_v1
event resizing(
resizing: uint,
)- resizing — 1 during interactive resize, 0 after it ends
interactive resize state changed
resizing=1 when the compositor starts the interactive drag,
resizing=0 when it ends. The client may use this to run a
settle / spring animation after the drag finishes. resizing(1)
is only emitted after the compositor has actually taken over
the drag; rejected begin_resize requests instead cause a
resize_rejected event.
treeland_layer_shell_extension_object_v1
event resize_rejected(
error: uint<resize_error>,
)- error — reason the resize was rejected
a begin_resize request was rejected
Emitted when a begin_resize request is rejected: the reason
names a resize_error value. No resize starts and resizing is
never emitted for the rejected request. The client should use
this instead of inferring acceptance from the absence of a
resizing(1) event, and may fall back to its own drag logic.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
manage output display configuration
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol provides two capabilities to privileged clients such as
display configuration panels:
Designating one connected output as the primary output, which the
compositor may use to decide placement of panels, notifications, and
newly opened windows.
Adjusting the color temperature and brightness of individual outputs
via a double-buffered pending/commit model.
The terms "must", "must not", "should", and "may" in this document are
to be interpreted as described in RFC 2119.
Version 1
primary output and picture control manager
A singleton global that exposes two capabilities: designating the
primary output and creating per-output picture control objects.
Only one client should bind this interface at a time. The compositor
may not advertise this global to additional clients, or may ignore
requests from them, while a binding is already active.
On binding, the compositor immediately emits a primary_output event
carrying the currently designated primary output, or null if no
primary output has been designated.
treeland_output_manager_v2
request set_primary_output(
output: object<wl_output>,
)- output — an enabled output to designate as primary
designate an output as the primary output
Designate the given output as the primary output. The compositor
uses the primary output as a hint for panel placement, initial
window positioning, and other compositor-defined policies.
The output must be a currently enabled, available wl_output.
If the output is disabled or no longer available, the compositor
rejects the request and emits a primary_output_failed event;
the primary output designation is unchanged.
The compositor applies a successful change immediately and
confirms it by emitting a primary_output event carrying the
newly designated primary output.
treeland_output_manager_v2
request get_picture_control(
id: new_id<treeland_output_picture_control_v2>,
output: object<wl_output>,
)- id — new picture control object for the given output
- output — the output to control
create a picture control object for an output
Create a treeland_output_picture_control_v2 object bound to the
given output. The returned object allows the client to adjust
the color temperature and brightness of that output.
For any live wl_output resource this request always succeeds
without a protocol error, regardless of the output state —
enabled, disabled, or no longer present in the configuration.
An invalid or destroyed object id, or an object of another
type, is still rejected by the core protocol
(wl_display.invalid_object). If the bound output is later
destroyed or not recognized by the compositor, subsequent
commits fail with the invalid_output result.
Multiple picture control objects may exist for the same output at
the same time; each object reports value changes independently.
If the output is disabled while a picture control object is
bound to it, commits may fail; the compositor reports the
outcome through the result event and leaves the applied
settings unchanged.
treeland_output_manager_v2
event primary_output(
output: nullable object<wl_output>,
)- output — the currently designated primary output, or null when none is available
current primary output has changed
Emitted by the compositor to report the current primary output.
This event is sent once immediately after the client binds this
interface, and again whenever the primary output designation
changes — whether in response to a set_primary_output request
or through a compositor-driven fallback.
When the designated primary output is disconnected or disabled,
the compositor automatically selects another available output as
the new primary and emits this event with it. When no output is
currently available, the event is emitted with a null output.
treeland_output_manager_v2
event primary_output_failed(
reason: uint<primary_output_failed_reason>,
)- reason — why the set_primary_output request was rejected
a set_primary_output request was rejected
Emitted when a set_primary_output request cannot be applied,
indicating that the primary output designation is unchanged.
The reason identifies why the request was rejected: the
provided output was disabled or no longer available.
Version 1
per-output color temperature and brightness control
Represents a picture control session bound to a specific output,
created by treeland_output_manager_v2.get_picture_control.
Color temperature and brightness are managed via a double-buffered
pending/commit model. The client accumulates changes with
set_color_temperature and set_brightness, then atomically applies
them with a single commit request. After a successful commit the
compositor emits a color_temperature or brightness event for each
value that actually changed.
On creation, the compositor emits color_temperature and brightness
events to report the current values of the output before the client
has made any changes.
Clients should destroy this object when the associated wl_output
is destroyed; otherwise subsequent commits fail with the
invalid_output result.
treeland_output_picture_control_v2
enum error {
invalid_color_temperature = 0,
invalid_brightness = 1,
}- invalid_color_temperature — the color temperature is outside the valid range [1000, 20000]
- invalid_brightness — the brightness is outside the valid range [0.0, 100.0]
fatal protocol errors raised by set requests
Raised by the compositor as a fatal protocol error when a
set_color_temperature or set_brightness request carries a
value outside its valid range. The connection is terminated
and no further requests are processed on this object.
treeland_output_picture_control_v2
enum commit_result {
success = 0,
failed = 1,
unsupported = 2,
invalid_output = 3,
}- success — all pending settings were applied successfully
- failed — the commit failed to apply for a transient or unknown reason; settings remain unchanged
- unsupported — the output does not support the requested adjustment, for example when its hardware cannot apply color temperature changes; settings remain unchanged
- invalid_output — the associated output is destroyed or not recognized; settings remain unchanged
result of a commit request
Indicates whether the preceding commit request was applied
successfully, and if not, whether it failed because the output
does not support the requested adjustment, because the
associated output is no longer available, or for another
transient or unknown reason.
treeland_output_picture_control_v2
request set_color_temperature(
temperature: uint,
)- temperature — color temperature in Kelvin, in the range [1000, 20000]
set pending color temperature
Set the pending color temperature for the output. The value
is not applied until the client sends a commit request.
Valid range is [1000, 20000] Kelvin. A value outside this
range is rejected immediately with the
invalid_color_temperature protocol error, terminating the
connection; nothing is stored in the pending state and no
commit is required to clear the request.
Multiple calls before commit replace the pending value;
only the last value is applied.
treeland_output_picture_control_v2
request set_brightness(
brightness: fixed,
)- brightness — brightness level in the range [0.0, 100.0]
set pending brightness
Set the pending brightness for the output. The value is not
applied until the client sends a commit request.
Valid range is [0.0, 100.0]. A value outside this range is
rejected immediately with the invalid_brightness protocol
error, terminating the connection; nothing is stored in the
pending state and no commit is required to clear the request.
Multiple calls before commit replace the pending value;
only the last value is applied.
treeland_output_picture_control_v2
request commit()
apply all pending color settings
Atomically apply all pending color temperature and brightness
values accumulated since the last commit. The compositor always
responds with a result event indicating success or failure.
After a successful commit the compositor emits a
color_temperature or brightness event for each value that
actually changed.
It is valid to call commit without any preceding set_* requests;
the compositor treats this as a no-op that succeeds without
changing any value.
A failed commit reports its cause through the result event.
Range validation of pending values is performed at set_*
time and never reaches a commit; a commit therefore only
fails because of the output: it does not support the requested
adjustment (unsupported, retrying the same settings is unlikely
to succeed), it has been destroyed or is no longer recognized
(invalid_output), or the commit could not be applied for a
transient or unknown reason (failed). In every failure case the
applied settings remain unchanged.
treeland_output_picture_control_v2
event result(
result: uint<commit_result>,
)- result — whether the commit succeeded or failed
result of the last commit request
Emitted by the compositor in response to every commit request,
including commits with no pending changes, to indicate whether
the settings were applied. Besides the failed, unsupported,
and invalid_output causes, no other result value is defined.
Out-of-range pending values are rejected at set_* time with a
fatal protocol error and never produce a commit result. After
a successful commit, a color_temperature or brightness event
is emitted for each value that actually changed.
treeland_output_picture_control_v2
event color_temperature(
temperature: uint,
)- temperature — current color temperature in Kelvin
current color temperature of the output
Reports the currently applied color temperature of the output.
Emitted once immediately after the treeland_output_picture_control_v2
object is created to provide the initial value, and again
whenever the applied color temperature changes — whether
through a commit on this object, a commit on another color
control object for the same output, or a compositor-driven
change such as a system setting update.
Color temperature is expressed in Kelvin on a Planckian locus,
in the range [1000, 20000].
treeland_output_picture_control_v2
event brightness(
brightness: fixed,
)- brightness — current brightness level in the range [0.0, 100.0]
current brightness of the output
Reports the currently applied brightness of the output.
Emitted once immediately after the treeland_output_picture_control_v2
object is created to provide the initial value, and again
whenever the applied brightness changes — whether through a
commit on this object, a commit on another picture control object
for the same output, or a compositor-driven change such as a
system setting update.
Brightness is expressed as a percentage in the range [0.0, 100.0].
Copyright
SPDX-FileCopyrightText: 2024-2025 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
manage output display configuration
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
Compositor Support
primary output and color control manager
Protocol for telling which is the primary display among the selection of enabled
outputs.
treeland_output_manager_v1
request set_primary_output(
output: string,
)- output — the name of the output to set as primary
Select which primary output to use
Select the primary output by name. The compositor will emit a primary_output
event with the current primary output name upon binding.
treeland_output_manager_v1
event primary_output(
output_name: string,
)- output_name — the name of the output
Provide the current primary output's name
Specifies which output is the primary one identified by their name.
Version 1
per-output color temperature and brightness control
Protocol for controlling color temperature and brightness settings of a specific output.
treeland_output_color_control_v1
request set_color_temperature(
temperature: uint,
)- temperature — color temperature in Kelvin
Set color temperature for output
Color temperature settings are applied only after a commit request is made.
Setting a value outside the range [1000, 20000] is a protocol error.
treeland_output_color_control_v1
request set_brightness(
brightness: fixed,
)- brightness — brightness level (in range [0.0, 100.0])
Set brightness for output.
Brightness settings are applied only after a commit request is made.
Setting a value outside the range [0.0, 100.0] is a protocol error.
treeland_output_color_control_v1
event color_temperature(
temperature: uint,
)- temperature — current color temperature in Kelvin
Current color temperature for output.
Provides the current color temperature setting of the output.
Color temperature is valued in the range [1000, 20000].
Color temperature is defined as the corresponding temperature (in Kelvin) of the current white point
of the display on a Planckian locus.
With the current implementation, the neutral temperature is 6600K.
This event is sent once after the treeland_output_color_control_v1 object is created,
or right after when a color temperature change for the output is successfully committed.
treeland_output_color_control_v1
event brightness(
brightness: fixed,
)- brightness — current brightness level (in range [0.0, 100.0])
Current brightness for output.
Provides the current brightness setting of the output.
Brightness is valued in the range [0.0, 100.0].
This event is sent once after the treeland_output_color_control_v1 object is created,
or right after when a brightness change for the output is successfully committed.
treeland_output_color_control_v1
enum error {
invalid_color_temperature = 1,
invalid_brightness = 2,
}- invalid_color_temperature — Invalid color temperature value provided.
- invalid_brightness — Invalid brightness value provided.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
personalization and theming for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
Compositor Support
personalization manager
This interface allows a client to customize display effects.
Version 1
client custom cursor context
This interface allows a client personalization cursor.
Version 1
per-window personalization context
This interface allows a client to customize per-window visual properties
including background blend mode, round corner radius, shadow, border,
and titlebar visibility.
treeland_personalization_window_context_v1
enum blend_mode {
transparent = 0,
wallpaper = 1,
blur = 2,
}- transparent — Normal blend mode, just composite over background with alpha channel
- wallpaper — Composite window over wallpaper
- blur — Blur the content of the window background
window blend mode
Window blend mode defines how compositor composite window's surface over other
surfaces.
treeland_personalization_window_context_v1
request set_round_corner_radius(
radius: int,
)- radius — window round corner radius in pixels
set window round corner radius
This request will set window round corner radius, invoking this request means user
want to
manage window round corner radius by itself. If not invoked, window round corner
radius will
be decided by compositor.
treeland_personalization_window_context_v1
request set_shadow(
radius: int,
offset_x: int,
offset_y: int,
r: int,
g: int,
b: int,
a: int,
)- radius — shadow radius, -1 for system default, 0 to disable
- offset_x — shadow x offset
- offset_y — shadow y offset
- r — shadow color red component (0-255)
- g — shadow color green component (0-255)
- b — shadow color blue component (0-255)
- a — shadow color alpha component (0-255)
set window shadow
Set window shadow's radius, offset and color.
When enabled, the client manages the window shadow itself.
radius = -1: enable shadow with system default parameters
radius = 0: disable shadow completely
radius > 0: enable shadow with custom parameters
If not invoked, the compositor uses its default behavior.
treeland_personalization_window_context_v1
request set_border(
width: int,
r: int,
g: int,
b: int,
a: int,
)- width — border width in pixels, -1 for system default, 0 to disable
- r — border color red component (0-255)
- g — border color green component (0-255)
- b — border color blue component (0-255)
- a — border color alpha component (0-255)
set window border
Set window border width and color.
When enabled, the client manages the window border itself.
width = -1: enable border with system default parameters
width = 0: disable border completely
width > 0: enable border with custom parameters
If not invoked, the compositor uses its default behavior.
treeland_personalization_window_context_v1
request set_titlebar(
mode: int<enable_mode>,
)- mode — the titlebar enable mode
set if system titlebar is enabled
Set system titlebar state.
mode = enable: force show the system titlebar
mode = disable: force hide the system titlebar
Once set, the compositor will not use its own default behavior
for the titlebar.
If not invoked, the compositor uses its default behavior.
Version 1
global font settings context
This interface allows a client to configure global font settings
including the general font, monospace font, and font size.
Version 1
global appearance settings context
This interface allows a client to configure global appearance settings
including round corner radius, icon theme, active color, window opacity,
window theme type, and window titlebar height.
treeland_personalization_appearance_context_v1
enum error {
invalid_round_corner_radius = 0,
invalid_icon_theme = 1,
invalid_active_color = 2,
invalid_window_opacity = 4,
invalid_window_theme_type = 8,
invalid_window_titlebar_height = 16,
}- invalid_round_corner_radius — Wrong round corner radius
- invalid_icon_theme — Wrong icon theme
- invalid_active_color — Wrong active color
- invalid_window_opacity — Wrong window opacity
- invalid_window_theme_type — Wrong theme type
- invalid_window_titlebar_height — Wrong window titlebar height
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
prelaunch splash screen management
The key words "must", "must not", "required", "shall",
"shall not", "should", "should not", "recommended", "may",
and "optional" in this document are to be interpreted as
described in RFC 2119.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
prelaunch splash screen manager
This interface is a manager for creating prelaunch splash screens.
A prelaunch splash screen is a placeholder surface that is shown
before an application's main window is mapped. This helps to improve
the perceived startup time.
It is particularly useful for application launchers to provide immediate
feedback to the user.
Compared to treeland_prelaunch_splash_manager_v1, this version returns
a splash object from create_splash. The caller can destroy the object
to dismiss the splash, and the compositor can send events (e.g. timeout)
back to the caller through the object.
treeland_prelaunch_splash_manager_v2
request create_splash(
splash: new_id<treeland_prelaunch_splash_v2>,
app_id: string,
instance_id: string,
sandbox_engine_name: string,
icon_buffer: nullable object<wl_buffer>,
)- splash — new splash object
- app_id — the application ID
- instance_id — the application instance ID
- sandbox_engine_name — the sandbox engine / security context name (required, non-empty)
- icon_buffer — optional icon image as wl_buffer (e.g. wl_shm)
create a new splash screen
Creates a new prelaunch splash screen and returns a splash object.
The app_id is a string that identifies the application. The compositor
will use this ID together with sandbox_engine_name to match the splash
screen with the actual application window when it appears. This
matching mechanism should also work for XWayland windows.
The instance_id identifies a specific application instance, allowing
multiple splashes for non-singleton applications. The compositor can
use this to associate a splash with a particular launch instance.
Callers MUST provide a non-empty sandbox_engine_name string which
identifies the sandboxing/container.
Version 1
- destroy — dismiss and destroy the splash
prelaunch splash screen object
Represents a single prelaunch splash screen created by the manager.
The caller can destroy this object to dismiss the corresponding splash.
The compositor may also send events through this object, for example
to notify the caller that the splash was closed due to a timeout.
Copyright
SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
prelaunch splash screen management
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
Compositor Support
prelaunch splash screen manager
This interface is a manager for creating prelaunch splash screens.
A prelaunch splash screen is a placeholder surface that is shown
before an application's main window is mapped. This helps to improve
the perceived startup time.
It is particularly useful for application launchers to provide immediate
feedback to the user.
treeland_prelaunch_splash_manager_v1
request create_splash(
app_id: string,
sandbox_engine_name: string,
icon_buffer: nullable object<wl_buffer>,
)- app_id — the application ID
- sandbox_engine_name — the sandbox engine / security context name (required, non-empty)
- icon_buffer — optional icon image as wl_buffer (e.g. wl_shm)
create a new splash screen
Creates a new prelaunch splash screen.
The app_id is a string that identifies the application. The compositor
will use this ID together with sandbox_engine_name to match the splash
screen with the actual application window when it appears. This
matching mechanism should also work for XWayland windows.
Callers MUST provide a non-empty sandbox_engine_name string which
identifies the sandboxing/container.
If there is already an active (not-yet-completed) splash for the same
sandbox_engine_name and app_id, the compositor will silently ignore
this request (no new splash will be created and no error is raised).
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
edge-anchored region overlap watch for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows a privileged DDE client such as the dock to
monitor whether a region anchored to an edge of an output overlaps
with any xdg-shell toplevel window, for example to implement smart
panel hiding.
The compositor must reject bind attempts from non-privileged
clients.
The terms "must", "must not", "should", and "may" in this document
are to be interpreted as described in RFC 2119.
Version 1
factory for region watchers
A global that creates treeland_region_watch_v1
objects for privileged DDE clients. Each watcher monitors
one region; clients monitoring several regions create
several watchers.
The compositor must reject bind attempts from non-privileged
clients.
Version 1
- anchor — output edge the region is anchored to
- error — region watcher errors
- destroy — destroy the region watcher
- set_region — set the monitored region
- enter — the region is overlapped
- leave — the region is no longer overlapped
- output_removed — the associated output has been destroyed
overlap watcher for an edge-anchored region
A watcher object monitors whether a rectangular region
anchored to an edge of an output overlaps with any xdg-shell
toplevel window.
The client registers the monitored region with the
set_region request and the compositor reports transitions
between the overlapped and clear states with the enter and
leave events. The recorded region only changes when
set_region is called; the client must call set_region again
whenever the monitored panel moves or resizes.
After each set_region request the compositor must evaluate
the region against the current window layout and send the
matching enter or leave event; afterwards it should send
these events only when the overlap state changes.
The watcher is associated with the wl_output passed to the
last set_region request. When that output is destroyed the
compositor sends the output_removed event; the watcher then
becomes inert: it has no monitored region and sends no
further enter or leave events. The watcher object itself is
not destroyed by output removal; the client may call
set_region again with another wl_output to resume
monitoring, or call destroy to release it. The compositor
must not send enter, leave, or output_removed after
output_removed until the next successful set_region.
The client may release the wl_output proxy passed to
set_region at any time after the request returns; the
compositor holds its own reference and the watcher remains
associated with that output until either the output is
destroyed (triggering output_removed) or a subsequent
set_region rebinds to a different output.
treeland_region_watch_v1
enum anchor {
top = 0,
bottom = 1,
left = 2,
right = 3,
}- top — strip along the top edge of the output
- bottom — strip along the bottom edge of the output
- left — strip along the left edge of the output
- right — strip along the right edge of the output
output edge the region is anchored to
The registered region is a strip along the anchored edge
of the output: for top and bottom the strip spans the
full output width and is height units thick; for left and
right it spans the full output height and is width units
thick.
The dimension along the anchored edge is ignored: for
top and bottom the compositor uses the full output width
regardless of the width argument, and for left and right
it uses the full output height regardless of the height
argument. Only the thickness dimension matters — height
for top/bottom, width for left/right — and it must be
positive; the compositor raises invalid_size otherwise.
treeland_region_watch_v1
enum error {
invalid_anchor = 0,
invalid_size = 1,
}- invalid_anchor — anchor is not one of the enum values
- invalid_size — width or height is not positive
treeland_region_watch_v1
request set_region(
width: int,
height: int,
anchor: uint<anchor>,
output: object<wl_output>,
)- width — width of the registered region
- height — height of the registered region
- anchor — output edge the region is anchored to
- output — the output whose edge anchors the region
set the monitored region
Set the monitored region on the given output, or
re-register it when the monitored panel moves or
resizes. The region geometry is described by the anchor
enum; the compositor raises invalid_anchor for an
unknown anchor value and invalid_size when width or
height is not positive.
The output becomes the output associated with the
watcher, replacing any previous one; it may be a
different output from a previous call (rebinding), for
example after the previous output was removed.
After this request the compositor must evaluate the
current overlap state and send the matching enter or
leave event.
treeland_region_watch_v1
event enter()
the region is overlapped
Sent when the registered region begins to overlap any
xdg-shell toplevel window, and after a set_region
request while the region is currently overlapped.
treeland_region_watch_v1
event leave()
the region is no longer overlapped
Sent when the registered region stops overlapping all
xdg-shell toplevel windows, and after a set_region
request while the region is currently clear.
treeland_region_watch_v1
event output_removed()
the associated output has been destroyed
Sent when the wl_output passed to the last set_region
request has been destroyed by the compositor. The
watcher then becomes inert: it has no monitored region
and sends no further enter or leave events.
The watcher object itself is not destroyed; the client
may call set_region again with another wl_output to
resume monitoring, or call destroy to release it. The
compositor must not send this event more than once
without an intervening successful set_region.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
sub-surface compositing via token-based references
This protocol provides sub-surface relationships between
wl_surface objects using token-based identifiers exchanged
out-of-band, instead of the direct wl_surface references
required by wl_subcompositor. In wl_subcompositor the
parent and sibling surfaces must be local wl_surface objects
from the same client; this protocol removes that
restriction, allowing parent-child relationships both across
different client connections and within the same client:
A client exports a wl_surface and receives a surface_token.
Another client (or the same client) exports their own
wl_surface and then calls create_remote_subsurface with
the parent's surface_token, attaching their surface as a
child.
All sub-surface semantics follow the wl_subcompositor
specification unless explicitly noted in this document.
Cross-process sub-surfaces are always in desynchronized mode;
synchronized mode is not supported.
This protocol is not interoperable with wl_subsurface: a
wl_subsurface cannot reference a surface that carries a
treeland_remote_subsurface_v1 role, and the two kinds of
sub-surface cannot be ordered relative to each other. When
a parent surface has both, wl_subsurface is always kept
closest to the parent surface content on each side: a
wl_subsurface placed above the parent content sits below the
treeland_remote_subsurface_v1 children that are above the
parent, and one placed below sits above the
treeland_remote_subsurface_v1 children that are below the
parent. The relative z-order between the two kinds cannot
be controlled precisely, since place_above and place_below
order treeland_remote_subsurface_v1 children among
themselves and relative to the parent surface content, but
cannot position them relative to wl_subsurface children,
and the wl_subcompositor requests cannot position a
wl_subsurface relative to treeland_remote_subsurface_v1
children.
Clients that need fine-grained z-order control across all
sub-surfaces of a parent should replace wl_subsurface with
treeland_remote_subsurface_v1, which is designed for
cross-process relationships but may equally be used within a
single client, avoiding two separate sub-surface trees that
cannot interact with each other.
The compositor must restrict binding to trusted clients.
A client that obtains a surface_token must only share it
with other trusted clients through a secure mechanism;
the compositor does not disclose tokens to other clients.
The key words "must", "must not", "required", "shall",
"shall not", "should", "should not", "recommended", "may",
and "optional" in this document are to be interpreted as
described in RFC 2119.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
factory for remote sub-surfaces
Global factory for exporting wl_surface objects as
token-addressable sub-surface parents or children.
The typical workflow is:
The client calls export_surface on a wl_surface to
obtain a treeland_exported_surface_v1 and receive a
surface_token event.
The token is shared out-of-band with another client.
That client exports its own wl_surface, then calls
create_remote_subsurface with the parent's token to
establish a sub-surface relationship.
Destroying this manager does not affect already-exported
surfaces or existing sub-surface relationships; it only
prevents creation of new exported surfaces.
Version 1
an exported surface, addressable by token
Represents a wl_surface registered for sub-surface use
via this protocol. The surface may act as a parent or a
child; a surface can have at most one parent via this
protocol.
Destroying this object revokes the surface_token without
affecting existing parent-child relationships or
treeland_remote_subsurface_v1 objects.
treeland_exported_surface_v1
enum reject_reason {
invalid_token = 0,
cyclic = 1,
}- invalid_token — parent_token does not identify a live exported surface
- cyclic — parent_token would introduce a cycle in the sub-surface tree
why create_remote_subsurface was rejected
Indicates why a create_remote_subsurface request
could not establish the requested parent-child
relationship.
treeland_exported_surface_v1
event surface_token(
token: string,
)- token — the surface token
the assigned surface token
Emitted immediately after export_surface. The token
is a unique string of at most 128 characters,
generated by a cryptographically secure random number
generator, intended to be shared out-of-band so that
other clients can reference this surface as a parent
or sibling.
treeland_exported_surface_v1
event parent_rejected(
reason: uint<reject_reason>,
parent_token: string,
)- reason — why the parent_token was rejected
- parent_token — the rejected parent token
create_remote_subsurface could not attach to the parent
Emitted when create_remote_subsurface cannot
establish the requested parent-child relationship.
Version 1
remote sub-surface interface to a wl_surface
An additional interface to a wl_surface that has been
made a sub-surface via this protocol. A sub-surface has
one parent and is not automatically clipped to its
parent's area.
Mapping and commit semantics follow wl_subcompositor
except that desynchronized mode is always used. A
sub-surface never has the keyboard focus of any seat.
The parent is identified at creation time and cannot be
changed. place_above and place_below accept a token
(string) instead of a wl_surface proxy; see the request
documentation for valid values.
The wl_surface.offset request is ignored; clients must
use set_position instead.
treeland_remote_subsurface_v1
request set_position(
x: int,
y: int,
)- x — x coordinate in the parent surface local coordinate system
- y — y coordinate in the parent surface local coordinate system
reposition the sub-surface
Schedules a position change relative to the parent
surface coordinate system. Coordinates are not
restricted to the parent area; negative values are
allowed. Double-buffered on the parent; replaces any
previous pending position. Initial position is 0, 0.
treeland_remote_subsurface_v1
request place_above(
sibling_token: string,
)- sibling_token — a surface_token or empty string for top
restack the sub-surface
Places this sub-surface just above the reference
identified by sibling_token, changing the z-order.
Z-order is double-buffered on the parent surface.
A new sub-surface is initially added at the top.
Valid sibling_token values:
The surface_token of the parent exported surface.
The surface_token of any sibling cross-process
sub-surface under the same parent, shared via
out-of-band communication.
An empty string (""), a sentinel meaning
"place at the very top of the sibling stack".
If the sibling_token does not identify a valid
target, the request is ignored and an
invalid_sibling event is emitted.
treeland_remote_subsurface_v1
request place_below(
sibling_token: string,
)- sibling_token — a surface_token or empty string for bottom
restack the sub-surface
Places this sub-surface just below the reference
identified by sibling_token. The same sibling_token
values are accepted as in place_above, except that an
empty string is a sentinel meaning "place at the very
bottom of the sibling stack".
If the sibling_token does not identify a valid
target, the request is ignored and an
invalid_sibling event is emitted.
treeland_remote_subsurface_v1
event invalid_sibling(
sibling_token: string,
)- sibling_token — the unrecognized token
a place_above or place_below request could not be fulfilled
Emitted when a sibling_token does not identify a valid
target. The corresponding restack request was ignored.
Copyright
SPDX-FileCopyrightText: 2025 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
screensaver D-Bus relay for treeland
Internal protocol that relays org.freedesktop.ScreenSaver inhibit/uninhibit
requests between treeland and a per-user-session helper, because a
multi-user compositor does not host per-user-session D-Bus itself.
The key words "must", "must not", "required", "shall",
"shall not", "should", "should not", "recommended", "may",
and "optional" in this document are to be interpreted as
described in RFC 2119.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
treeland screensaver DBus relay
This interface is an internal relay between treeland and a
privileged helper that implements the org.freedesktop.ScreenSaver
D-Bus interface. Treeland is a multi-user compositor and does not
host per-user-session D-Bus itself, so the org.freedesktop.ScreenSaver
Inhibit/UnInhibit calls are forwarded over this Wayland protocol to a
helper running in the user session, which then performs the actual
idle-inhibit bookkeeping.
Only that dedicated relay helper should bind this global. Regular
applications must NOT use this protocol to inhibit idleness; they
should use the upstream zwp_idle_inhibit_manager_v1 protocol instead,
which treeland exposes for normal clients.
The relay helper calls inhibit to register an inhibit on behalf of a
D-Bus caller and uninhibit (or disconnects the bound object) to
release it. If the bound object is destroyed, the inhibit associated
with it is automatically released. At most one inhibit is active per
bound object at a time; calling inhibit while an inhibit is already
active raises already_inhibited, and calling uninhibit with no active
inhibit raises not_yet_inhibited. Call uninhibit before inhibit to
update application_name and reason.
treeland_screensaver_v2
enum error {
not_yet_inhibited = 0,
already_inhibited = 1,
}- not_yet_inhibited — Trying to uninhibit but no active inhibit existed
- already_inhibited — Trying to inhibit with an active inhibit existed
treeland_screensaver_v2
request destroy()
Destructor
destroy the screensaver relay object
Destroy the bound treeland_screensaver_v2 object. Any inhibit
previously registered through this object is released as if
uninhibit had been called, and the relay helper must stop
holding the corresponding org.freedesktop.ScreenSaver inhibit on
the D-Bus caller's behalf.
treeland_screensaver_v2
request inhibit(
application_name: string,
reason_for_inhibit: string,
)- application_name — name of the application requesting the inhibit
- reason_for_inhibit — human-readable reason for the inhibit request
Inhibit idleness
Inhibit idleness with given application_name and reason_for_inhibit.
Copyright
SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
screensaver control for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
Simple idle inhibit protocol
This object implements a simple idle inhibit protocol used
to implement org.freedesktop.ScreenSaver D-Bus interface.
Call inhibit to prevent treeland from entering idle state.
Call uninhibit or disconnect from the global to release
the inhibit.
If the client disconnects from the compositor, the inhibit
associated with that client is automatically released.
There can be only one inhibit per client per time. Calling
inhibit multiple times will raise an error. Call uninhibit
before inhibit to update application_name and reason
recorded.
treeland_screensaver_v1
request inhibit(
application_name: string,
reason_for_inhibit: string,
)- application_name — name of the application requesting the inhibit
- reason_for_inhibit — human-readable reason for the inhibit request
Inhibit idleness
Inhibit idleness with given application_name and reason_for_inhibit.
treeland_screensaver_v1
enum error {
not_yet_inhibited = 0,
already_inhibited = 1,
}- not_yet_inhibited — Trying to uninhibit but no active inhibit existed
- already_inhibited — Trying to inhibit with an active inhibit existed
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
keyboard shortcut management
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows privileged clients to register and manage global
shortcuts for keyboard key sequences, touch swipe gestures, and touch
hold gestures. It also provides a one-shot shortcut capture facility
for clients that need to read the next shortcut input from the user.
Global shortcuts are managed in a per-user context. Shortcuts for
different users are isolated and will not interfere with each other.
This behavior is transparent to clients of this interface.
The terms "must", "must not", "should", and "may" in this document are
to be interpreted as described in RFC 2119.
Version 1
global shortcut manager
A singleton global that manages global shortcut bindings for
key sequences, swipe gestures, and hold gestures.
Before registering or removing bindings the client must acquire
exclusive control by sending the acquire request. Only one client
may hold the manager at a time within a given user session.
Bindings are registered via bind_key, bind_swipe_gesture, and
bind_hold_gesture, and removed via unbind. All of these
requests take effect immediately. A bind request that cannot be
applied is reported with a bind_failure event; successful bind
and unbind requests generate no event, and the client can use
the wl_display.sync request to confirm that earlier requests
have been processed.
If the client's user session is not the currently active
session, bind and unbind requests are deferred: they are
applied when that session becomes active again.
Destroying the manager object implicitly releases the
exclusive control acquired via acquire; no separate release
request is needed.
The capture_next_shortcut request is independent of acquire and
may be sent at any time.
treeland_shortcut_manager_v3
enum direction {
down = 1,
left = 2,
up = 3,
right = 4,
}- down — swipe towards the bottom of the screen
- left — swipe towards the left of the screen
- up — swipe towards the top of the screen
- right — swipe towards the right of the screen
swipe gesture direction
Cardinal directions used to specify the direction of a swipe
gesture binding. The value 0 is reserved and must not be used
as a direction argument.
treeland_shortcut_manager_v3
enum action {
notify = 0,
workspace_1 = 1,
workspace_2 = 2,
workspace_3 = 3,
workspace_4 = 4,
workspace_5 = 5,
workspace_6 = 6,
workspace_7 = 7,
workspace_8 = 8,
workspace_9 = 9,
workspace_10 = 10,
workspace_11 = 11,
workspace_12 = 12,
prev_workspace = 13,
next_workspace = 14,
maximize = 15,
cancel_maximize = 16,
minimize = 17,
move_window = 18,
resize_window = 19,
close_window = 20,
show_window_menu = 21,
move_window_to_prev_workspace = 22,
move_window_to_next_workspace = 23,
show_desktop = 24,
open_multitask_view = 25,
close_multitask_view = 26,
toggle_multitask_view = 27,
taskswitch_next = 28,
taskswitch_prev = 29,
taskswitch_sameapp_next = 30,
taskswitch_sameapp_prev = 31,
tile_left = 32,
tile_right = 33,
tile_top = 34,
tile_bottom = 35,
tile_top_left = 36,
tile_top_right = 37,
tile_bottom_left = 38,
tile_bottom_right = 39,
zoom_in = 40,
zoom_out = 41,
zoom_reset = 42,
toggle_fps_display = 43,
lockscreen = 44,
shutdown_menu = 45,
}- notify — emit an activated event to the client
- workspace_1 — switch to workspace 1
- workspace_2 — switch to workspace 2
- workspace_3 — switch to workspace 3
- workspace_4 — switch to workspace 4
- workspace_5 — switch to workspace 5
- workspace_6 — switch to workspace 6
- workspace_7 — switch to workspace 7
- workspace_8 — switch to workspace 8
- workspace_9 — switch to workspace 9
- workspace_10 — switch to workspace 10
- workspace_11 — switch to workspace 11
- workspace_12 — switch to workspace 12
- prev_workspace — switch to the previous workspace
- next_workspace — switch to the next workspace
- maximize — maximize the active window
- cancel_maximize — restore the active window from maximized state
- minimize — minimize the active window
- move_window — enter window move mode for the active window
- resize_window — enter window resize mode for the active window
- close_window — close the active window
- show_window_menu — show the window menu for the active window
- move_window_to_prev_workspace — move the active window to the previous workspace
- move_window_to_next_workspace — move the active window to the next workspace
- show_desktop — toggle show-desktop mode
- open_multitask_view — open the multitask overview
- close_multitask_view — close the multitask overview
- toggle_multitask_view — toggle the multitask overview
- taskswitch_next — select the next task in the switcher
- taskswitch_prev — select the previous task in the switcher
- taskswitch_sameapp_next — select the next window of the same application in the switcher
- taskswitch_sameapp_prev — select the previous window of the same application in the switcher
- tile_left — tile the active window to the left half of the screen
- tile_right — tile the active window to the right half of the screen
- tile_top — tile the active window to the top half of the screen
- tile_bottom — tile the active window to the bottom half of the screen
- tile_top_left — tile the active window to the top-left quarter of the screen
- tile_top_right — tile the active window to the top-right quarter of the screen
- tile_bottom_left — tile the active window to the bottom-left quarter of the screen
- tile_bottom_right — tile the active window to the bottom-right quarter of the screen
- zoom_in — zoom in the screen
- zoom_out — zoom out the screen
- zoom_reset — reset the screen zoom level
- toggle_fps_display — toggle the compositor FPS overlay
- lockscreen — lock the screen
- shutdown_menu — show the shutdown/session menu
compositor actions assignable to a shortcut
Actions that the compositor executes when a shortcut with this
action is activated.
The notify action is special: instead of performing a
compositor-side operation, the compositor emits an activated
event on this interface so the client can respond.
treeland_shortcut_manager_v3
enum keybind_flag {
key_press = 0x1,
key_release = 0x2,
repeat = 0x4,
}This is a bitfield
- key_press — trigger on key press
- key_release — trigger on key release
- repeat — trigger on auto-repeat while the key is held
keybinding trigger flags
Flags that control when a key binding fires relative to the
key event lifecycle.
key_press: fires when the key is pressed.
key_release: fires when the key is released.
repeat: fires repeatedly while the key is held down
(auto-repeat). Only meaningful when combined with
key_press; combining with key_release causes both
the press and the release auto-repeat events to fire.
Common combinations:
key_press only: fires once on press; ignores repeat and release.
key_press | repeat: fires on press and on every auto-repeat tick.
key_press | key_release: fires on press and release;
auto-repeat events are ignored.
key_press | key_release | repeat: fires on press, every
auto-repeat tick, and on release.
treeland_shortcut_manager_v3
enum bind_error {
name_conflict = 1,
duplicate_binding = 2,
invalid_argument = 3,
internal_error = 4,
}- name_conflict — a binding with this name already exists
- duplicate_binding — an identical trigger-and-action combination already exists
- invalid_argument — an argument has an invalid or out-of-range value
- internal_error — an unrecoverable compositor-internal error occurred
bind request failure codes
Error codes carried by the bind_failure event to describe
why a bind request was rejected.
treeland_shortcut_manager_v3
enum error {
occupied = 1,
not_acquired = 2,
invalid_surface = 3,
}- occupied — the shortcut manager is already held by another client
- not_acquired — the client sent a bind or unbind request without first acquiring the manager
- invalid_surface — the surface argument is not owned by the requesting client
protocol errors for this interface
Error codes sent as protocol errors via wl_display.error.
treeland_shortcut_manager_v3
request destroy()
Destructor
destroy the shortcut manager
Destroy the shortcut manager object. If the client currently
holds exclusive control via acquire, that control is implicitly
released so another client may acquire it. Existing shortcut
bindings registered by this client remain active in the
compositor until the compositor or another client removes them.
treeland_shortcut_manager_v3
request acquire()
acquire exclusive control of the shortcut manager
Acquire exclusive control of the shortcut manager for this
client. The client must send this request before any bind_key,
bind_swipe_gesture, bind_hold_gesture, or unbind request.
Sending those requests without first acquiring is a
protocol error (not_acquired).
Only one client may hold the manager at a time within a given
user session. If another client already holds it, the
compositor sends a protocol error (occupied).
Exclusive control is released implicitly when the client
destroys the manager object.
treeland_shortcut_manager_v3
request bind_key(
name: string,
key: string,
flags: uint<keybind_flag>,
action: uint<action>,
)- name — unique name for this keybinding
- key — key sequence in QKeySequence portable text format
- flags — trigger conditions for this keybinding
- action — compositor action to execute on activation
register a key sequence binding
Register a key sequence binding. The binding takes effect
immediately.
The key argument uses the portable textual format of
QKeySequence (PortableText); see
https://doc.qt.io/qt-6/qkeysequence.html#toString for the
format specification. Only combinations that form a valid
shortcut can be registered; see the capture_next_shortcut
request for the validity rules. An invalid combination is
reported with bind_failure and the invalid_argument error.
The name argument must be unique among all existing bindings.
If a binding with the same name already exists, this request
is reported with bind_failure and the name_conflict error.
If a binding with the same key sequence and action already
exists, this request updates its flags to the new value rather
than failing. This upsert-on-trigger semantics
applies only to bind_key; bind_swipe_gesture and
bind_hold_gesture treat duplicate trigger-action pairs as
errors.
Sending this request without first acquiring is a protocol
error (not_acquired).
treeland_shortcut_manager_v3
request bind_swipe_gesture(
name: string,
finger: uint,
direction: uint<direction>,
action: uint<action>,
)- name — unique name for this swipe gesture binding
- finger — number of fingers required for the swipe
- direction — required swipe direction
- action — compositor action to execute on activation
register a swipe gesture binding
Register a swipe gesture binding. The binding takes effect
immediately.
The name argument must be unique among all existing bindings.
If a binding with the same name already exists, this request
is reported with bind_failure and the name_conflict error.
If a binding with the same finger count, direction, and action
already exists, this request is reported with bind_failure
and the duplicate_binding error.
If direction is not one of the defined direction enum values,
this request is reported with bind_failure and the
invalid_argument error.
Sending this request without first acquiring is a protocol
error (not_acquired).
treeland_shortcut_manager_v3
request bind_hold_gesture(
name: string,
finger: uint,
action: uint<action>,
)- name — unique name for this hold gesture binding
- finger — number of fingers required for the hold
- action — compositor action to execute on activation
register a hold gesture binding
Register a hold gesture binding. The binding takes effect
immediately.
The name argument must be unique among all existing bindings.
If a binding with the same name already exists, this request
is reported with bind_failure and the name_conflict error.
If a binding with the same finger count and action already
exists, this request is reported with bind_failure and the
duplicate_binding error.
Sending this request without first acquiring is a protocol
error (not_acquired).
treeland_shortcut_manager_v3
request unbind(
name: string,
)- name — name of the binding to remove
remove an existing binding
Remove the binding identified by name. The removal takes
effect immediately. If no binding with the given name exists,
this request is silently ignored.
Sending this request without first acquiring is a protocol
error (not_acquired).
treeland_shortcut_manager_v3
request capture_next_shortcut(
surface: object<wl_surface>,
seat: nullable object<wl_seat>,
capture: new_id<treeland_shortcut_capture_v3>,
)- surface — surface used to validate keyboard focus
- seat — seat to capture from, or null to capture from any available seat
- capture — one-shot capture object
start a one-shot shortcut capture
Create a treeland_shortcut_capture_v3 object and start a
one-shot capture of the next shortcut input. This request
does not require acquire and does not modify existing
bindings.
The surface argument must be a wl_surface owned by the
requesting client. If it is not, the compositor sends a
protocol error (invalid_surface).
The compositor handles at most one capture at a time,
regardless of which client requested it. A capture is also
considered in progress until the compositor has consumed the
key_release of the last captured key, so that the release
cannot trigger a shortcut bound in the meantime. If a capture
is already in progress, the compositor emits failed with
reason busy on the newly created object immediately after
creation.
If the seat argument is not null, the compositor verifies
that the keyboard focus of that seat is on the surface. If
the seat argument is null, the compositor selects a seat
whose keyboard focus is on the surface. If no seat has
keyboard focus on the surface, the compositor emits failed
with reason not_active on the newly created object
immediately after creation. Clients must be prepared to
handle a capture object that fails immediately.
Input from seats other than the validated seat is not
intercepted and is processed normally. On the validated seat
the capture intercepts input with priority over registered
shortcut bindings.
While the capture is pending, input from the validated seat
is handled as follows. If the surface loses keyboard focus,
the compositor emits failed with reason aborted and lets the
current event continue to its new focus target. Auto-repeat
events are consumed silently. A pointer button or wheel
event terminates the capture with reason interrupted and is
consumed. A key_press of a pure modifier key (Ctrl, Alt,
Shift, and similar) is consumed silently; its key_release
terminates the capture with reason interrupted, unless the
key is the Meta (Super) key: releasing Meta with no other
modifier held emits captured with the shortcut "Meta". A
key_press of any other key terminates the capture immediately
on the press. If the pressed combination is a valid shortcut
the compositor emits captured and consumes the key_release
that follows; otherwise it emits failed with reason
interrupted. In the captured and interrupted cases the
triggering input event is consumed and not forwarded to any
client.
A valid shortcut is one of: a non-modifier key combined with
Ctrl, Alt, or Meta; a standalone function key (F1 to F35); a
standalone key such as Delete, Backspace, Pause, Print,
Insert, Help, Menu, or Cancel; Shift combined with Space,
Escape, Tab, or a navigation key (Home, End, PageUp, PageDown,
and arrows); a standalone media, browser, brightness, or
launch key; or the Meta (Super) key pressed alone. An
unmodified alphanumeric key and an unmodified Escape are not
valid shortcuts.
treeland_shortcut_manager_v3
event activated(
name: string,
flags: uint<keybind_flag>,
)- name — name of the activated binding
- flags — key event type that triggered activation
a notify-action shortcut was activated
Emitted when a binding registered with action notify is
activated. The name argument identifies the binding by its
unique name. The flags argument indicates which key event
triggered the activation, using the keybind_flag enum values.
treeland_shortcut_manager_v3
event bind_failure(
name: string,
error: uint<bind_error>,
)- name — name of the rejected binding
- error — reason for the failure
a bind request was rejected
Emitted when a bind_key, bind_swipe_gesture, or
bind_hold_gesture request could not be applied; the rejected
binding has no effect. The name argument identifies the
rejected binding; the error argument provides the reason.
If the requesting client's session is not active, the bind
request is applied (and possibly rejected) only when that
session becomes active again, so this event may be emitted
long after the request was sent. Each rejected request is
reported separately; other bindings of the same client are
not affected.
Version 1
- failed_reason — reasons a one-shot capture could not complete
- destroy — destroy the capture object
- captured — a shortcut was successfully captured
- failed — the capture could not be completed
one-shot shortcut capture object
Represents a single pending request to capture the next shortcut
input from the user, created by
treeland_shortcut_manager_v3.capture_next_shortcut.
The compositor captures input once and emits at most one terminal
event: either captured or failed. After a terminal event is sent
this object becomes inert; the client should destroy it promptly.
If the client destroys this object while capture is still pending,
the capture is cancelled and no terminal event is sent.
treeland_shortcut_capture_v3
enum failed_reason {
busy = 1,
aborted = 2,
not_active = 3,
interrupted = 4,
}- busy — a capture is already in progress, or the release of the last captured key is still being consumed
- aborted — the surface lost keyboard focus while the capture was pending
- not_active — the provided surface did not have keyboard focus at the time of the request
- interrupted — the first intercepted input was not a valid shortcut sequence
reasons a one-shot capture could not complete
Describes why the compositor could not deliver a captured
shortcut to the client.
treeland_shortcut_capture_v3
request destroy()
Destructor
destroy the capture object
Destroy this capture object. If capture is still pending,
destroying the object cancels it; no terminal event will be
sent after this request is processed.
treeland_shortcut_capture_v3
event captured(
key: string,
)- key — captured shortcut sequence in QKeySequence portable text format
a shortcut was successfully captured
Emitted when the compositor captured one shortcut input for
this request. The key argument carries the shortcut sequence
in the same QKeySequence portable text format used by
treeland_shortcut_manager_v3.bind_key. A capture of the Meta
(Super) key pressed alone is reported as the shortcut "Meta".
This is a terminal event; the object is now inert.
treeland_shortcut_capture_v3
event failed(
reason: uint<failed_reason>,
)- reason — reason the capture failed
the capture could not be completed
Emitted when the compositor could not deliver a captured
shortcut. The reason argument describes why. See the
failed_reason enum for details.
This is a terminal event; the object is now inert.
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
keyboard shortcut management
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
shortcut manager
This interface allows a client to get some shell's info.
treeland_shortcut_manager_v1
request register_shortcut_context(
key: string,
id: new_id<treeland_shortcut_context_v1>,
)register shortcut key
The format of the shortcut key is 'Modify+Key', such as 'Ctrl+Alt+T'.
If the format is wrong, the synthesizer will give a "format error". If the shortcut
key is already registered,
the compositor will give a "register error" and issue a destruction to the context.
Version 1
client shortcut context
This interface allows a client to listen a shortcut action.
Copyright
SPDX-FileCopyrightText: 2024-2025 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
keyboard shortcut management
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 3
Compositor Support
global shortcuts manager for treeland
This interface allows privileged clients to register global shortcuts.
In treeland, global shortcuts are managed in a per-user context.
Shortcuts for different users are isolated, and will not interfere with each other.
This allows multiple users to use their own set of global shortcuts
on the same system without conflicts.
This behavior is transparent to the clients of this interface (i.e.,
the user context used by this protocol is the same as that of the client.)
treeland_shortcut_manager_v2
enum action {
notify = 1,
workspace_1 = 2,
workspace_2 = 3,
workspace_3 = 4,
workspace_4 = 5,
workspace_5 = 6,
workspace_6 = 7,
prev_workspace = 8,
next_workspace = 9,
show_desktop = 10,
maximize = 11,
cancel_maximize = 12,
move_window = 13,
close_window = 14,
show_window_menu = 15,
open_multitask_view = 16,
close_multitask_view = 17,
toggle_multitask_view = 18,
toggle_fps_display = 19,
lockscreen = 20,
shutdown_menu = 21,
quit = 22,
taskswitch_enter = 23,
taskswitch_next = 24,
taskswitch_prev = 25,
taskswitch_sameapp_next = 26,
taskswitch_sameapp_prev = 27,
tile_left = 28,
tile_right = 29,
}compositor actions
Compositor actions that can be assigned to a shortcut.
treeland_shortcut_manager_v2
enum keybind_flag {
key_press = 0x1,
key_release = 0x2,
repeat = 0x4,
}This is a bitfield
- key_press — bind key press events
- key_release — bind key release events
- repeat — bind autorepeat events.
keybinding flags
Flags to specify the keybinding mode.
With key_press, the action is triggered on key press.
With key_release, the action is triggered on key release.
With repeat, the action is repeatedly triggered if the key is held down.
Examples:
key_press | repeat: the action is triggered on key press, and repeatedly
triggered if the key is held down.
key_press | key_release: the action is triggered on both key press and
key release, auto-repeated events are ignored.
key_press | key_release | repeat: note that treeland repeats both key
press and key release events.
treeland_shortcut_manager_v2
enum bind_error {
name_conflict = 1,
duplicate_binding = 2,
invalid_argument = 3,
internal_error = 4,
}- name_conflict — a binding with this name already exists
- duplicate_binding — a binding with this key sequence and action already exists
- invalid_argument — an argument has an invalid value
- internal_error — an internal compositor error occurred
binding error codes
Error codes indicating the reason of a binding failure.
treeland_shortcut_manager_v2
request destroy()
Destructor
destroy the shortcut manager
Destroy the shortcut manager.
Existing shortcuts created through this interface remain valid.
treeland_shortcut_manager_v2
request acquire()
acquire the shortcut manager
Acquire the shortcut manager for the current client.
This request must be sent before any bind/unbind request can be performed.
Only one client can hold exclusive control of the shortcut manager at a time,
for a given session.
If the shortcut manager is already acquired by another client,
the compositor will raise the occupied protocol error.
treeland_shortcut_manager_v2
request bind_key(
name: string,
key: string,
flags: uint<keybind_flag>,
action: uint<action>,
)- name — unique name for the keybinding
- key — key sequence for the keybinding
- flags — flags for the keybinding
- action — compositor action to be executed
bind a key sequence to a compositor action
Bind a key sequence to a compositor action.
The key sequence is specified in the string format used by QKeySequence,
see https://doc.qt.io/qt-6/qkeysequence.html#toString for details.
Sending this request without first acquiring the shortcut manager
will result in a not_acquired protocol error.
The name argument must be unique among all existing bindings.
If a binding with the same name already exists, the bind_key request will fail.
The action argument specifies the compositor action to be executed
when the key sequence is activated.
Each keybind has a flags argument that specifies the exact triggering condition,
see the documentation of the keybind_flag enum for details.
If a binding with the same key sequence and action already exists,
its flags will be updated to the new value.
Note that the binding will not take effect until a commit request is sent.
treeland_shortcut_manager_v2
request bind_swipe_gesture(
name: string,
finger: uint,
direction: uint<direction>,
action: uint<action>,
)- name — unique name for the swipe gesture
- finger — number of fingers required for the swipe gesture
- direction — direction of the swipe gesture
- action — compositor action to be executed
bind a swipe gesture to a compositor action
Bind a swipe gesture to a compositor action.
Sending this request without first acquiring the shortcut manager
will result in a not_acquired protocol error.
The name argument must be unique among all existing bindings.
If a binding with the same name already exists, the bind_swipe_gesture request will fail.
The direction argument specifies the direction towards which the swipe gesture must be performed.
If this argument is not one of the defined enum values, the bind_swipe_gesture request will fail.
The action argument specifies the compositor action to be executed
when the swipe gesture is activated.
If a binding with the same gesture and action already exists,
the bind_swipe_gesture request will fail.
Note that the binding will not take effect until a commit request is sent.
treeland_shortcut_manager_v2
request bind_hold_gesture(
name: string,
finger: uint,
action: uint<action>,
)- name — unique name for the hold gesture
- finger — number of fingers required for the hold gesture
- action — compositor action to be executed
bind a hold gesture to a compositor action
Bind a hold gesture to a compositor action.
Sending this request without first acquiring the shortcut manager
will result in a not_acquired protocol error.
The name argument must be unique among all existing bindings.
If a binding with the same name already exists, the bind_hold_gesture request will fail.
The action argument specifies the compositor action to be executed
when the hold gesture is activated.
If a binding with the same gesture and action already exists,
the bind_hold_gesture request will fail.
Note that the binding will not take effect until a commit request is sent.
treeland_shortcut_manager_v2
request commit()
commit the pending bindings
Commit the pending bindings.
This request applies all the bind_key, bind_swipe_gesture and bind_hold_gesture
requests sent since the last commit.
After processing this request, the compositor will emit a commit_success event
if the commit was successful or commit_failure event if the commit failed.
On a successful commit, all the pending bindings will take effect.
On a failed commit, none of the pending bindings will take effect.
Sending this request without first acquiring the shortcut manager
will result in a not_acquired protocol error.
Sending further commit requests before commit_success or commit_failure
is sent is a protocol error.
treeland_shortcut_manager_v2
request unbind(
name: string,
)- name — unique name of the binding to be removed
remove an existing binding
Remove an existing binding.
Sending this request without first acquiring the shortcut manager
will result in a not_acquired protocol error.
The binding to be removed is identified by its unique name.
If no binding with the specified name exists, the unbind request has no effect.
treeland_shortcut_manager_v2
request capture_next_shortcut(
surface: object<wl_surface>,
seat: nullable object<wl_seat>,
capture: new_id<treeland_shortcut_capture_v1>,
)Available since version 2
- surface — surface used for focus or active validation
- seat — seat to capture from, or null to capture from any seat
- capture — one-shot capture object
capture the next shortcut once
Request the compositor to capture the next shortcut input once,
bound to the provided surface.
The capture object is created by this request via new_id.
The compositor performs validation after receiving the request,
and may immediately emit a terminal event on the newly created object.
Clients must be prepared to handle a capture object that is
failed immediately after creation.
The surface argument must be a wl_surface owned by the requesting client.
Otherwise, the compositor will raise the invalid_surface protocol error.
The compositor must verify that the provided surface currently has
keyboard focus or is active before starting capture.
If this check fails, the compositor must first decide that capture
does not start, and then must emit failed with reason
not_active on the created object.
The compositor monitors both key_press and key_release events during
capture. The shortcut candidate is established on key_press of a valid
non-modifier key; the terminal event (captured or failed) is sent on
key_release of that non-modifier key. Pure modifier-only key presses
(e.g. Ctrl, Alt, Shift) are silently consumed while waiting for a
non-modifier key. Auto-repeat events are consumed and ignored.
If the next intercepted input is not a valid shortcut input
(for example: unmodified alphanumeric keys such as a, b, c, d,
1, 2, 3, unmodified Escape, or pointer button and wheel events),
the compositor
must fail capture with reason interrupted.
For either interrupted failure or successful captured,
the triggering input event must be consumed by the compositor
and must not be forwarded to the client.
The compositor creates a treeland_shortcut_capture_v1 object and starts
a one-shot capture flow for this request.
This request does not modify existing shortcut bindings.
This request does not require acquire.
treeland_shortcut_manager_v2
event activated(
name: string,
flags: uint<keybind_flag>,
)- name — binding id of the activated shortcut
- flags — flags for the key event
a shortcut has been activated
This event is emitted when a binding registered with action notify is activated.
The flags argument indicates the type of key event as defined in the keybind_flag enum.
treeland_shortcut_manager_v2
event commit_failure(
name: string,
error: uint<bind_error>,
)- name — binding name that caused the failure
- error — error code indicating the reason of the failure
the last commit has failed
This event is emitted in response to a commit request,
indicating that the commit has failed.
The error argument indicates the first error that caused the commit to fail.
Version 1
one-shot shortcut capture object
This object represents one request to capture the next shortcut input.
After creation, the compositor captures input once and may send at most one
terminal event: either captured or failed.
If the client destroys this object while capture is pending,
no terminal event is sent.
After a terminal event is sent, this object becomes inert.
The client should destroy this object promptly after receiving
captured or failed.
treeland_shortcut_capture_v1
enum failed_reason {
busy = 1,
aborted = 2,
not_active = 3,
interrupted = 4,
}- busy — another capture is in progress
- aborted — capture was aborted by compositor policy
- not_active — surface focus or active validation failed
- interrupted — capture was interrupted by a non-shortcut intercepted input
capture failure reason
Reasons why a one-shot capture could not complete.
treeland_shortcut_capture_v1
event captured(
key: string,
)- key — captured shortcut sequence
a shortcut input was captured
The compositor captured one shortcut input for this request.
The key argument uses the same textual format as bind_key.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
show-desktop mode control
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows a privileged client such as a dock or desktop
shell to control and observe the compositor's show-desktop mode.
In show-desktop mode the compositor minimizes or hides all toplevel
windows to reveal the desktop surface underneath.
The terms "must", "must not", "should", and "may" in this document
are to be interpreted as described in RFC 2119.
Version 1
show-desktop mode controller
A singleton global that provides read/write access to the
compositor's show-desktop mode state.
Only one client may bind this interface at a time. The
compositor should reject subsequent bind attempts from other
clients while a binding is already active.
On binding, the compositor immediately sends a show_desktop_state
event carrying the current mode so that the client starts
synchronized.
The client sends set_show_desktop_state to request a mode transition.
The compositor applies the transition at its discretion and
confirms the new state via a show_desktop_state event. The
compositor may also emit show_desktop_state spontaneously when
the mode changes through other means (e.g. a keyboard
shortcut or gesture).
treeland_show_desktop_v1
enum state {
normal = 0,
show = 1,
}- normal — all windows are shown normally
- show — all windows are hidden to reveal the desktop
show-desktop mode values
Describes the current display state of the desktop.
treeland_show_desktop_v1
request destroy()
Destructor
destroy the show-desktop controller
Destroy the treeland_show_desktop_v1 object and release
the singleton binding. The compositor will accept a new
binding from another client after this request is processed.
This request does not alter the current show-desktop mode;
the compositor retains whatever state was last set.
treeland_show_desktop_v1
request set_show_desktop_state(
state: uint<state>,
)- state — requested show-desktop state
request a show-desktop mode transition
Request that the compositor transition to the given
show-desktop mode. The compositor may ignore the request
or apply it asynchronously. If the mode changes, the
compositor confirms the new state by emitting a
show_desktop_state event.
Sending the same mode that is already active is a no-op;
the compositor need not emit a show_desktop_state event in
response.
treeland_show_desktop_v1
event show_desktop_state(
state: uint<state>,
)- state — new show-desktop state
current show-desktop mode has changed
Emitted by the compositor whenever the show-desktop mode
changes, including once immediately after the client binds
this interface to convey the initial state.
The compositor emits this event both in response to a
set_show_desktop_state request and when the mode changes through
any other compositor-side mechanism.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
compositor-side snap region hint
This protocol allows a client to request snap region hints from the
compositor. While snapping is active, the compositor tracks the cursor
position and notifies the client of the rectangle currently hovered by
the cursor (e.g., a window boundary or a full output). The client uses
these hints to draw its own snap preview UI.
Snap targets are computed against the window layout captured when the
snap session starts: the compositor records the position and stacking
order of every window at that moment and keeps them unchanged for the
whole session. Windows that move, are mapped or unmapped, change
stacking order, or are destroyed after start are not reflected in the
snap targets.
A client may identify an overlay surface by setting the xdg-toplevel-tag
"org.deepin.treeland.snap-mask" on that toplevel. When the compositor
detects this tag, it applies the following configuration to the surface:
Raises the surface above normal windows and their popup panels.
Disables window open/close animations.
Excludes the surface from the multitask view and window switcher.
Disables automatic positioning by the compositor's layout engine.
Such a surface does not affect the snapping protocol; snapping
behaves the same whether or not the surface exists. Surfaces
carrying the snap-mask tag are excluded from snapping, i.e., they
are never reported as snap targets.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
snap region hint session
This interface is a global singleton for requesting snap region hints
from the compositor. Each client binds at most one instance of this
global. The compositor tracks the cursor position and notifies the
client of the rectangle currently hovered by the cursor.
The snap object is created in an idle state. The client starts
snapping by calling start, which causes the compositor to capture the
current window positions and stacking order and begin tracking the
cursor position, providing snap region hints based on the captured
layout.
While snapping is active, the compositor sends a snap_region event
each time the snap target changes (i.e., when the cursor moves to a
different window or output). A client that also needs to know which
process owns a window snap target can enable the optional pidfd event
by setting the event_type.pidfd bit in the events argument of start;
without that bit the compositor sends no pidfd events. When enabled,
and when the new snap target is a window with a determinable owning
process, a pidfd event reporting that process is sent before the
snap_region event it applies to. The client can use these events to
update its snap preview UI.
When the client is done (e.g., the user has clicked or dragged to
confirm a selection in the client's UI), the client calls stop to
stop snap notifications. A stopped snap object may be restarted by
calling start again.
Only one snap session may be active across all clients at any time.
If another client's snap session is active, start fails with the
snap_busy reason.
treeland_snap_target_v1
enum event_type {
pidfd = 1,
}This is a bitfield
- pidfd — report the pidfd of the process owning window snap targets
optional events a client can enable at start
Bitfield of optional events the client may request when starting a
snap session. Bits not listed here are reserved for future events
and are ignored by the compositor.
treeland_snap_target_v1
request start(
seat: object<wl_seat>,
events: uint<event_type>,
)- seat — seat associated with this snap session
- events — optional events to enable for this session
begin snap region hints
Request the compositor to capture the current window positions and
stacking order and begin tracking the cursor, sending snap region
hints based on the captured layout.
The seat argument associates this snap session with a seat. How the
compositor uses the seat is compositor policy.
This request may be called again after stop to restart snapping; a
fresh capture of the window layout is taken on every start. start
must not be called on an already active snap object; the compositor
ignores such a request.
The events argument selects which optional events the compositor may
send for this session. It is a bitfield of event_type values: only
the events whose bits are set are enabled, and passing 0 enables no
optional events. Bits that do not correspond to a known event_type
value are ignored. The selection applies to this session only; a
start after stop establishes a new selection.
If snapping cannot be started because another client's snap session
is already active, the compositor sends a failed event with the
snap_busy reason instead.
treeland_snap_target_v1
request stop()
stop snap region hints
Signal that the client is done with snapping. The compositor stops
tracking the cursor and stops sending snap_region events.
This request is a no-op if snapping is not in progress (e.g., if
failed was already emitted or stop was already called).
The client should call destroy afterwards to free the snap object.
treeland_snap_target_v1
event pidfd(
pidfd: fd,
)- pidfd — pidfd of the process owning the snap target
pidfd of the process owning the snap target
Reports the process owning the window that corresponds to the snap
target reported by the next snap_region event. This event is sent
only if the client enabled the event_type.pidfd bit in the events
argument of start; otherwise it is never sent. When enabled, the
compositor sends this event before the snap_region event it applies
to, and only when the snap target is a window whose owning process
can be determined. If the snap target is not a window (for example an
output or empty desktop space), or the owning process cannot be
determined, this event is omitted and snap_region is sent on its own.
No pidfd event is ever sent for a snap target whose window was
destroyed after start: the captured region remains a snap target,
but its owning process no longer exists.
The client owns the received file descriptor and is responsible for
closing it. The descriptor stays valid independently of the snap
session.
treeland_snap_target_v1
event snap_region(
x: int,
y: int,
width: uint,
height: uint,
)- x — global logical x coordinate of the snap target
- y — global logical y coordinate of the snap target
- width — width of the snap target (0 if no target)
- height — height of the snap target (0 if no target)
current snap target region
Notifies the client of the current snap target rectangle. The snap
target set is captured at start and is fixed for the whole session:
a window that moves, is mapped or unmapped, changes stacking order,
or is destroyed after start does not add, remove, move, resize, or
reorder the targets captured at start. In particular, a window
destroyed after start keeps its captured region as a snap target.
This event is sent each time the snap target changes due to cursor
movement.
This event commits the snap target. A pidfd event, when sent for
this target, precedes it and reports the process owning the target.
When processing this event, the client should associate the most
recent preceding pidfd event, if any, with this target; if no pidfd
event precedes it, the target has no associated process.
The region is in global logical coordinates (i.e., the
xdg_output logical coordinate space). The client is responsible for
any coordinate transformation needed for its UI.
If width and height are both zero, there is no current snap target
(e.g., the cursor is over empty desktop space). The client should
hide its snap preview in this case.
treeland_snap_target_v1
event failed(
reason: uint<failure_reason>,
)- reason — why snapping failed
snapping failed
Snapping could not be started. The compositor
will not send any more snap_region events. The client should call
destroy to free the snap object.
This event is sent when another client's snap session is already
active (reason snap_busy).
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
virtual output creation and management
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 3
Compositor Support
Manager creates virtual output
This interface is a manager that allows the creation of copied output.
treeland_virtual_output_manager_v1
request create_virtual_output(
id: new_id<treeland_virtual_output_v1>,
name: string,
outputs: array,
)- id — the new virtual output object
- name — The name of the user readable virtual output
- outputs — Screen name array
Create a virtual output
Create virtual output that can be used when setting screen copy mode for use
on multiple screens. Virtual outputs are created to mirror multiple wl_output
outputs.
The name argument must not be empty. If name is empty, the compositor
emits an error event with code invalid_group_name.
The element of the array is the name of the screen.
The first element of the array outputs is the screen to be copied, and
the subsequent elements are the screens to be mirrored.
The outputs array must contain at least two elements. If the number
of elements is less than two, the compositor emits an error event
with code invalid_screen_number.
If any output name in the outputs array does not exist, the compositor
emits an error event with code invalid_output.
The client calling this interface will not generate an additional wl_output
object on the client.
treeland_virtual_output_manager_v1
request get_virtual_output_list()
Gets a list of virtual output names
Gets a list of virtual output names.
The compositor emits one virtual_output_list event for each request.
Clients should avoid issuing a new get_virtual_output_list request
before receiving the corresponding event.
treeland_virtual_output_manager_v1
event virtual_output_modified(
name: string,
)Available since version 3
- name — The name of the changed virtual output
A virtual output group changed
Sent whenever the set of virtual output groups changes: a group
was created, updated, or removed (e.g. copy mode collapsed to
extension after its source was disabled).
The client should re-issue get_virtual_output_list to refresh
its view of the available groups.
Version 1
screen output object
Represents a virtual screen output object that mirrors the content of physical outputs.
treeland_virtual_output_v1
event outputs(
name: string,
outputs: array,
)- name — The name of the user readable virtual output
- outputs — Screen name array
screen output changes
This event is sent to the client when any screen in the array changes.
The element of the array is the name of the screen.
The first element of the array outputs is the screen to be copied, and
the subsequent elements are the screens to be mirrored.
When the primary screen (the screen being copied) is removed, a successor
is selected from the queue as the primary screen, and the queue information
is updated.
treeland_virtual_output_v1
enum error {
invalid_group_name = 0,
invalid_screen_number = 1,
invalid_output = 2,
}- invalid_group_name — Group name is empty
- invalid_screen_number — The number of screens applying for copy mode is less than 2
- invalid_output — Output does not exist
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
wallpaper color monitoring
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
Compositor Support
treeland_wallpaper_color_manager_v1
event output_color(
output: string,
isdark: uint,
)- output — system output name
output color changed
Tell the client that the wallpaper color of the screen it is monitoring has changed.
This event will also be sent immediately when the client requests a watch.
Copyright
SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
wallpaper management
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
treeland_wallpaper_manager_v1
request get_treeland_wallpaper(
id: new_id<treeland_wallpaper_v1>,
output: object<wl_output>,
surface: nullable object<wl_surface>,
)- output — the output to associate the wallpaper with
- surface — The wl_surface associated with this wallpaper, or null to unset it
Create a wallpaper object for an output.
Creates a treeland_wallpaper_v1 object bound to the specified wl_output.
The compositor may enforce that only one wallpaper exists for a given
(output, role) combination.
When a surface is associated, the compositor will track the workspace
the surface belongs to. Whenever the workspace changes, the compositor
may notify the client of the current wallpaper file path used by that
workspace.
Note:
The treeland_wallpaper_v1 object must be destroyed before
the associated wl_output is destroyed.
The treeland_wallpaper_v1 object must be destroyed before
the associated wl_surface is destroyed.
Version 1
Wallpaper object interface for setting and managing wallpaper content
The treeland_wallpaper_v1 interface represents a wallpaper instance
created by the compositor for a specific output, role.
The wallpaper source provided by the client is stored and managed on
the compositor side. Once a wallpaper source has been set,
the compositor may cache, reuse, or persist the source independently
of the client.
treeland_wallpaper_v1
enum error {
already_used = 0,
invalid_source = 1,
permission_denied = 2,
}- already_used — wallpaper file has already been used and is cached on the wallpaper side
- invalid_source — The specified wallpaper source is invalid, unsupported, or failed to load.
- permission_denied — Permission denied when opening the specified wallpaper source
treeland_wallpaper_v1
request destroy()
Destructor
Destroy the wallpaper object
Destroys the treeland_wallpaper_v1 object and releases all resources
associated with it on the compositor side.
After calling this request, the client must not use the wallpaper
object anymore.
treeland_wallpaper_v1
request set_image_source(
file_source: string,
role: uint<wallpaper_role>,
)- file_source — Path to the image file to be used as the wallpaper
- role — wallpaper role
Set an image wallpaper source
Sets an image as the wallpaper source, apply to the current
wl_output and the active workspace. except for lockscreen
wallpapers, only one wallpaper can be set per wl_output.
Supported formats:
The compositor will attempt to load and display the specified image
file. If the file cannot be accessed, decoded, or is in an unsupported
format, the compositor will emit a failed event with an appropriate
error code.
Access Control: This protocol accepts file_source such
as /usr/share/wallpapers/xxx or /var/cache/wallpapers/xxxx provided
by the client. the compositor will perform file verification.
treeland_wallpaper_v1
request set_video_source(
file_source: string,
role: uint<wallpaper_role>,
)- file_source — Path to the video file to be used as the wallpaper
- role — wallpaper role
Set a video wallpaper source
Sets a video file as the wallpaper source, apply to the current
wl_output and the active workspace. except for lockscreen
wallpapers, only one wallpaper can be set per wl_output.
Supported formats:
The compositor is responsible for decoding and presenting the video.
Playback behavior such as looping, synchronization, and performance
characteristics are compositor-defined.
If the video source cannot be opened or decoded, a failed event
will be emitted.
Access Control: This protocol accepts file_source such
as /usr/share/wallpapers/xxx or /var/cache/wallpapers/xxxx provided
by the client. the compositor will perform file verification.
treeland_wallpaper_v1
event failed(
file_source: string,
error: uint<error>,
)- file_source — Path to the file to be used as the wallpaper
- error — The error code indicating the failure reason
Indicates a wallpaper operation failure
This event is emitted when a wallpaper-related request fails.
The failure may occur during source loading, validation, or runtime
setup. The error code provides additional information about the cause
of the failure.
Possible error values include:
already_used: The wallpaper source is already configured. This is
not a fatal error and serves as a notification to the client.
invalid_source: The specified wallpaper source is invalid,
unsupported, or could not be processed. This is a fatal error and
the client should verify the source before retrying.
Permission denied, check file permissions.
treeland_wallpaper_v1
event changed(
role: uint<wallpaper_role>,
source_type: uint<wallpaper_source_type>,
file_source: string,
)- source_type — The type of the current wallpaper source
- file_source — The file path of the current wallpaper source
Indicates that the wallpaper source has changed
This event is emitted by the compositor to notify the client that the
wallpaper source associated with this treeland_wallpaper_v1 object
has changed.
The event may be emitted during initial object setup or when the
wallpaper is changed due to external factors not initiated by this
client, such as compositor policy decisions, workspace switches
(except for lockscreen wallpapers) that affect the active
wallpaper, or other system components.
For desktop wallpapers, workspace switches may also trigger
this event to report the wallpaper used by the new workspace.
The event provides the current wallpaper source type and the
corresponding source file path.
Copyright
SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
wallpaper shell integration
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
Notification interface for wallpaper source changes
The treeland_wallpaper_notifier_v1 interface provides notifications
about the availability and lifetime of wallpaper sources managed by
the compositor.
This interface is purely event-driven. Clients receive events when
wallpaper sources are added, become active, or are removed, and may
update their internal state or user interface accordingly.
treeland_wallpaper_notifier_v1
event add(
source_type: uint<wallpaper_source_type>,
file_source: string,
)- source_type — The type of the wallpaper source
- file_source — The file path or identifier of the wallpaper source
Notify about a new wallpaper source
This event is sent by the compositor when a new wallpaper source
is added or becomes active.
The source_type argument describes the type of the wallpaper
source. The meaning of the file_source argument depends on the
reported source_type.
treeland_wallpaper_notifier_v1
event remove(
file_source: string,
)- file_source — The file path or identifier of the wallpaper source
Notify that a wallpaper source has been removed
This event indicates that the wallpaper source identified by
file_source is no longer available.
After receiving this event, the client should discard any internal
state associated with the wallpaper source and must not reference
it anymore.
Version 1
Wallpaper shell global
The treeland_wallpaper_shell_v1 interface is a global object exposed by
the compositor that allows a client to assign the wallpaper role to
a wl_surface and create wallpaper surface objects.
A wallpaper surface represents content intended to be displayed as
the desktop wallpaper, such as a static image or a dynamic media
source, and is associated with exactly one wl_surface.
This interface follows the shell pattern used by other Wayland
protocols: it assigns a specific role to a wl_surface and manages
the lifetime and behavior of wallpaper surfaces.
This interface is a singleton. At most one client may bind to
treeland_wallpaper_shell_v1 at any given time.
treeland_wallpaper_shell_v1
request get_treeland_wallpaper_surface(
id: new_id<treeland_wallpaper_surface_v1>,
surface: object<wl_surface>,
file_source: string,
)- id — The newly created wallpaper surface object
- surface — The wl_surface to which the wallpaper role is assigned
- file_source — The initial wallpaper source identifier
Create a wallpaper surface
Creates a treeland_wallpaper_surface_v1 object and assigns the
wallpaper role to the given wl_surface.
The provided wl_surface must not already have a role, and while
it is used as a wallpaper surface, it must not be assigned any
other role.
The file_source argument specifies the initial wallpaper source
identifier. Its interpretation depends on the wallpaper source
type selected by the compositor.
Version 1
Wallpaper surface controller
The treeland_wallpaper_surface_v1 interface controls the behavior of a
wallpaper surface.
A wallpaper surface is bound to exactly one wl_surface and defines how
that surface should be sized, positioned, and synchronized with the
compositor's wallpaper management logic.
treeland_wallpaper_surface_v1
enum error {
invalid_source = 1,
permission_denied = 2,
}- invalid_source — The specified wallpaper source is invalid, unsupported, or failed to load.
- permission_denied — Permission denied when opening the specified wallpaper source
treeland_wallpaper_surface_v1
request destroy()
Destructor
Destroy the wallpaper surface
Destroy the wallpaper surface object and release its association with
the underlying wl_surface.
After calling this request, the wallpaper surface object becomes
invalid and must not be used again.
This request should only be sent when the client intends to
permanently stop using the wallpaper surface, such as when the
client is shutting down or after receiving the
treeland_wallpaper_notifier_v1.remove event for this surface.
The surface should also have released its wl_buffer attachment.
treeland_wallpaper_surface_v1
request source_failed(
error: uint<error>,
)- error — The error code indicating the failure reason
Report a wallpaper source failure
Reports to the compositor that a wallpaper-related operation has
failed on the client side.
This request may be sent by the client when it fails to open,
load, or otherwise process the configured wallpaper source.
The compositor may use this information for diagnostics, policy
decisions, or to adjust internal state.
Possible error values include:
invalid_source: The specified wallpaper source is invalid,
unsupported, or could not be processed. This is a fatal error and
indicates that the source should be verified before retrying.
permission_denied: The client does not have permission to access
the specified wallpaper source.
treeland_wallpaper_surface_v1
request ready()
Notify that wallpaper content is ready
Informs the compositor that the wallpaper surface has completed
its initial rendering and is ready to be displayed.
The client should send this request only after a valid buffer
has been attached and committed to the associated wl_surface.
Before receiving this request, the compositor may keep the
wallpaper hidden or continue displaying a fallback wallpaper.
This request is typically used to avoid visual glitches such as
black frames, incomplete rendering, or uninitialized content
during wallpaper startup.
Calling this request multiple times has no additional effect.
treeland_wallpaper_surface_v1
event position(
position: fixed,
)- position — Position or progress value in fixed-point format
Update wallpaper position or progress
This event provides a position value associated with the wallpaper.
The semantic meaning of the position value is compositor-defined.
It may represent a scroll offset, animation progress, or playback
position. The value is expressed as a fixed-point number[0, 1.0].
treeland_wallpaper_surface_v1
event pause()
Pause wallpaper updates
This event instructs the client to pause wallpaper updates or
animations.
After receiving this event, the client should stop advancing any
time-based or animated wallpaper content until a play event is
received.
treeland_wallpaper_surface_v1
event set_playback_rate(
rate: fixed,
)- rate — Playback rate multiplier
Set wallpaper playback rate
Sets the playback speed of the wallpaper content.
A rate of 1.0 represents normal speed.
A rate of 0.0 is equivalent to receiving a pause event.
treeland_wallpaper_surface_v1
event slow_down(
duration: uint,
)- duration — Duration in milliseconds over which the slowdown occurs
Request a gradual slowdown of wallpaper updates
This event instructs the client to progressively reduce the playback
or animation update rate of the wallpaper content until it comes to
a complete stop.
The slowdown should be smooth and continuous rather than abrupt.
The duration argument specifies the amount of time, in milliseconds,
over which the slowdown should occur. After this duration has elapsed,
the client should consider the wallpaper paused.
A duration of 0 means the client should pause immediately.
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
application window management
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
Compositor Support
application windows management
This interface manages application windows.
It provides requests to show and hide the desktop and emits
an event every time a window is created so that the client can
use it to manage the window.
Only one client can bind this interface at a time.
treeland_window_management_v1
event show_desktop(
state: uint<desktop_state>,
)notify the client when the show desktop mode is entered/left
This event will be sent whenever the show desktop mode changes. For example, this
event is sent when the user enters or leaves show desktop mode.
On binding the interface the current state is sent.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
window open/close transition relative to a rectangle
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This extension allows a client to request that the compositor play
a window transition for a new window that opens from a specified
rectangular area, and, when the window is closed, transitions back
to that same rectangular area.
The rectangle is attached to an xdg-activation-v1 token string after
the token is committed, so the compositor can associate the rectangle
with the originating surface and use it as the animation source when
the target window appears.
The client may call set_geometry multiple times to update the
geometry, and the compositor uses the latest set geometry for both
the open and the close animation.
Optionally, the client may attach a live source surface to the
rectangle via set_source_surface. When a source surface is set, the
compositor uses its content as the source of the transition instead
of an empty rectangle, and renders it live while the transition is
playing.
The client may temporarily disable the rectangle by setting a
geometry of 0x0 size (zero width and zero height). While the
rectangle is disabled, the compositor does not use it as the
animation source or target and behaves as if no rectangle were
set, but the rectangle object and its association with the
activation token remain alive. The client can re-enable the
rectangle later by setting a positive size again; the target
window uses the latest set geometry whenever the rectangle is
enabled.
The full flow is:
A, the originating surface, obtains an xdg_activation_token_v1,
calls set_surface to identify itself, and calls commit to obtain
the token string.
A calls get_window_transition_rect on this manager, passing the
token string.
A calls set_geometry on the resulting rect object to define the
transition rectangle (relative to A), and optionally calls
set_source_surface on the rect object to attach a live source
surface for the transition.
A passes the token string to B, the target window.
B calls xdg_activation_v1.activate with the token and B's surface.
The compositor looks up the rectangle associated with the token,
converts it to global coordinates using A's position, and plays
the open animation from that rectangle to B's geometry.
While B is alive, A may call set_geometry again on the rect
object to update the transition rectangle. The compositor uses
the latest set geometry when B is closed.
When B is closed, the compositor plays the close animation from
B's geometry back to the rectangle.
Once the compositor stops using the rectangle, it sends the
closed event on the rect object. A destroys the rect object
after receiving this event.
If A destroys the rect object before B is closed (or if A's
client disconnects, or if A is destroyed), the compositor falls
back to its default animation.
Timing and responsibilities:
The client must call xdg_activation_v1.activate on the target
surface before that surface is first mapped (i.e. before the
wl_surface.commit that causes the compositor to map it). This
ensures the compositor has the transition rectangle available when
the surface appears.
The terms "must", "must not", "should", and "may" in this document
are to be interpreted as described in RFC 2119.
Version 1
manager for window transition rectangles
This interface is a manager for creating window transition
rectangle objects. A window transition rectangle is attached to
an xdg-activation-v1 token string to request that the compositor
play a window transition from that rectangle when the token is
used to activate a new window, and back to that rectangle when
the window is closed.
Version 1
window transition rectangle
Represents a rectangle that the compositor uses as the
reference area for window open and close animations. The
rectangle coordinates are relative to the surface that was set
on the associated activation token via set_surface. The
compositor combines the surface's position with the rectangle
offset to determine the global animation area.
The object remains live: the client may call set_geometry again
to update the rectangle, and the compositor will use the latest
set geometry for the close animation when the target window is
closed.
When the client destroys this object (or the client
disconnects, or the originating surface is destroyed), the
compositor falls back to its default close animation for the
target window.
treeland_window_transition_rect_v1
enum error {
invalid_geometry = 0,
invalid_surface = 1,
}- invalid_geometry — the geometry cannot be handled by the compositor
- invalid_surface — the source surface cannot be used as a transition source
treeland_window_transition_rect_v1
request destroy()
Destructor
destroy the rectangle object
Destroying the rectangle object removes the animation
association. If the target window is still alive, the
compositor will use its default close animation when the
window is closed.
treeland_window_transition_rect_v1
request set_geometry(
x: int,
y: int,
width: int,
height: int,
)- x — x offset relative to the originating surface
- y — y offset relative to the originating surface
- width — rectangle width
- height — rectangle height
set the rectangle geometry
Sets the rectangle geometry, taking effect immediately. The
x and y coordinates are relative to the surface set on the
associated activation token via set_surface. This request
may be called multiple times to update the geometry.
A geometry with a positive width and a positive height is
guaranteed to be valid. A width and height of both 0 is
also guaranteed to be valid and temporarily disables the
rectangle. Otherwise might be rejected with the
invalid_geometry error.
treeland_window_transition_rect_v1
request set_source_surface(
surface: nullable object<wl_surface>,
)- surface — the live source surface, or null to clear it
set the live source surface used by the transition
Sets the surface whose content the compositor uses as the
source of the transition for this rectangle. The surface is
rendered live while the transition is playing; its content is
scaled into the rectangle set via set_geometry.
The surface must not already be in use for any other purpose,
and the compositor reserves it for use as a transition source
only: it is not displayed anywhere else, and the client must not
use it for any other purpose. A surface that has previously been
used as a transition source may be used again.
The client should keep the surface alive, and keep valid
content on it, while it is set as the source.
Passing null clears the source surface. The client may
replace the source by passing another surface; a previously
set surface is no longer used as a source. Destroying the
rect object or the surface itself also ends its use as a
source.
A surface that cannot be used as a source, for example one
that is already in use for another purpose, or that belongs to
another client, raises the invalid_surface error.
treeland_window_transition_rect_v1
event closed()
the rectangle is no longer usable
Sent when the compositor is done with this rectangle. The
client must destroy the rectangle object after receiving this
event.
This is a notification only. No further events are delivered
on this object after closed.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
window geometry and stacking control for Wine
This protocol provides privileged window management capabilities
required by Wine (the Windows API compatibility layer) that are not
available through standard Wayland protocols.
Standard xdg-shell intentionally prevents clients from setting their
own screen position or controlling z-order. Wine applications rely
heavily on absolute positioning (SetWindowPos, MoveWindow) and
stacking control (HWND_TOPMOST, HWND_TOP) to implement the Windows
window management model. This protocol bridges that gap by allowing
a trusted Wine client to request positioning and stacking changes
while leaving the compositor the final authority over actual
placement.
A client obtains a treeland_wine_window_control_v1 object for each
xdg_toplevel it wishes to manage. Requests on that object express
the client's desired geometry and stacking. The compositor applies
or adjusts them and reports the actual result through events.
A Wine session is the set of all treeland_wine_window_control_v1
objects created through the same treeland_wine_window_manager_v1
global binding. window_id values emitted by the window_id event are
unique and valid only within that set. The compositor must enforce
this boundary: a sibling_id supplied to set_z_order that refers to a
control object from a different manager binding must be treated as if
no matching sibling exists, causing hwnd_insert_after to have no
effect.
The key words "must", "must not", "should", "should not", and "may"
in this document are to be interpreted as described in IETF RFC 2119.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
global entry point for Wine window management
Lets a Wine client create per-toplevel control objects. The
compositor should restrict binding to trusted clients identified
by app_id or an equivalent policy mechanism.
The client must destroy all child
treeland_wine_window_control_v1 objects before destroying this
object.
treeland_wine_window_manager_v1
enum error {
toplevel_already_controlled = 0,
defunct_toplevel = 1,
}- toplevel_already_controlled — a control object already exists for the given toplevel
- defunct_toplevel — the xdg_toplevel has no associated role or has been destroyed
Version 1
per-toplevel position, size, and stacking control
Controls the screen geometry and stacking order for one
xdg_toplevel surface.
All coordinate values are in the compositor's global logical
coordinate space (the same space used by wl_output.geometry and
xdg_output.logical_position).
Position requests are not applied immediately. The
compositor processes them and reports the result via
configure_position. The client should treat the values in
configure_position as authoritative and update its internal
state accordingly.
If the associated xdg_toplevel is destroyed, this object becomes
inert. All subsequent requests are ignored and no further events
are emitted. The client should destroy the inert object.
Window size is managed through the standard xdg_toplevel
configure / xdg_surface.ack_configure mechanism. This interface
only controls screen position and stacking order.
treeland_wine_window_control_v1
enum z_order_op {
hwnd_top = 0,
hwnd_bottom = 1,
hwnd_topmost = 2,
hwnd_notopmost = 3,
hwnd_insert_after = 4,
}- hwnd_top — raise to top of current tier; no tier change (HWND_TOP)
- hwnd_bottom — lower to absolute bottom of Z-order; clears topmost (HWND_BOTTOM)
- hwnd_topmost — enter topmost tier at its top; sets WS_EX_TOPMOST (HWND_TOPMOST)
- hwnd_notopmost — leave topmost tier; raise to top of normal tier (HWND_NOTOPMOST)
- hwnd_insert_after — place directly below the sibling identified by sibling_id
Z-order operation matching Windows SetWindowPos hWndInsertAfter
Encodes the Windows SetWindowPos hWndInsertAfter parameter
directly. The first four values correspond to the four
special HWND constants. hwnd_insert_after requires a
non-zero sibling_id in set_z_order.
hwnd_topmost and hwnd_notopmost change WS_EX_TOPMOST tier
membership; the compositor must preserve the resulting tier
until explicitly changed. hwnd_bottom also clears topmost.
hwnd_top does not alter tier membership.
This is a superset of what the Wine X11 driver implements:
the X11 driver tracks only the topmost flag and a boolean
"raise to top", skipping HWND_BOTTOM and sibling-relative
ordering (see sync_window_position comment in winex11.drv).
This protocol implements all five Windows cases.
treeland_wine_window_control_v1
request set_position(
x: int,
y: int,
serial: uint,
)- x — desired x in global logical coordinates
- y — desired y in global logical coordinates
- serial — client-generated serial, starting from 1, incremented per request
request a new absolute screen position
Requests that the compositor place this window at the
specified position in the compositor's global logical
coordinate space.
The client must supply a non-zero serial that monotonically
increases with each request, starting from 1. The
compositor echoes this serial in the resulting
configure_position event so the client can correlate
responses to requests.
The requested position must fall within the bounds of an
active screen. If the compositor determines that
(x, y) is outside all screen regions, it rejects the
request and emits a configure_position event reporting the
current unchanged position.
Even for valid positions the compositor does not guarantee
exact placement: it may adjust the position to respect
window management rules or layer-shell exclusive zones.
The client must treat the values in the resulting
configure_position event as authoritative and update its
internal state accordingly.
Window size changes must use the standard xdg_toplevel
configure / xdg_surface.ack_configure flow and are outside
the scope of this protocol.
Corresponds to the position component of the Windows
SetWindowPos and MoveWindow APIs.
treeland_wine_window_control_v1
request set_z_order(
op: uint<z_order_op>,
sibling_id: uint,
)- op — Z-order operation
- sibling_id — window_id of the sibling for hwnd_insert_after; 0 for all other ops
request a Z-order change using Windows SetWindowPos semantics
Requests a Z-order change that directly encodes the Windows
SetWindowPos hWndInsertAfter parameter.
For ops hwnd_top, hwnd_bottom, hwnd_topmost, and
hwnd_notopmost, sibling_id must be 0; a non-zero value is
an invalid_sibling error.
For op hwnd_insert_after, sibling_id must be the window_id
of a control object in the same Wine session as emitted by
the window_id event on that control. The compositor places
this surface directly below the identified sibling in
Z-order. If sibling_id is 0 or does not identify a live
surface in the same session, the compositor must ignore the
request and leave the current Z-order unchanged.
hwnd_insert_after must not mix tiers: if the sibling is in
a different tier from this surface, the compositor must clamp
to hwnd_top within the appropriate tier.
The compositor reports the resulting stacking state via
configure_stacking.
Note: hwnd_top and hwnd_insert_after do not change tier
membership and therefore do not emit configure_stacking.
treeland_wine_window_control_v1
event window_id(
id: uint,
)- id — non-zero session-scoped window identifier
compositor-assigned session-scoped identifier
Emitted by the compositor immediately after this control
object is created, before any configure_position or
configure_stacking event.
The id is a non-zero uint32 that uniquely identifies this
toplevel within the current Wine session for the lifetime of
this control object.
The Wine driver must store this mapping (HWND to window_id)
in wineserver shared memory so that other Wine processes in
the same session can look up the sibling_id to use in
set_z_order requests.
treeland_wine_window_control_v1
event configure_position(
x: int,
y: int,
serial: uint,
)- x — actual x in global logical coordinates
- y — actual y in global logical coordinates
- serial — echoes the set_position serial, or 0 if not in response to a client request
compositor reports actual window position
Sent by the compositor to inform the client of the actual
window position in the compositor's global logical coordinate
space.
This event is emitted:
immediately after window_id on initial creation,
in response to set_position requests,
when the user or compositor moves the window.
The serial field echoes the serial from the set_position
request that caused this event. If the position change was
not initiated by a set_position request (e.g. initial
creation, user drag, or compositor policy), serial is 0.
Window size is communicated via the standard xdg_toplevel
configure event and is not reported here.
The client should use these coordinates to synchronize its
internal window state (e.g. update the wineserver window
rectangles with the correct screen origin).
treeland_wine_window_control_v1
event configure_stacking(
topmost: uint,
)- topmost — non-zero if the toplevel is in the topmost tier
compositor reports actual topmost tier state
Sent by the compositor to report whether this toplevel is
currently in the topmost tier (WS_EX_TOPMOST equivalent).
This event is emitted:
immediately after window_id and configure_position on
initial creation, to report the current tier state,
in response to set_z_order requests that change tier
membership (hwnd_topmost, hwnd_notopmost, hwnd_bottom),
when the compositor changes tiers on its own initiative.
Note: hwnd_top and hwnd_insert_after do not change tier
membership and therefore do not trigger this event.
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
window state query and control for Wine
This protocol provides window state management capabilities required
by Wine (the Windows API compatibility layer) that are not available
through standard Wayland protocols.
Standard xdg-shell lacks:
any way to read whether a toplevel is minimized,
any way to programmatically unminimize a toplevel,
any way to request activation without a valid xdg-activation token
originating from a prior user interaction,
any way to request a visual attention hint (taskbar flash) without
stealing focus.
This protocol fills those gaps. A client obtains a
treeland_wine_window_state_v1 object for each xdg_toplevel whose
state it needs to observe or control. The compositor remains the
final authority: every request is advisory, and the compositor
reports the authoritative state through events.
The key words "must", "must not", "should", "should not", and "may"
in this document are to be interpreted as described in IETF RFC 2119.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 1
global entry point for Wine window state control
Lets a Wine client create per-toplevel state objects. The
compositor should restrict binding to trusted clients identified
by app_id or an equivalent policy mechanism.
The client must destroy all child
treeland_wine_window_state_v1 objects before destroying this
object.
treeland_wine_window_state_manager_v1
enum error {
toplevel_already_bound = 0,
defunct_toplevel = 1,
}- toplevel_already_bound — a state object already exists for the given toplevel
- defunct_toplevel — the xdg_toplevel has no associated role or has been destroyed
Version 1
per-toplevel state observation and control
Observes and controls the lifecycle state for one xdg_toplevel
surface.
State flags are reported via the state_changed event. Each
flag corresponds to a Windows window state that xdg-shell does
not expose to clients.
If the associated xdg_toplevel is destroyed, this object
becomes inert. All subsequent requests are ignored and no
further events are emitted. The client should destroy the
inert object.
treeland_wine_window_state_v1
enum state {
minimized = 1,
attention = 2,
}This is a bitfield
- minimized — the toplevel is minimized (iconified)
- attention — the toplevel is requesting user attention (taskbar flash active)
window state flags
Bitfield of window states that the compositor tracks for
this toplevel. These supplement the states delivered by
xdg_toplevel.configure. Keyboard focus (activated) is
excluded because it is already delivered by xdg_toplevel;
duplicating it here would create two conflicting sources of
truth.
treeland_wine_window_state_v1
enum activate_reason {
user_request = 0,
programmatic = 1,
restore = 2,
}- user_request — the user explicitly asked to activate this window (e.g. taskbar click)
- programmatic — the application is activating itself (e.g. SetForegroundWindow without direct user gesture)
- restore — the window is being restored from a minimized or hidden state
reason for an activation request
Provides semantic context for an activate request so the
compositor can apply appropriate focus-stealing prevention
policy.
treeland_wine_window_state_v1
request unminimize()
request that the toplevel be unminimized
Requests that the compositor restore this toplevel from the
minimized state.
Standard xdg-shell provides xdg_toplevel.set_minimized but
no way to reverse it. This request fills that gap.
If the toplevel is not currently minimized, this request has
no effect. If the compositor honors the request, it emits a
state_changed event with the minimized flag cleared.
This corresponds to the Wine/Windows ShowWindow(SW_RESTORE)
call on a minimized window.
treeland_wine_window_state_v1
request activate(
serial: uint,
reason: uint<activate_reason>,
seat: object<wl_seat>,
)- serial — client-assigned serial for correlating with activate_denied
- reason — why the client is requesting activation
- seat — the seat on which to activate
request that the toplevel be activated
Requests that the compositor give keyboard focus to this
toplevel and raise it in the stacking order.
serial is a client-assigned value that is echoed back in
any activate_denied event for this request, allowing the
client to correlate denials when multiple activations are
in flight.
The reason argument informs the compositor about the context
of the activation. Compositors should generally honor
user_request and restore activations, and may choose to
deny or convert programmatic activations into attention
requests based on focus-stealing prevention policy.
If the compositor accepts the request, no activate_denied
event is sent. Acceptance does not guarantee immediate
keyboard focus: if another surface (e.g. a layer-shell
surface with exclusive keyboard interactivity) currently
holds focus, the compositor places this toplevel at the
head of the focus fallback queue and activates it once
the exclusive focus is released. The client will
observe the eventual focus grant through the normal
xdg_toplevel.configure activated state.
If the compositor denies the request, it emits an
activate_denied event carrying the same serial, and may
set the attention flag via state_changed.
Corresponds to the Wine/Windows SetForegroundWindow API.
Under X11, Wine sends a _NET_ACTIVE_WINDOW client message
with source indication; this request serves the same role
under Wayland.
treeland_wine_window_state_v1
request set_attention(
count: uint,
timeout_ms: uint,
)- count — number of flashes; 0 for indefinite
- timeout_ms — desired flash interval in milliseconds; 0 for default; forwarded as a hint only
request a user attention hint (taskbar flash)
Asks the compositor to signal that this toplevel needs user
attention in the taskbar or dock. This must not steal
keyboard focus.
The compositor forwards this hint to the taskbar via the
foreign toplevel manager protocol. Whether the taskbar
honors count and timeout_ms is implementation-defined and
not guaranteed by the compositor; clients must not rely on
exact flash behavior.
count specifies how many times to flash. 0 means flash
indefinitely until the window is activated, corresponding
to FLASHW_TIMER in the Windows FlashWindowEx API.
timeout_ms specifies the desired interval between flashes
in milliseconds. 0 requests the compositor or taskbar
default rate. This value is forwarded as a hint only.
Sending this request replaces any currently active
attention hint. To stop flashing, use clear_attention.
This request covers the taskbar/tray component
(FLASHW_TRAY) of the Windows FlashWindowEx API.
Title-bar caption flashing (FLASHW_CAPTION) is handled
by Wine's client-side decoration layer and is outside
the scope of this protocol.
Under X11, Wine sets _NET_WM_STATE_DEMANDS_ATTENTION;
this request serves the same role under Wayland.
treeland_wine_window_state_v1
request clear_attention()
cancel a user attention hint
Cancels any active attention hint set via set_attention.
If no hint is active, this request has no effect.
The compositor emits a state_changed event with the
attention flag cleared.
Corresponds to FlashWindowEx with FLASHW_STOP.
treeland_wine_window_state_v1
event activate_denied(
serial: uint,
)- serial — serial from the corresponding activate request
activation request was denied
Emitted when the compositor denies an activate request.
The serial matches the serial field of the activate request
that was denied.
The compositor may have set the attention flag via
state_changed instead. The client must not retry the
activation automatically.
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
XWayland window placement control for treeland
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
This protocol allows a privileged DDE client such as the dock or
shell to place XWayland windows on the compositor: moving an
XWayland window identified by its X11 window ID to a position
relative to another surface.
The compositor should reject bind attempts from non-privileged
clients.
The terms "must", "must not", "should", and "may" in this document
are to be interpreted as described in RFC 2119.
Version 1
XWayland window placement control
A global that exposes XWayland window placement actions to a
privileged DDE client.
The compositor should reject bind attempts from non-privileged
clients.
This interface is stateless: each request is an independent
one-shot action. The compositor does not send events on this
interface; set_xwindow_position_relative reports its result
through a per-request wl_callback.
treeland_xwindow_control_v1
request set_xwindow_position_relative(
callback: new_id<wl_callback>,
wid: uint,
anchor: object<wl_surface>,
dx: fixed,
dy: fixed,
)- callback — callback that receives the result
- wid — X11 window ID
- anchor — the reference surface
- dx — horizontal offset from the anchor top-left point
- dy — vertical offset from the anchor top-left point
move an XWayland window relative to a surface
Request that the compositor move the XWayland window
identified by the X11 window ID wid so that its top-left
point is placed at the anchor surface's top-left point
offset by (dx, dy).
Once the compositor has finished processing, it sends the
done event to the callback and destroys the callback. The
callback data is 0 when the move succeeded, and 1 when it
failed, for example because no XWayland window with the
given wid is currently mapped or the anchor surface is
invalid.
The compositor may apply the new position asynchronously.
Copyright
Copyright (C) 2013 DENSO CORPORATION
Copyright (c) 2013 BMW Car IT GmbH
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.
Version 1
application interface to surface in ivi compositor
ivi_surface
request destroy()
Destructor
destroy ivi_surface
This removes the link from ivi_id to wl_surface and destroys ivi_surface.
The ID, ivi_id, is free and can be used for surface_create again.
ivi_surface
event configure(
width: int,
height: int,
)suggest resize
The configure event asks the client to resize its surface.
The size is a hint, in the sense that the client is free to
ignore it if it doesn't resize, pick a smaller size (to
satisfy aspect ratio or resize in steps of NxM pixels).
The client is free to dismiss all but the last configure
event it received.
The width and height arguments specify the size of the window
in surface-local coordinates.
Version 1
create ivi-style surfaces
This interface is exposed as a global singleton.
This interface is implemented by servers that provide IVI-style user interfaces.
It allows clients to associate an ivi_surface with wl_surface.
ivi_application
enum error {
role = 0,
ivi_id = 1,
}- role — given wl_surface has another role
- ivi_id — given ivi_id is assigned to another wl_surface
ivi_application
request surface_create(
ivi_id: uint,
surface: object<wl_surface>,
id: new_id<ivi_surface>,
)create ivi_surface with numeric ID in ivi compositor
This request gives the wl_surface the role of an IVI Surface. Creating more than
one ivi_surface for a wl_surface is not allowed. Note, that this still allows the
following example:
create a wl_surface
create ivi_surface for the wl_surface
destroy the ivi_surface
create ivi_surface for the wl_surface (with the same or another ivi_id as before)
surface_create will create an interface:ivi_surface with numeric ID; ivi_id in
ivi compositor. These ivi_ids are defined as unique in the system to identify
it inside of ivi compositor. The ivi compositor implements business logic how to
set properties of the surface with ivi_id according to the status of the system.
E.g. a unique ID for Car Navigation application is used for implementing special
logic of the application about where it shall be located.
The server regards the following cases as protocol errors and disconnects the client.
If client destroys ivi_surface or wl_surface which is assigned to the ivi_surface,
ivi_id which is assigned to the ivi_surface is free for reuse.
Copyright
Copyright (C) 2013 DENSO CORPORATION
Copyright (c) 2013 BMW Car IT GmbH
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.
Version 1
set up and control IVI style UI
ivi_hmi_controller
request workspace_control(
seat: object<wl_seat>,
serial: uint,
)start controlling a surface by server
Reference protocol to control a surface by server.
To control a surface by server, it gives seat to the server
to e.g. control Home screen. Home screen has several workspaces
to group launchers of wayland application. These workspaces
are drawn on a horizontally long surface to be controlled
by motion of input device. E.g. A motion from right to left
happens, the viewport of surface is controlled in the ivi-shell
by using ivi-layout. client can recognizes the end of controlling
by event "workspace_end_control".
ivi_hmi_controller
request switch_mode(
layout_mode: uint,
)request mode switch of application layout
hmi-controller loaded to ivi-shall implements 4 types of layout
as a reference; tiling, side by side, full_screen, and random.
ivi_hmi_controller
request home(
home: uint,
)request displaying/undisplaying home screen
home screen is a reference implementation of launcher to launch
wayland applications. The home screen has several workspaces to
group wayland applications. By defining the following keys in
weston.ini, user can add launcher icon to launch a wayland application
to a workspace.
[ivi-launcher]
workspace-id=0
: id of workspace to add a launcher
icon-id=4001
: ivi id of ivi_surface to draw an icon
icon=/home/user/review/build-ivi-shell/data/icon_ivi_flower.png
: path to icon image
path=/home/user/review/build-ivi-shell/weston-dnd
: path to wayland application
Version 1
Copyright
Copyright 2016 The Chromium Authors.
Copyright 2018-2019 Collabora, Ltd.
Copyright © 2018-2019 Intel Corporation.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Protocol for providing secure output
This protocol specifies a set of interfaces used to provide
content-protection for e.g. HDCP, and protect surface contents on the
secured outputs and prevent from appearing in screenshots or from being
visible on non-secure outputs.
A secure-output is defined as an output that is secured by some
content-protection mechanism e.g. HDCP, and meets at least the minimum
required content-protection level requested by a client.
The term content-protection is defined in terms of HDCP type 0 and
HDCP type 1, but this may be extended in future.
This protocol is not intended for implementing Digital Rights Management on
general (e.g. Desktop) systems, and would only be useful for closed systems.
As the server is the one responsible for implementing
the content-protection, the client can only trust the content-protection as
much they can trust the server.
In order to protect the content and prevent surface contents from appearing
in screenshots or from being visible on non-secure outputs, a client must
first bind the global interface "weston_content_protection" which, if a
compositor supports secure output, is exposed by the registry.
Using the bound global object, the client uses the "get_protection" request
to instantiate an interface extension for a wl_surface object.
This extended interface will then allow surfaces to request for
content-protection, and also to censor the visibility of the surface on
non-secure outputs. Client applications should not wait for the protection
to change, as it might never change in case the content-protection cannot be
achieved. Alternatively, clients can use a timeout and start showing the
content in lower quality.
Censored visibility is defined as the compositor censoring the protected
content on non-secure outputs. Censoring may include artificially reducing
image quality or replacing the protected content completely with
placeholder graphics.
Censored visibility is controlled by protection mode, set by the client.
In "relax" mode, the compositor may show protected content on non-secure
outputs. It will be up to the client to adapt to secure and non-secure
presentation. In "enforce" mode, the compositor will censor the parts of
protected content that would otherwise show on non-secure outputs.
Version 1
Compositor Support
content protection global interface
The global interface weston_content_protection is used for exposing the
content protection capabilities to a client. It provides a way for clients
to request their wl_surface contents to not be displayed on an output
below their required level of content-protection.
Using this interface clients can request for a weston_protected_surface
which is an extension to the wl_surface to provide content-protection, and
set the censored-visibility on the non-secured-outputs.
weston_content_protection
request destroy()
Destructor
unbind from the content protection interface
Informs the server that the client will not be using this
protocol object anymore. This does not affect any other objects,
protected_surface objects included.
Version 1
- error
- type — content types
- destroy — remove security from the surface
- set_type — set the acceptable level of content protection
- enforce — enforce censored-visibility constrain
- relax — relax the censored-visibility constrain
- status — security status changed
content protection interface to a wl_surface
An additional interface to a wl_surface object, which allows a client to
request the minimum level of content-protection, request to change the
visibility of their contents, and receive notifications about changes in
content-protection.
A protected surface has a 'status' associated with it, that indicates
what type of protection it is currently providing, specified by
content-type. Updates to this status are sent to the client
via the 'status' event. Before the first status event is sent, the client
should assume that the status is 'unprotected'.
A client can request a content protection level to be the minimum for an
output to be considered secure, using the 'set_type' request.
It is responsibility of the client to monitor the actual
content-protection level achieved via the 'status' event, and make
decisions as to what content to show based on this.
The server should make its best effort to achieve the desired
content-protection level on all of the outputs the client's contents are
being displayed on. Any changes to the content protection status should be
reported to the client, even if they are below the requested
content-protection level. If the client's contents are being displayed on
multiple outputs, the lowest content protection level achieved should be
reported.
A client can also request that its content only be displayed on outputs
that are considered secure. The 'enforce/relax' requests can achieve this.
In enforce mode, the content is censored for non-secure outputs.
The implementation of censored-visibility is compositor-defined.
In relax mode there are no such limitation. On an attempt to show the
client on unsecured output, compositor would keep on showing the content
and send the 'status' event to the client. Client can take a call to
downgrade the content.
If the wl_surface associated with the protected_surface is destroyed,
the protected_surface becomes inert.
weston_protected_surface
enum type {
unprotected = 0,
hdcp_0 = 1,
hdcp_1 = 2,
}- unprotected — no protection required
- hdcp_0 — HDCP type 0
- hdcp_1 — HDCP type 1. This is a more secure than HDCP type 0.
content types
Description of a particular type of content protection.
A server may not necessarily support all of these types.
Note that there is no ordering between enum members unless specified.
Over time, different types of content protection may be added, which
may be considered less secure than what is already here.
weston_protected_surface
request destroy()
Destructor
remove security from the surface
If the protected_surface is destroyed, the wl_surface desired protection
level returns to unprotected, as if set_type request was sent with type
as 'unprotected'.
weston_protected_surface
request set_type(
type: uint<type>,
)- type — the desired type of content protection
set the acceptable level of content protection
Informs the server about the type of content. The level of
content-protection depends upon the content-type set by the client
through this request. Initially, this is set to 'unprotected'.
If the requested value is not a valid content_type enum value, the
'invalid_type' protocol error is raised. It is not an error to request
a valid protection type the compositor does not implement or cannot
achieve.
The requested content protection is double-buffered, see
wl_surface.commit.
weston_protected_surface
event status(
type: uint<type>,
)- type — the current content protection level
security status changed
This event is sent to the client to inform about the actual protection
level for its surface in the relax mode.
The 'type' argument indicates what that current level of content
protection that the server has currently established.
The 'status' event is first sent, when a weston_protected_surface is
created.
Until this event is sent for the first time, the client should assume
that its contents are not secure, and the type is 'unprotected'.
Possible reasons the content protection status can change is due to
change in censored-visibility mode from enforced to relaxed, a new
connector being added, movement of window to another output, or,
the client attaching a buffer too large for what the server may secure.
However, it is not limited to these reasons.
A client may want to listen to this event and lower the resolution of
their content until it can successfully be shown securely.
In case of "enforce" mode, the client will not get any status event.
If the mode is then changed to "relax", the client will receive the
status event.
Copyright
Copyright © 2017 Pekka Paalanen pq@iki.fi
Copyright © 2018 Zodiac Inflight Innovations
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.
Version 1
weston internal debugging
This is a generic debugging interface for Weston internals, the global
object advertized through wl_registry.
WARNING: This interface by design allows a denial-of-service attack. It
should not be offered in production, or proper authorization mechanisms
must be enforced.
The idea is for a client to provide a file descriptor that the server
uses for printing debug information. The server uses the file
descriptor in blocking writes mode, which exposes the denial-of-service
risk. The blocking mode is necessary to ensure all debug messages can
be easily printed in place. It also ensures message ordering if a
client subscribes to more than one debug stream.
The available debugging features depend on the server.
A debug stream can be one-shot where the server prints the requested
information and then closes it, or continuous where server keeps on
printing until the client stops it. Or anything in between.
weston_debug_v1
request destroy()
Destructor
destroy factory object
Destroys the factory object, but does not affect any other objects.
weston_debug_v1
event available(
name: string,
description: nullable string,
)- name — debug stream name
- description — human-readable description of the debug scope
advertise available debug scope
Advertises an available debug scope which the client may be able to
bind to. No information is provided by the server about the content
contained within the debug streams provided by the scope, once a
client has subscribed.
weston_debug_v1
request subscribe(
name: string,
streamfd: fd,
stream: new_id<weston_debug_stream_v1>,
)- name — debug stream name
- streamfd — write stream file descriptor
- stream — created debug stream object
subscribe to a debug stream
Subscribe to a named debug stream. The server will start printing
to the given file descriptor.
If the named debug stream is a one-shot dump, the server will send
weston_debug_stream_v1.complete event once all requested data has
been printed. Otherwise, the server will continue streaming debug
prints until the subscription object is destroyed.
If the debug stream name is unknown to the server, the server will
immediately respond with weston_debug_stream_v1.failure event.
Version 1
- destroy — close a debug stream
- complete — server completed the debug stream
- failure — server cannot continue the debug stream
A subscribed debug stream
Represents one subscribed debug stream, created with
weston_debug_v1.subscribe. When the object is created, it is associated
with a given file descriptor. The server will continue writing to the
file descriptor until the object is destroyed or the server sends an
event through the object.
weston_debug_stream_v1
request destroy()
Destructor
close a debug stream
Destroys the object, which causes the server to stop writing into
and closes the associated file descriptor if it was not closed
already.
Use a wl_display.sync if the clients needs to guarantee the file
descriptor is closed before continuing.
weston_debug_stream_v1
event complete()
server completed the debug stream
The server has successfully finished writing to and has closed the
associated file descriptor.
This event is delivered only for one-shot debug streams where the
server dumps some data and stop. This is never delivered for
continuous debbug streams because they by definition never complete.
weston_debug_stream_v1
event failure(
message: nullable string,
)- message — human readable reason
server cannot continue the debug stream
The server has stopped writing to and has closed the
associated file descriptor. The data already written to the file
descriptor is correct, but it may be truncated.
This event may be delivered at any time and for any kind of debug
stream. It may be due to a failure in or shutdown of the server.
The message argument may provide a hint of the reason.
Version 1
Compositor Support
create desktop widgets and helpers
Traditional user interfaces can rely on this interface to define the
foundations of typical desktops. Currently it's possible to set up
background, panels and locking surfaces.
weston_desktop_shell
request set_grab_surface(
surface: object<wl_surface>,
)set grab surface
The surface set by this request will receive a fake
pointer.enter event during grabs at position 0, 0 and is
expected to set an appropriate cursor image as described by
the grab_cursor event sent just before the enter event.
weston_desktop_shell
event prepare_lock_surface()
tell the client to create, set the lock surface
Tell the client we want it to create and set the lock surface, which is
a GUI asking the user to unlock the screen. The lock surface is
announced with 'set_lock_surface'. Whether or not the client actually
implements locking, it MUST send 'unlock' request to let the normal
desktop resume.
weston_desktop_shell
event grab_cursor(
cursor: uint,
)tell client what cursor to show during a grab
This event will be sent immediately before a fake enter event on the
grab surface.
weston_desktop_shell
enum cursor {
none = 0,
resize_top = 1,
resize_bottom = 2,
arrow = 3,
resize_left = 4,
resize_top_left = 5,
resize_bottom_left = 6,
move = 7,
resize_right = 8,
resize_top_right = 9,
resize_bottom_right = 10,
busy = 11,
}weston_desktop_shell
request desktop_ready()
desktop is ready to be shown
Tell the server, that enough desktop elements have been drawn
to make the desktop look ready for use. During start-up, the
server can wait for this request with a black screen before
starting to fade in the desktop, for instance. If the client
parts of a desktop take a long time to initialize, we avoid
showing temporary garbage.
weston_desktop_shell
request set_panel_position(
position: uint,
)set panel position
Tell the shell which side of the screen the panel is
located. This is so that new windows do not overlap the panel
and maximized windows maximize properly.
Version 1
interface for implementing screensavers
Only one client can bind this interface at a time.
Copyright
Copyright © 2019 Collabora Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
Compositor Support
weston direct display
Weston extension to instruct the compositor to avoid any import
of the dmabuf created by 'linux-dmabuf' protocol other than the display
controller.
Compositors are already going to use direct scan-out as much as possible but
there's no assurance that while doing so, they won't first import the dmabuf
in to the GPU. This extension assures the client that the compositor will
never attempt to import in to the GPU and pass it directly to the display
controller.
Clients can make use of this extension to pass the dmabuf buffer to the
display controller, potentially increasing the performance and lowering the
bandwidth usage.
Lastly, clients can make use of this extension in tandem with content-protection
one thus avoiding any GPU interaction and providing a secure-content path.
Also, in some cases, the memory where dmabuf are allocated are in specially
crafted memory zone which would be seen as an illegal memory access when the
GPU will attempt to read it.
WARNING: This interface by design might break screenshoting functionality
as compositing might be involved while doing that. Also, do note, that in
case the dmabufer provided can't be imported by KMS, the client connection
will be terminated.
WARNING: This extension requires 'linux-dmabuf' protocol and
'zwp_linux_buffer_params_v1' be already created by 'zwp_linux_buffer_v1'.
weston_direct_display_v1
enum error {
params_already_used = 0,
already_set = 1,
}Available since version 2
- params_already_used — dmabuf params already used
- already_set — already set
weston_direct_display_v1
request enable(
dmabuf: object<zwp_linux_buffer_params_v1>,
)- dmabuf — enable direct-display for dmabuf buffer
forward buffer to display controller
This request tells the compositor not to import the dmabuf to the GPU
in order to bypass it entirely, such that the buffer will be directly
scanned-out by the display controller. If HW is not capable/or there
aren't any available resources to directly scan-out the buffer, a
placeholder should be installed in-place by the compositor. The
compositor may perform checks on the dmabuf and refuse to create a
wl_buffer if the dmabuf seems unusable for being used directly.
Assumes that 'zwp_linux_buffer_params_v1' was already created
by 'zwp_linux_dmabuf_v1_create_params'.
Copyright
Copyright (C) 2026 Amazon.com, Inc. or its affiliates
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.
Version 1
protocol to clear content update constraints
A Wayland compositor may have a queue of content updates for a
wl_surface. Various protocol extensions may impose readiness
constraints on these updates, controlling when each update may
be applied: for example, FIFO ordering or target presentation
timestamps.
This protocol provides a way to "fast forward" through upcoming
updates in a mailbox fashion.
weston_fast_forward_manager_v1
enum error {
already_exists = 0,
}- already_exists — fast forward object already exists for this surface
fatal protocol error
These fatal protocol errors may be emitted in response to illegal
requests.
weston_fast_forward_manager_v1
request get_fast_forward(
id: new_id<weston_fast_forward_v1>,
surface: object<wl_surface>,
)request fast forward interface for surface
Create a fast_forward object that may be used to ignore content
updates on a specified surface.
Only one such object may exist for a surface and attempting to
create more than one will result in an already_exists protocol
error. If a surface is acted on by multiple software components,
general best practice is that only the component performing
wl_surface.attach operations should use this protocol.
Version 1
fast_forward interface
A fast_forward object to ignore content update constraints.
weston_fast_forward_v1
enum error {
surface_destroyed = 0,
}- surface_destroyed — the associated surface no longer exists
fatal error
These fatal protocol errors may be emitted in response to illegal
requests.
weston_fast_forward_v1
request destroy()
Destructor
destroy the fast_forward object
Informs the server that the client will no longer be using this
protocol object.
Surface state changes previously made by this protocol are
unaffected by this object's destruction.
weston_fast_forward_v1
request fast_forward()
fast forwards through upcoming constraints
Upon wl_surface.commit of a content update containing a fast forward
request, the compositor must immediately ignore all previously
committed constraints on that surface.
The content update containing the fast forward request also has
its constraints ignored. Normal constraint handling resumes for
subsequent commits.
surface_destroyed error will be emitted if associated surface no
longer exists.
"fast_forward" is double-buffered state, see wl_surface.commit.
Copyright
Copyright 2020, 2022 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 2
Compositor Support
image capture factory
The global interface exposing Weston screenshooting functionality
intended for single shots.
This is a privileged inteface.
weston_capture_v1
enum source {
writeback = 0,
framebuffer = 1,
full_framebuffer = 2,
blending = 3,
}- writeback — use hardware writeback
- framebuffer — copy from framebuffer, desktop area
- full_framebuffer — copy whole framebuffer, including borders
- blending — copy from blending space
weston_capture_v1
request create(
output: object<wl_output>,
source: uint<source>,
capture_source_new_id: new_id<weston_capture_source_v1>,
)- output — output to shoot
- source — pixel source
- capture_source_new_id — new object
create an object for capturing output images
This creates a weston_capture_source_v1 object corresponding to the
given wl_output. The object delivers information for allocating
suitable buffers, and exposes the capture function.
The object will be using the given pixel source for capturing images.
If the source is not available, all attempts to capture will fail
gracefully.
'writeback' source will use hardware writeback feature of DRM KMS for
capturing. This may allow hardware planes to remain used
during the capture. This source is often not available.
'framebuffer' source copies the contents of the final framebuffer.
Using this source temporarily disables all use of hardware planes and
DRM KMS color pipeline features. This source is always available.
'full_framebuffer' is otherwise the same as 'framebuffer' except it
will include also any borders (decorations) that the framebuffer may
contain.
'blending' source copies the contents of the intermediate blending
buffer, which should be in linear-light format. Using this source
temporarily disables all use of hardware planes. This source is only
available when a blending buffer exists, e.g. when color management
is active on the output.
If the pixel source is not one of the defined enumeration values,
'invalid_source' protocol error is raised.
Version 2
image capturing source
An object representing image capturing functionality for a single
source. When created, it sends the initial events if and only if the
output still exists and the specified pixel source is available on
the output.
weston_capture_source_v1
enum error {
bad_buffer = 0,
sequence = 1,
}- bad_buffer — the wl_buffer is not writable
- sequence — capture requested again before previous retired
weston_capture_source_v1
request destroy()
Destructor
cancel the capture, and destroy
If a capture is on-going on this object, this will cancel it and
make the image buffer contents undefined.
This object is destroyed.
weston_capture_source_v1
request capture(
buffer: object<wl_buffer>,
)- buffer — a writable image buffer
capture an image
If the given wl_buffer is compatible, the associated output will go
through a repaint some time after this request has been processed,
and that repaint will execute the capture.
Once the capture is complete, 'complete' event is emitted.
If the given wl_buffer is incompatible, the event 'retry' is
emitted.
If the capture fails or the buffer type is unsupported, the event
'failed' is emitted.
The client must wait for one of these events before attempting
'capture' on this object again. If 'capture' is requested again before
any of those events, 'sequence' protocol error is raised.
The wl_buffer object will not emit wl_buffer.release event due to
this request.
The wl_buffer must refer to compositor-writable storage. If buffer
storage is not writable, either the protocol error bad_buffer or
wl_shm.error.invalid_fd is raised.
If the wl_buffer is destroyed before any event is emitted, the buffer
contents become undefined.
A compositor is required to implement capture into wl_shm buffers.
Other buffer types may or may not be supported.
weston_capture_source_v1
event format(
drm_format: uint,
)- drm_format — DRM pixel format code
pixel format for a buffer
This event delivers one pixel format that can be used for the
image buffer. Any buffer is incompatible if it does not have
a pixel format delivered by one of this events.
The format modifier is linear (DRM_FORMAT_MOD_LINEAR).
This is an initial event, and sent whenever the supported formats
change.
This event may be send multiple times, followed by a format_done event.
weston_capture_source_v1
event size(
width: int,
height: int,
)- width — width in pixels
- height — height in pixels
dimensions for a buffer
This event delivers the size that should be used for the
image buffer. Any buffer is incompatible if it does not have
this size.
For wl_shm the row alignment of the buffer must be 4 bytes, and it must
not contain further row padding. Otherwise the buffer is unsupported.
This is an initial event, and sent whenever the required size
changes.
weston_capture_source_v1
event complete()
capture has completed
This event is emitted as a response to 'capture' request when it
has successfully completed.
If the buffer used in the shot is a dmabuf, the client also needs to
wait for any implicit fences on it before accessing the contents.
weston_capture_source_v1
event retry()
retry image capture with a different buffer
This event is emitted as a response to 'capture' request when it
cannot succeed due to an incompatible buffer. The client has already
received the events delivering the new buffer parameters. The client
should retry the capture with the new buffer parameters.
weston_capture_source_v1
event failed(
msg: nullable string,
)- msg — human-readable hint
capture failed
This event is emitted as a response to 'capture' request when it
has failed for reasons other than an incompatible buffer. The reasons
may include: unsupported buffer type, unsupported buffer stride,
unsupported image source, the image source (output) was removed, or
compositor policy denied the capture.
The string 'msg' may contain a human-readable explanation of the
failure to aid debugging.
Copyright
Copyright (C) 2026 Amazon.com, Inc. or its affiliates
Copyright © 2019 Collabora Ltd.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
weston restricted buffer
Weston extension to instruct the compositor that the dmabuf created by
'linux-dmabuf' protocol is in protected memory. Protected has hardware
level access restrictions, and if used improperly will result in
compositor crashes, hardware faults, or other manner of undefined
behaviour.
Restricted buffers may only be imported to the GPU if the GPU is using a
restricted context - otherwise if the buffer is to be rendered, it will
be censored (displayed as a solid color).
Outside of GPU restrictions, the compositor's policy dictates when
restricted buffers may be displayed.
This extension depends on the 'linux-dmabuf' protocol. After a
'zwp_linux_buffer_params_v1' object is created by 'zwp_linux_buffer_v1'
and before it is used to create a buffer, this extension's 'enable'
request may be used to indicate that the buffer is restricted.
weston_restricted_buffer_v1
enum error {
params_already_used = 0,
already_set = 1,
}- params_already_used — dmabuf params already used
- already_set — restricted already set
Copyright
Copyright © 2012 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Version 1
weston internal testing
Internal testing facilities for the weston compositor.
It can't be stressed enough that these should never ever be used
outside of running weston's tests. The weston-test.so module should
never be installed.
These requests may allow clients to do very bad things.
weston_test
enum error {
touch_up_with_coordinate = 0,
}- touch_up_with_coordinate — invalid coordinate
weston_test
request send_axis(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
axis: uint,
value: fixed,
)weston_test
request send_key(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
key: uint,
state: uint,
)weston_test
request send_touch(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
touch_id: int,
x: fixed,
y: fixed,
touch_type: uint,
)weston_test
enum breakpoint {
post_repaint = 0,
post_latch = 1,
immediate = 2,
}- post_repaint — after output repaint (filter type: wl_output)
- post_latch — after output latch (filter type: wl_output)
- immediate — immediately
weston_test
request client_break(
breakpoint: uint<breakpoint>,
resource_id: uint,
)- breakpoint — event type to wait for
- resource_id — optional Wayland resource ID to filter for (type-specific)
request compositor pause at a certain point
Request that the compositor pauses execution at a certain point. When
execution is paused, the compositor will signal the shared semaphore
to the client.
Version 1
weston internal testing
This is a global singleton interface for Weston internal tests.
This interface allows a test client to trigger compositor-side
test procedures. This is useful for cases, where the actual tests
are in compositor plugins, but they also require the presence of
a particular client.
This interface is implemented by the compositor plugins containing
the testing code.
A test client starts a test with the "run" request. It must not send
another "run" request until receiving the "finished" event. If the
compositor-side test succeeds, the "finished" event is sent. If the
compositor-side test fails, the compositor should send the protocol
error "test_failed", but it may also exit with an error (e.g. SEGV).
Unknown test name will raise "unknown_test" protocol error.
weston_test_runner
enum error {
test_failed = 0,
unknown_test = 1,
}- test_failed — compositor test failed
- unknown_test — unrecognized test name
Copyright
Copyright 2017-2018 Collabora, Ltd.
Copyright 2017-2018 General Electric Company
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.
Version 1
weston touchscreen calibration interface
This is the global interface for calibrating a touchscreen input
coordinate transformation. It is recommended to make this interface
privileged.
This interface can be used by a client to show a calibration pattern and
receive uncalibrated touch coordinates, facilitating the computation of
a calibration transformation that will align actual touch positions
on screen with their expected coordinates.
Immediately after being bound by a client, the compositor sends the
touch_device events.
The client chooses a touch device from the touch_device events, creates a
wl_surface and then a weston_touch_calibrator for the wl_surface and the
chosen touch device. The client waits for the compositor to send a
configure event before it starts drawing the first calibration pattern.
After receiving the configure event, the client will iterate drawing a
pattern, getting touch input via weston_touch_calibrator, and converting
pixel coordinates to expected touch coordinates with
weston_touch_calibrator.convert until it has enough correspondences to
compute the calibration transformation or the compositor cancels the
calibration.
Once the client has successfully computed a new calibration, it can use
weston_touch_calibration.save request to load the new calibration into
the compositor. The compositor may take this new calibration into use and
may write it into persistent storage.
weston_touch_calibration
enum error {
invalid_surface = 0,
invalid_device = 1,
already_exists = 2,
}- invalid_surface — the given wl_surface already has a role
- invalid_device — the given device is not valid
- already_exists — a calibrator has already been created
weston_touch_calibration
request destroy()
Destructor
unbind
Destroy the binding to the global interface, does not affect any
objects already created through this interface.
weston_touch_calibration
request create_calibrator(
surface: object<wl_surface>,
device: string,
cal: new_id<weston_touch_calibrator>,
)- surface — the surface to give the role to
- device — the touch device to calibrate
- cal — a new calibrator object
give the calibrator role to a surface
This gives the calibrator role to the surface and ties it with the
given touch input device.
If the surface already has a role, then invalid_surface error is raised.
If the device string is not one advertised with touch_device event's
device argument, then invalid_device error is raised.
If a weston_touch_calibrator protocol object exists in the compositor
already, then already_exists error is raised. This limitation is
compositor-wide and not specific to any particular client.
weston_touch_calibration
request save(
device: string,
matrix: array,
)- device — the target touch device
- matrix — the new calibration matrix
save calibration for a touch device
This request asks the compositor to save the calibration data for the
given touch input device. The compositor may ignore this request.
If the device string is not one advertised with touch_device event's
device argument, then invalid_device error is raised.
The array must contain exactly six 'float' (the 32-bit floating
point format used by the C language on the system) numbers. For a 3x3
calibration matrix in the form
@code
( a b c )
( d e f )
( 0 0 1 )
@endcode
the array must contain the values { a, b, c, d, e, f }. For the
definition of the coordinate spaces, see
libinput_device_config_calibration_set_matrix().
weston_touch_calibration
event touch_device(
device: string,
head: string,
)- device — the touch device identification
- head — name of the head or display connector
advertise a touchscreen input device
When a client binds to weston_touch_calibration, one touch_device event
is sent for each touchscreen that is available to be calibrated. This
is the only time the event is sent. Touch devices added in the
compositor will not generate events for existing
weston_touch_calibration objects.
An event carries the touch device identification and the associated
output or head (display connector) name.
On platforms using udev, the device identification is the udev sys
path. It is an absolute path and starts with the sys mount point.
Version 1
- error — calibrator object errors
- destroy — destroy the calibrator
- convert — convert from surface to raw coordinates
- configure — surface size
- cancel_calibration — cancel the calibration procedure
- invalid_touch — a user touch that cannot be used for calibration
- down — touch down event and beginning of a touch sequence
- up — end of a touch event sequence
- motion — update of touch point coordinates
- frame — end of touch frame event
- cancel — touch session cancelled
calibrator surface for a specific touch device
On creation, this object is tied to a specific touch device. The
compositor sends a configure event which the client must obey with the
associated wl_surface.
Once the client has committed content to the surface, the compositor can
grab the touch input device, prevent it from emitting normal touch
events, show the surface on the correct output, and relay input events
from the touch device via this protocol object.
Touch events from other touch devices than the one tied to this object
must generate wrong_touch events on at least touch-down and must not
generate normal or calibration touch events.
At any time, the compositor can choose to cancel the calibration
procedure by sending the cancel_calibration event. This should also be
used if the touch device disappears or anything else prevents the
calibration from continuing on the compositor side.
If the wl_surface is destroyed, the compositor must cancel the
calibration.
The touch event coordinates and conversion results are delivered in
calibration units. The calibration units cover the device coordinate
range exactly. Calibration units are in the closed interval [0.0, 1.0]
mapped into 32-bit unsigned integers. An integer can be converted into a
real value by dividing by 2^32-1. A calibration matrix must be computed
from the [0.0, 1.0] real values, but the matrix elements do not need to
fall into that range.
weston_touch_calibrator
enum error {
bad_size = 0,
not_mapped = 1,
bad_coordinates = 2,
}- bad_size — surface size does not match
- not_mapped — requested operation is not possible without mapping the surface
- bad_coordinates — surface-local coordinates are out of bounds
weston_touch_calibrator
request destroy()
Destructor
destroy the calibrator
This unmaps the surface if it was mapped. The input device grab
is dropped, if it was present. The surface loses its role as a
calibrator.
weston_touch_calibrator
request convert(
x: int,
y: int,
reply: new_id<weston_touch_coordinate>,
)- x — surface-local X coordinate
- y — surface-local Y coordinate
- reply — object delivering the result
convert from surface to raw coordinates
This request asks the compositor to convert the surface-local
coordinates into the expected touch input coordinates appropriate for
the associated touch device. The intention is that a client uses this
request to convert marker positions that the user is supposed to touch
during calibration.
If the compositor has cancelled the calibration, the conversion result
shall be zeroes and no errors will be raised.
The coordinates given as arguments to this request are relative to
the associated wl_surface.
If a client asks for conversion before it has committed valid
content to the wl_surface, the not_mapped error is raised.
If the coordinates x, y are outside of the wl_surface content, the
bad_coordinates error is raised.
weston_touch_calibrator
event configure(
width: int,
height: int,
)- width — surface width
- height — surface height
surface size
This event tells the client what size to make the surface. The client
must obey the size exactly on the next commit with a wl_buffer.
This event shall be sent once as a response to creating a
weston_touch_calibrator object.
weston_touch_calibrator
event cancel_calibration()
cancel the calibration procedure
This is sent when the compositor wants to cancel the calibration and
drop the touch device grab. The compositor unmaps the surface, if it
was mapped.
The weston_touch_calibrator object will not send any more events. The
client should destroy it.
weston_touch_calibrator
event invalid_touch()
a user touch that cannot be used for calibration
For whatever reason, a touch event resulting from a user action cannot
be used for calibration. The client should show feedback to the user
that the touch was rejected.
Possible causes for this event include the user touching a wrong
touchscreen when there are multiple ones present. This is particularly
useful when the touchscreens are cloned and there is no other way to
identify which screen the user should be touching.
Another cause could be a touch device that sends coordinates beyond its
declared range. If motion takes a touch point outside the range, the
compositor should also send 'cancel' event to undo the touch-down.
weston_touch_calibrator
event down(
time: uint,
id: int,
x: uint,
y: uint,
)- time — timestamp with millisecond granularity
- id — the unique ID of this touch point
- x — x coordinate in calibration units
- y — y coordinate in calibration units
touch down event and beginning of a touch sequence
A new touch point has appeared on the surface. This touch point is
assigned a unique ID. Future events from this touch point reference
this ID. The ID ceases to be valid after a touch up event and may be
reused in the future.
For the coordinate units, see weston_touch_calibrator.
weston_touch_calibrator
event up(
time: uint,
id: int,
)- time — timestamp with millisecond granularity
- id — the unique ID of this touch point
end of a touch event sequence
The touch point has disappeared. No further events will be sent for
this touch point and the touch point's ID is released and may be
reused in a future touch down event.
weston_touch_calibrator
event motion(
time: uint,
id: int,
x: uint,
y: uint,
)- time — timestamp with millisecond granularity
- id — the unique ID of this touch point
- x — x coordinate in calibration units
- y — y coordinate in calibration units
update of touch point coordinates
A touch point has changed coordinates.
For the coordinate units, see weston_touch_calibrator.
weston_touch_calibrator
event frame()
end of touch frame event
Indicates the end of a set of events that logically belong together.
A client is expected to accumulate the data in all events within the
frame before proceeding.
A wl_touch.frame terminates at least one event but otherwise no
guarantee is provided about the set of events within a frame. A client
must assume that any state not updated in a frame is unchanged from the
previously known state.
weston_touch_calibrator
event cancel()
touch session cancelled
Sent if the compositor decides the touch stream is a global
gesture. No further events are sent to the clients from that
particular gesture. Touch cancellation applies to all touch points
currently active on this client's surface. The client is
responsible for finalizing the touch points, future touch points on
this surface may reuse the touch point ID.
Version 1
- result — coordinates in raw touch space
coordinate conversion reply
Copyright
Copyright © 2018 Simon Ser
Copyright © 2019 Ivan Molodetskikh
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.
control data devices
This protocol allows a privileged client to control data devices. In
particular, the client will be able to manage the current selection and take
the role of a clipboard manager.
Warning! The protocol described in this file is 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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Note! This protocol is deprecated and not intended for production use.
For clipboard management, use the ext-data-control-v1 protocol.
Version 2
Compositor Support
Version 2cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
manager to control data devices
This interface is a manager that allows creating per-seat data device
controls.
zwlr_data_control_manager_v1
request destroy()
Destructor
destroy the manager
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
Version 2
manage a data device for a seat
This interface allows a client to manage a seat's selection.
When the seat is destroyed, this object becomes inert.
zwlr_data_control_device_v1
request set_selection(
source: nullable object<zwlr_data_control_source_v1>,
)copy data to the selection
This request asks the compositor to set the selection to the data from
the source on behalf of the client.
The given source may not be used in any further set_selection or
set_primary_selection requests. Attempting to use a previously used
source is a protocol error.
To unset the selection, set the source to NULL.
zwlr_data_control_device_v1
event data_offer(
id: new_id<zwlr_data_control_offer_v1>,
)introduce a new wlr_data_control_offer
The data_offer event introduces a new wlr_data_control_offer object,
which will subsequently be used in either the
wlr_data_control_device.selection event (for the regular clipboard
selections) or the wlr_data_control_device.primary_selection event (for
the primary clipboard selections). Immediately following the
wlr_data_control_device.data_offer event, the new data_offer object
will send out wlr_data_control_offer.offer events to describe the MIME
types it offers.
zwlr_data_control_device_v1
event selection(
id: nullable object<zwlr_data_control_offer_v1>,
)advertise new selection
The selection event is sent out to notify the client of a new
wlr_data_control_offer for the selection for this device. The
wlr_data_control_device.data_offer and the wlr_data_control_offer.offer
events are sent out immediately before this event to introduce the data
offer object. The selection event is sent to a client when a new
selection is set. The wlr_data_control_offer is valid until a new
wlr_data_control_offer or NULL is received. The client must destroy the
previous selection wlr_data_control_offer, if any, upon receiving this
event.
The first selection event is sent upon binding the
wlr_data_control_device object.
zwlr_data_control_device_v1
event primary_selection(
id: nullable object<zwlr_data_control_offer_v1>,
)Available since version 2
advertise new primary selection
The primary_selection event is sent out to notify the client of a new
wlr_data_control_offer for the primary selection for this device. The
wlr_data_control_device.data_offer and the wlr_data_control_offer.offer
events are sent out immediately before this event to introduce the data
offer object. The primary_selection event is sent to a client when a
new primary selection is set. The wlr_data_control_offer is valid until
a new wlr_data_control_offer or NULL is received. The client must
destroy the previous primary selection wlr_data_control_offer, if any,
upon receiving this event.
If the compositor supports primary selection, the first
primary_selection event is sent upon binding the
wlr_data_control_device object.
zwlr_data_control_device_v1
request set_primary_selection(
source: nullable object<zwlr_data_control_source_v1>,
)Available since version 2
copy data to the primary selection
This request asks the compositor to set the primary selection to the
data from the source on behalf of the client.
The given source may not be used in any further set_selection or
set_primary_selection requests. Attempting to use a previously used
source is a protocol error.
To unset the primary selection, set the source to NULL.
The compositor will ignore this request if it does not support primary
selection.
zwlr_data_control_device_v1
enum error {
used_source = 1,
}Available since version 2
- used_source — source given to set_selection or set_primary_selection was already used before
Version 1
offer to transfer data
The wlr_data_control_source object is the source side of a
wlr_data_control_offer. It is created by the source client in a data
transfer and provides a way to describe the offered data and a way to
respond to requests to transfer the data.
zwlr_data_control_source_v1
request offer(
mime_type: string,
)- mime_type — MIME type offered by the data source
add an offered MIME type
This request adds a MIME type to the set of MIME types advertised to
targets. Can be called several times to offer multiple types.
Calling this after wlr_data_control_device.set_selection is a protocol
error.
zwlr_data_control_source_v1
event send(
mime_type: string,
fd: fd,
)- mime_type — MIME type for the data
- fd — file descriptor for the data
send the data
Request for data from the client. Send the data as the specified MIME
type over the passed file descriptor, then close it.
zwlr_data_control_source_v1
event cancelled()
selection was cancelled
This data source is no longer valid. The data source has been replaced
by another data source.
The client should clean up and destroy this data source.
Version 1
- receive — request that the data is transferred
- destroy — destroy this offer
- offer — advertise offered MIME type
offer to transfer data
A wlr_data_control_offer represents a piece of data offered for transfer
by another client (the source client). The offer describes the different
MIME types that the data can be converted to and provides the mechanism
for transferring the data directly from the source client.
zwlr_data_control_offer_v1
request receive(
mime_type: string,
fd: fd,
)- mime_type — MIME type desired by receiver
- fd — file descriptor for data transfer
request that the data is transferred
To transfer the offered data, the client issues this request and
indicates the MIME type it wants to receive. The transfer happens
through the passed file descriptor (typically created with the pipe
system call). The source client writes the data in the MIME type
representation requested and then closes the file descriptor.
The receiving client reads from the read end of the pipe until EOF and
then closes its end, at which point the transfer is complete.
This request may happen multiple times for different MIME types.
zwlr_data_control_offer_v1
event offer(
mime_type: string,
)- mime_type — offered MIME type
advertise offered MIME type
Sent immediately after creating the wlr_data_control_offer object.
One event per offered MIME type.
Copyright
Copyright © 2018 Rostislav Pehlivanov
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.
a protocol for low overhead screen content capturing
An interface to capture surfaces in an efficient way by exporting DMA-BUFs.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Version 1
Compositor Support
Version 1cage 0.3.0
labwc 0.20.2
phoc 0.55
river 0.3.13
sway 1.11
wayfire 0.9.0
manager to inform clients and begin capturing
This object is a manager with which to start capturing from sources.
zwlr_export_dmabuf_manager_v1
request destroy()
Destructor
destroy the manager
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
Version 1
- flags — frame flags
- frame — a frame description
- object — an object description
- ready — indicates frame is available for reading
- cancel_reason — cancel reason
- cancel — indicates the frame is no longer valid
- destroy — delete this object, used or not
a DMA-BUF frame
This object represents a single DMA-BUF frame.
If the capture is successful, the compositor will first send a "frame"
event, followed by one or several "object". When the frame is available
for readout, the "ready" event is sent.
If the capture failed, the "cancel" event is sent. This can happen anytime
before the "ready" event.
Once either a "ready" or a "cancel" event is received, the client should
destroy the frame. Once an "object" event is received, the client is
responsible for closing the associated file descriptor.
All frames are read-only and may not be written into or altered.
zwlr_export_dmabuf_frame_v1
enum flags {
transient = 0x1,
}- transient — clients should copy frame before processing
frame flags
Special flags that should be respected by the client.
zwlr_export_dmabuf_frame_v1
event frame(
width: uint,
height: uint,
offset_x: uint,
offset_y: uint,
buffer_flags: uint,
flags: uint<flags>,
format: uint,
mod_high: uint,
mod_low: uint,
num_objects: uint,
)- width — frame width in pixels
- height — frame height in pixels
- offset_x — crop offset for the x axis
- offset_y — crop offset for the y axis
- buffer_flags — flags which indicate properties (invert, interlacing),
has the same values as zwp_linux_buffer_params_v1:flags
- flags — indicates special frame features
- format — format of the frame (DRM_FORMAT_*)
- mod_high — drm format modifier, high
- mod_low — drm format modifier, low
- num_objects — indicates how many objects (FDs) the frame has (max 4)
a frame description
Main event supplying the client with information about the frame. If the
capture didn't fail, this event is always emitted first before any other
events.
This event is followed by a number of "object" as specified by the
"num_objects" argument.
zwlr_export_dmabuf_frame_v1
event object(
index: uint,
fd: fd,
size: uint,
offset: uint,
stride: uint,
plane_index: uint,
)- index — index of the current object
- fd — fd of the current object
- size — size in bytes for the current object
- offset — starting point for the data in the object's fd
- stride — line size in bytes
- plane_index — index of the plane the data in the object applies to
an object description
Event which serves to supply the client with the file descriptors
containing the data for each object.
After receiving this event, the client must always close the file
descriptor as soon as they're done with it and even if the frame fails.
zwlr_export_dmabuf_frame_v1
event ready(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the seconds part of the timestamp
- tv_sec_lo — low 32 bits of the seconds part of the timestamp
- tv_nsec — nanoseconds part of the timestamp
indicates frame is available for reading
This event is sent as soon as the frame is presented, indicating it is
available for reading. This event includes the time at which
presentation happened at.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
each component being an unsigned 32-bit value. Whole seconds are in
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
and the additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999]. The seconds part
may have an arbitrary offset at start.
After receiving this event, the client should destroy this object.
zwlr_export_dmabuf_frame_v1
enum cancel_reason {
temporary = 0,
permanent = 1,
resizing = 2,
}- temporary — temporary error, source will produce more frames
- permanent — fatal error, source will not produce frames
- resizing — temporary error, source will produce more frames
cancel reason
Indicates reason for cancelling the frame.
zwlr_export_dmabuf_frame_v1
event cancel(
reason: uint<cancel_reason>,
)- reason — indicates a reason for cancelling this frame capture
indicates the frame is no longer valid
If the capture failed or if the frame is no longer valid after the
"frame" event has been emitted, this event will be used to inform the
client to scrap the frame.
If the failure is temporary, the client may capture again the same
source. If the failure is permanent, any further attempts to capture the
same source will fail again.
After receiving this event, the client should destroy this object.
zwlr_export_dmabuf_frame_v1
request destroy()
Destructor
delete this object, used or not
Unreferences the frame. This request must be called as soon as it's no
longer used.
It can be called at any time by the client. The client will still have
to close any FDs it has been given.
Copyright
Copyright © 2018 Ilia Bozhinov
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.
Version 3
- toplevel — a toplevel has been created
- stop — stop sending events
- finished — the compositor has finished with the toplevel manager
Compositor Support
Version 3cage 0.3.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
list and control opened apps
The purpose of this protocol is to enable the creation of taskbars
and docks by providing them with a list of opened applications and
letting them request certain actions on them, like maximizing, etc.
After a client binds the zwlr_foreign_toplevel_manager_v1, each opened
toplevel window will be sent via the toplevel event
zwlr_foreign_toplevel_manager_v1
request stop()
stop sending events
Indicates the client no longer wishes to receive events for new toplevels.
However the compositor may emit further toplevel_created events, until
the finished event is emitted.
The client must not send any more requests after this one.
zwlr_foreign_toplevel_manager_v1
event finished()
Destructor
the compositor has finished with the toplevel manager
This event indicates that the compositor is done sending events to the
zwlr_foreign_toplevel_manager_v1. The server will destroy the object
immediately after sending this request, so it will become invalid and
the client should free any resources associated with it.
Version 3
an opened toplevel
A zwlr_foreign_toplevel_handle_v1 object represents an opened toplevel
window. Each app may have multiple opened toplevels.
Each toplevel has a list of outputs it is visible on, conveyed to the
client with the output_enter and output_leave events.
zwlr_foreign_toplevel_handle_v1
event output_leave(
output: object<wl_output>,
)toplevel left an output
This event is emitted whenever the toplevel stops being visible on
the given output. It is guaranteed that an entered-output event
with the same output has been emitted before this event.
zwlr_foreign_toplevel_handle_v1
enum state {
maximized = 0,
minimized = 1,
activated = 2,
fullscreen = 3,
}types of states on the toplevel
The different states that a toplevel can have. These have the same meaning
as the states with the same names defined in xdg-toplevel
zwlr_foreign_toplevel_handle_v1
event state(
state: array,
)the toplevel state changed
This event is emitted immediately after the zlw_foreign_toplevel_handle_v1
is created and each time the toplevel state changes, either because of a
compositor action or because of a request in this protocol.
zwlr_foreign_toplevel_handle_v1
request set_rectangle(
surface: object<wl_surface>,
x: int,
y: int,
width: int,
height: int,
)the rectangle which represents the toplevel
The rectangle of the surface specified in this request corresponds to
the place where the app using this protocol represents the given toplevel.
It can be used by the compositor as a hint for some operations, e.g
minimizing. The client is however not required to set this, in which
case the compositor is free to decide some default value.
If the client specifies more than one rectangle, only the last one is
considered.
The dimensions are given in surface-local coordinates.
Setting width=height=0 removes the already-set rectangle.
zwlr_foreign_toplevel_handle_v1
request set_fullscreen(
output: nullable object<wl_output>,
)Available since version 2
request that the toplevel be fullscreened
Requests that the toplevel be fullscreened on the given output. If the
fullscreen state and/or the outputs the toplevel is visible on actually
change, this will be indicated by the state and output_enter/leave
events.
The output parameter is only a hint to the compositor. Also, if output
is NULL, the compositor should decide which output the toplevel will be
fullscreened on, if at all.
zwlr_foreign_toplevel_handle_v1
request unset_fullscreen()
Available since version 2
request that the toplevel be unfullscreened
Requests that the toplevel be unfullscreened. If the fullscreen state
actually changes, this will be indicated by the state event.
Copyright
Copyright © 2015 Giulio camuffo
Copyright © 2018 Simon Ser
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.
manage gamma tables of outputs
This protocol allows a privileged client to set the gamma tables for
outputs.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Version 1
Compositor Support
Version 1cage 0.3.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
manager to create per-output gamma controls
This interface is a manager that allows creating per-output gamma
controls.
zwlr_gamma_control_manager_v1
request destroy()
Destructor
destroy the manager
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
Version 1
adjust gamma tables for an output
This interface allows a client to adjust gamma tables for a particular
output.
The client will receive the gamma size, and will then be able to set gamma
tables. At any time the compositor can send a failed event indicating that
this object is no longer valid.
There can only be at most one gamma control object per output, which
has exclusive access to this particular output. When the gamma control
object is destroyed, the gamma table is restored to its original value.
zwlr_gamma_control_v1
event gamma_size(
size: uint,
)- size — number of elements in a ramp
size of gamma ramps
Advertise the size of each gamma ramp.
This event is sent immediately when the gamma control object is created.
zwlr_gamma_control_v1
request set_gamma(
fd: fd,
)- fd — gamma table file descriptor
set the gamma table
Set the gamma table. The file descriptor can be memory-mapped to provide
the raw gamma table, which contains successive gamma ramps for the red,
green and blue channels. Each gamma ramp is an array of 16-byte unsigned
integers which has the same length as the gamma size.
The file descriptor data must have the same length as three times the
gamma size.
zwlr_gamma_control_v1
event failed()
object no longer valid
This event indicates that the gamma control is no longer valid. This
can happen for a number of reasons, including:
The output doesn't support gamma tables
Setting the gamma tables failed
Another client already has exclusive gamma control for this output
The compositor has transferred gamma control to another client
Upon receiving this event, the client should destroy this object.
zwlr_gamma_control_v1
request destroy()
Destructor
destroy this control
Destroys the gamma control object. If the object is still valid, this
restores the original gamma tables.
Copyright
Copyright © 2018 Drew DeVault
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.
Version 1
inhibits input events to other clients
Clients can use this interface to prevent input events from being sent to
any surfaces but its own, which is useful for example in lock screen
software. It is assumed that access to this interface will be locked down
to whitelisted clients by the compositor.
Note! This protocol is deprecated and not intended for production use.
For screen lockers, use the ext-session-lock-v1 protocol.
Version 1
- destroy — destroy the input inhibitor object
inhibits input to other clients
While this resource exists, input to clients other than the owner of the
inhibitor resource will not receive input events. Any client which
previously had focus will receive a leave event and will not be given
focus again. The client that owns this resource will receive all input
events normally. The compositor will also disable all of its own input
processing (such as keyboard shortcuts) while the inhibitor is active.
The compositor may continue to send input events to selected clients,
such as an on-screen keyboard (via the input-method protocol).
Copyright
Copyright © 2017 Drew DeVault
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.
Version 5
Compositor Support
Version 5cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
kwin 6.7
louvre 2.14.1
niri 26.04
Version 4gamescope 3.15.14
labwc 0.20.2
mir 2.26
muffin 6.7.4
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
create surfaces that are layers of the desktop
Clients can use this interface to assign the surface_layer role to
wl_surfaces. Such surfaces are assigned to a "layer" of the output and
rendered with a defined z-depth respective to each other. They may also be
anchored to the edges and corners of a screen and specify input handling
semantics. This interface should be suitable for the implementation of
many desktop shell components, and a broad number of other applications
that interact with the desktop.
zwlr_layer_shell_v1
request get_layer_surface(
id: new_id<zwlr_layer_surface_v1>,
surface: object<wl_surface>,
output: nullable object<wl_output>,
layer: uint<layer>,
namespace: string,
)- layer — layer to add this surface to
- namespace — namespace for the layer surface
create a layer_surface from a surface
Create a layer surface for an existing surface. This assigns the role of
layer_surface, or raises a protocol error if another role is already
assigned.
Creating a layer surface from a wl_surface which has a buffer attached
or committed is a client error, and any attempts by a client to attach
or manipulate a buffer prior to the first layer_surface.configure call
must also be treated as errors.
After creating a layer_surface object and setting it up, the client
must perform an initial commit without any buffer attached.
The compositor will reply with a layer_surface.configure event.
The client must acknowledge it and is then allowed to attach a buffer
to map the surface.
You may pass NULL for output to allow the compositor to decide which
output to use. Generally this will be the one that the user most
recently interacted with.
Clients can specify a namespace that defines the purpose of the layer
surface.
zwlr_layer_shell_v1
enum error {
role = 0,
invalid_layer = 1,
already_constructed = 2,
}- role — wl_surface has another role
- invalid_layer — layer value is invalid
- already_constructed — wl_surface has a buffer attached or committed
zwlr_layer_shell_v1
enum layer {
background = 0,
bottom = 1,
top = 2,
overlay = 3,
}available layers for surfaces
These values indicate which layers a surface can be rendered in. They
are ordered by z depth, bottom-most first. Traditional shell surfaces
will typically be rendered between the bottom and top layers.
Fullscreen shell surfaces are typically rendered at the top layer.
Multiple surfaces can share a single layer, and ordering within a
single layer is undefined.
zwlr_layer_shell_v1
request destroy()
DestructorAvailable since version 3
destroy the layer_shell object
This request indicates that the client will not use the layer_shell
object any more. Objects that have been created through this instance
are not affected.
Version 5
layer metadata interface
An interface that may be implemented by a wl_surface, for surfaces that
are designed to be rendered as a layer of a stacked desktop-like
environment.
Layer surface state (layer, size, anchor, exclusive zone,
margin, interactivity) is double-buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
Attaching a null buffer to a layer surface unmaps it.
Unmapping a layer_surface means that the surface cannot be shown by the
compositor until it is explicitly mapped again. The layer_surface
returns to the state it had right after layer_shell.get_layer_surface.
The client can re-map the surface by performing a commit without any
buffer attached, waiting for a configure event and handling it as usual.
zwlr_layer_surface_v1
request set_size(
width: uint,
height: uint,
)sets the size of the surface
Sets the size of the surface in surface-local coordinates. The
compositor will display the surface centered with respect to its
anchors.
If you pass 0 for either value, the compositor will assign it and
inform you of the assignment in the configure event. You must set your
anchor to opposite edges in the dimensions you omit; not doing so is a
protocol error. Both values are 0 by default.
Size is double-buffered, see wl_surface.commit.
zwlr_layer_surface_v1
request set_anchor(
anchor: uint<anchor>,
)configures the anchor point of the surface
Requests that the compositor anchor the surface to the specified edges
and corners. If two orthogonal edges are specified (e.g. 'top' and
'left'), then the anchor point will be the intersection of the edges
(e.g. the top left corner of the output); otherwise the anchor point
will be centered on that edge, or in the center if none is specified.
Anchor is double-buffered, see wl_surface.commit.
zwlr_layer_surface_v1
request set_exclusive_zone(
zone: int,
)configures the exclusive geometry of this surface
Requests that the compositor avoids occluding an area with other
surfaces. The compositor's use of this information is
implementation-dependent - do not assume that this region will not
actually be occluded.
A positive value is only meaningful if the surface is anchored to one
edge or an edge and both perpendicular edges. If the surface is not
anchored, anchored to only two perpendicular edges (a corner), anchored
to only two parallel edges or anchored to all edges, a positive value
will be treated the same as zero.
A positive zone is the distance from the edge in surface-local
coordinates to consider exclusive.
Surfaces that do not wish to have an exclusive zone may instead specify
how they should interact with surfaces that do. If set to zero, the
surface indicates that it would like to be moved to avoid occluding
surfaces with a positive exclusive zone. If set to -1, the surface
indicates that it would not like to be moved to accommodate for other
surfaces, and the compositor should extend it all the way to the edges
it is anchored to.
For example, a panel might set its exclusive zone to 10, so that
maximized shell surfaces are not shown on top of it. A notification
might set its exclusive zone to 0, so that it is moved to avoid
occluding the panel, but shell surfaces are shown underneath it. A
wallpaper or lock screen might set their exclusive zone to -1, so that
they stretch below or over the panel.
The default value is 0.
Exclusive zone is double-buffered, see wl_surface.commit.
zwlr_layer_surface_v1
request set_margin(
top: int,
right: int,
bottom: int,
left: int,
)sets a margin from the anchor point
Requests that the surface be placed some distance away from the anchor
point on the output, in surface-local coordinates. Setting this value
for edges you are not anchored to has no effect.
The exclusive zone includes the margin.
Margin is double-buffered, see wl_surface.commit.
zwlr_layer_surface_v1
enum keyboard_interactivity {
none = 0,
exclusive = 1,
on_demand = 2,
}types of keyboard interaction possible for a layer shell surface
Types of keyboard interaction possible for layer shell surfaces. The
rationale for this is twofold: (1) some applications are not interested
in keyboard events and not allowing them to be focused can improve the
desktop experience; (2) some applications will want to take exclusive
keyboard focus.
zwlr_layer_surface_v1
request set_keyboard_interactivity(
keyboard_interactivity: uint<keyboard_interactivity>,
)requests keyboard events
Set how keyboard events are delivered to this surface. By default,
layer shell surfaces do not receive keyboard events; this request can
be used to change this.
This setting is inherited by child surfaces set by the get_popup
request.
Layer surfaces receive pointer, touch, and tablet events normally. If
you do not want to receive them, set the input region on your surface
to an empty region.
Keyboard interactivity is double-buffered, see wl_surface.commit.
assign this layer_surface as an xdg_popup parent
This assigns an xdg_popup's parent to this layer_surface. This popup
should have been created via xdg_surface::get_popup with the parent set
to NULL, and this request must be invoked before committing the popup's
initial state.
See the documentation of xdg_popup for more details about what an
xdg_popup is and how it is used.
zwlr_layer_surface_v1
request ack_configure(
serial: uint,
)- serial — the serial from the configure event
ack a configure event
When a configure event is received, if a client commits the
surface in response to the configure event, then the client
must make an ack_configure request sometime before the commit
request, passing along the serial of the configure event.
If the client receives multiple configure events before it
can respond to one, it only has to ack the last configure event.
A client is not required to commit immediately after sending
an ack_configure request - it may even ack_configure several times
before its next surface commit.
A client may send multiple ack_configure requests before committing, but
only the last request sent before a commit indicates which configure
event the client really is responding to.
zwlr_layer_surface_v1
event configure(
serial: uint,
width: uint,
height: uint,
)suggest a surface change
The configure event asks the client to resize its surface.
Clients should arrange their surface for the new states, and then send
an ack_configure request with the serial sent in this configure event at
some point before committing the new surface.
The client is free to dismiss all but the last configure event it
received.
The width and height arguments specify the size of the window in
surface-local coordinates.
The size is a hint, in the sense that the client is free to ignore it if
it doesn't resize, pick a smaller size (to satisfy aspect ratio or
resize in steps of NxM pixels). If the client picks a smaller size and
is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the
surface will be centered on this axis.
If the width or height arguments are zero, it means the client should
decide its own window dimension.
zwlr_layer_surface_v1
event closed()
surface should be closed
The closed event is sent by the compositor when the surface will no
longer be shown. The output may have been destroyed or the user may
have asked for it to be removed. Further changes to the surface will be
ignored. The client should destroy the resource after receiving this
event, and create a new surface if they so choose.
zwlr_layer_surface_v1
enum error {
invalid_surface_state = 0,
invalid_size = 1,
invalid_anchor = 2,
invalid_keyboard_interactivity = 3,
invalid_exclusive_edge = 4,
}- invalid_surface_state — provided surface state is invalid
- invalid_size — size is invalid
- invalid_anchor — anchor bitfield is invalid
- invalid_keyboard_interactivity — keyboard interactivity is invalid
- invalid_exclusive_edge — exclusive edge is invalid given the surface anchors
zwlr_layer_surface_v1
enum anchor {
top = 1,
bottom = 2,
left = 4,
right = 8,
}This is a bitfield
- top — the top edge of the anchor rectangle
- bottom — the bottom edge of the anchor rectangle
- left — the left edge of the anchor rectangle
- right — the right edge of the anchor rectangle
zwlr_layer_surface_v1
request set_exclusive_edge(
edge: uint<anchor>,
)Available since version 5
set the edge the exclusive zone will be applied to
Requests an edge for the exclusive zone to apply. The exclusive
edge will be automatically deduced from anchor points when possible,
but when the surface is anchored to a corner, it will be necessary
to set it explicitly to disambiguate, as it is not possible to deduce
which one of the two corner edges should be used.
The edge must be one the surface is anchored to, otherwise the
invalid_exclusive_edge protocol error will be raised.
Copyright
Copyright © 2019 Purism SPC
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
protocol to configure output devices
This protocol exposes interfaces to obtain and modify output device
configuration.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Version 4
- head — introduce a new head
- done — sent all information about current configuration
- create_configuration — create a new output configuration object
- stop — stop sending events
- finished — the compositor has finished with the manager
Compositor Support
Version 4cage 0.3.0
cosmic 1.0.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
output device configuration manager
This interface is a manager that allows reading and writing the current
output device configuration.
Output devices that display pixels (e.g. a physical monitor or a virtual
output in a window) are represented as heads. Heads cannot be created nor
destroyed by the client, but they can be enabled or disabled and their
properties can be changed. Each head may have one or more available modes.
Whenever a head appears (e.g. a monitor is plugged in), it will be
advertised via the head event. Immediately after the output manager is
bound, all current heads are advertised.
Whenever a head's properties change, the relevant wlr_output_head events
will be sent. Not all head properties will be sent: only properties that
have changed need to.
Whenever a head disappears (e.g. a monitor is unplugged), a
wlr_output_head.finished event will be sent.
After one or more heads appear, change or disappear, the done event will
be sent. It carries a serial which can be used in a create_configuration
request to update heads properties.
The information obtained from this protocol should only be used for output
configuration purposes. This protocol is not designed to be a generic
output property advertisement protocol for regular clients. Instead,
protocols such as xdg-output should be used.
zwlr_output_manager_v1
event head(
head: new_id<zwlr_output_head_v1>,
)introduce a new head
This event introduces a new head. This happens whenever a new head
appears (e.g. a monitor is plugged in) or after the output manager is
bound.
zwlr_output_manager_v1
event done(
serial: uint,
)- serial — current configuration serial
sent all information about current configuration
This event is sent after all information has been sent after binding to
the output manager object and after any subsequent changes. This applies
to child head and mode objects as well. In other words, this event is
sent whenever a head or mode is created or destroyed and whenever one of
their properties has been changed. Not all state is re-sent each time
the current configuration changes: only the actual changes are sent.
This allows changes to the output configuration to be seen as atomic,
even if they happen via multiple events.
A serial is sent to be used in a future create_configuration request.
zwlr_output_manager_v1
request stop()
stop sending events
Indicates the client no longer wishes to receive events for output
configuration changes. However the compositor may emit further events,
until the finished event is emitted.
The client must not send any more requests after this one.
zwlr_output_manager_v1
event finished()
Destructor
the compositor has finished with the manager
This event indicates that the compositor is done sending manager events.
The compositor will destroy the object immediately after sending this
event, so it will become invalid and the client should release any
resources associated with it.
Version 4
output device
A head is an output device. The difference between a wl_output object and
a head is that heads are advertised even if they are turned off. A head
object only advertises properties and cannot be used directly to change
them.
A head has some read-only properties: modes, name, description and
physical_size. These cannot be changed by clients.
Other properties can be updated via a wlr_output_configuration object.
Properties sent via this interface are applied atomically via the
wlr_output_manager.done event. No guarantees are made regarding the order
in which properties are sent.
zwlr_output_head_v1
event name(
name: string,
)head name
This event describes the head name.
The naming convention is compositor defined, but limited to alphanumeric
characters and dashes (-). Each name is unique among all wlr_output_head
objects, but if a wlr_output_head object is destroyed the same name may
be reused later. The names will also remain consistent across sessions
with the same hardware and software configuration.
Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
not assume that the name is a reflection of an underlying DRM
connector, X11 connection, etc.
If this head matches a wl_output, the wl_output.name event must report
the same name.
The name event is sent after a wlr_output_head object is created. This
event is only sent once per object, and the name does not change over
the lifetime of the wlr_output_head object.
zwlr_output_head_v1
event description(
description: string,
)head description
This event describes a human-readable description of the head.
The description is a UTF-8 string with no convention defined for its
contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
output via :1'. However, do not assume that the name is a reflection of
the make, model, serial of the underlying DRM connector or the display
name of the underlying X11 connection, etc.
If this head matches a wl_output, the wl_output.description event must
report the same name.
The description event is sent after a wlr_output_head object is created.
This event is only sent once per object, and the description does not
change over the lifetime of the wlr_output_head object.
zwlr_output_head_v1
event physical_size(
width: int,
height: int,
)- width — width in millimeters of the output
- height — height in millimeters of the output
head physical size
This event describes the physical size of the head. This event is only
sent if the head has a physical size (e.g. is not a projector or a
virtual device).
The physical size event is sent after a wlr_output_head object is created. This
event is only sent once per object, and the physical size does not change over
the lifetime of the wlr_output_head object.
zwlr_output_head_v1
event enabled(
enabled: int,
)- enabled — zero if disabled, non-zero if enabled
head is enabled or disabled
This event describes whether the head is enabled. A disabled head is not
mapped to a region of the global compositor space.
When a head is disabled, some properties (current_mode, position,
transform and scale) are irrelevant.
zwlr_output_head_v1
event position(
x: int,
y: int,
)- x — x position within the global compositor space
- y — y position within the global compositor space
current position
This events describes the position of the head in the global compositor
space. It is only sent if the output is enabled.
zwlr_output_head_v1
event scale(
scale: fixed,
)current scale
This events describes the scale of the head in the global compositor
space. It is only sent if the output is enabled.
zwlr_output_head_v1
event finished()
the head has disappeared
This event indicates that the head is no longer available. The head
object becomes inert. Clients should send a destroy request and release
any resources associated with it.
zwlr_output_head_v1
event make(
make: string,
)Available since version 2
head manufacturer
This event describes the manufacturer of the head.
Together with the model and serial_number events the purpose is to
allow clients to recognize heads from previous sessions and for example
load head-specific configurations back.
It is not guaranteed this event will be ever sent. A reason for that
can be that the compositor does not have information about the make of
the head or the definition of a make is not sensible in the current
setup, for example in a virtual session. Clients can still try to
identify the head by available information from other events but should
be aware that there is an increased risk of false positives.
If sent, the make event is sent after a wlr_output_head object is
created and only sent once per object. The make does not change over
the lifetime of the wlr_output_head object.
It is not recommended to display the make string in UI to users. For
that the string provided by the description event should be preferred.
zwlr_output_head_v1
event model(
model: string,
)Available since version 2
head model
This event describes the model of the head.
Together with the make and serial_number events the purpose is to
allow clients to recognize heads from previous sessions and for example
load head-specific configurations back.
It is not guaranteed this event will be ever sent. A reason for that
can be that the compositor does not have information about the model of
the head or the definition of a model is not sensible in the current
setup, for example in a virtual session. Clients can still try to
identify the head by available information from other events but should
be aware that there is an increased risk of false positives.
If sent, the model event is sent after a wlr_output_head object is
created and only sent once per object. The model does not change over
the lifetime of the wlr_output_head object.
It is not recommended to display the model string in UI to users. For
that the string provided by the description event should be preferred.
zwlr_output_head_v1
event serial_number(
serial_number: string,
)Available since version 2
head serial number
This event describes the serial number of the head.
Together with the make and model events the purpose is to allow clients
to recognize heads from previous sessions and for example load head-
specific configurations back.
It is not guaranteed this event will be ever sent. A reason for that
can be that the compositor does not have information about the serial
number of the head or the definition of a serial number is not sensible
in the current setup. Clients can still try to identify the head by
available information from other events but should be aware that there
is an increased risk of false positives.
If sent, the serial number event is sent after a wlr_output_head object
is created and only sent once per object. The serial number does not
change over the lifetime of the wlr_output_head object.
It is not recommended to display the serial_number string in UI to
users. For that the string provided by the description event should be
preferred.
zwlr_output_head_v1
request release()
DestructorAvailable since version 3
destroy the head object
This request indicates that the client will no longer use this head
object.
zwlr_output_head_v1
event adaptive_sync(
state: uint<adaptive_sync_state>,
)Available since version 4
current adaptive sync state
This event describes whether adaptive sync is currently enabled for
the head or not. Adaptive sync is also known as Variable Refresh
Rate or VRR.
Version 3
output mode
This object describes an output mode.
Some heads don't support output modes, in which case modes won't be
advertised.
Properties sent via this interface are applied atomically via the
wlr_output_manager.done event. No guarantees are made regarding the order
in which properties are sent.
zwlr_output_mode_v1
event size(
width: int,
height: int,
)- width — width of the mode in hardware units
- height — height of the mode in hardware units
mode size
This event describes the mode size. The size is given in physical
hardware units of the output device. This is not necessarily the same as
the output size in the global compositor space. For instance, the output
may be scaled or transformed.
zwlr_output_mode_v1
event refresh(
refresh: int,
)- refresh — vertical refresh rate in mHz
mode refresh rate
This event describes the mode's fixed vertical refresh rate. It is only
sent if the mode has a fixed refresh rate.
zwlr_output_mode_v1
event finished()
the mode has disappeared
This event indicates that the mode is no longer available. The mode
object becomes inert. Clients should send a destroy request and release
any resources associated with it.
zwlr_output_mode_v1
request release()
DestructorAvailable since version 3
destroy the mode object
This request indicates that the client will no longer use this mode
object.
Version 4
output configuration
This object is used by the client to describe a full output configuration.
First, the client needs to setup the output configuration. Each head can
be either enabled (and configured) or disabled. It is a protocol error to
send two enable_head or disable_head requests with the same head. It is a
protocol error to omit a head in a configuration.
Then, the client can apply or test the configuration. The compositor will
then reply with a succeeded, failed or cancelled event. Finally the client
should destroy the configuration object.
zwlr_output_configuration_v1
enum error {
already_configured_head = 1,
unconfigured_head = 2,
already_used = 3,
}- already_configured_head — head has been configured twice
- unconfigured_head — head has not been configured
- already_used — request sent after configuration has been applied or tested
zwlr_output_configuration_v1
request apply()
apply the configuration
Apply the new output configuration.
In case the configuration is successfully applied, there is no guarantee
that the new output state matches completely the requested
configuration. For instance, a compositor might round the scale if it
doesn't support fractional scaling.
After this request has been sent, the compositor must respond with an
succeeded, failed or cancelled event. Sending a request that isn't the
destructor is a protocol error.
zwlr_output_configuration_v1
request test()
test the configuration
Test the new output configuration. The configuration won't be applied,
but will only be validated.
Even if the compositor succeeds to test a configuration, applying it may
fail.
After this request has been sent, the compositor must respond with an
succeeded, failed or cancelled event. Sending a request that isn't the
destructor is a protocol error.
zwlr_output_configuration_v1
event succeeded()
configuration changes succeeded
Sent after the compositor has successfully applied the changes or
tested them.
Upon receiving this event, the client should destroy this object.
If the current configuration has changed, events to describe the changes
will be sent followed by a wlr_output_manager.done event.
zwlr_output_configuration_v1
event failed()
configuration changes failed
Sent if the compositor rejects the changes or failed to apply them. The
compositor should revert any changes made by the apply request that
triggered this event.
Upon receiving this event, the client should destroy this object.
zwlr_output_configuration_v1
event cancelled()
configuration has been cancelled
Sent if the compositor cancels the configuration because the state of an
output changed and the client has outdated information (e.g. after an
output has been hotplugged).
The client can create a new configuration with a newer serial and try
again.
Upon receiving this event, the client should destroy this object.
zwlr_output_configuration_v1
request destroy()
Destructor
destroy the output configuration
Using this request a client can tell the compositor that it is not going
to use the configuration object anymore. Any changes to the outputs
that have not been applied will be discarded.
This request also destroys wlr_output_configuration_head objects created
via this object.
Version 4
head configuration
This object is used by the client to update a single head's configuration.
It is a protocol error to set the same property twice.
zwlr_output_configuration_head_v1
request set_custom_mode(
width: int,
height: int,
refresh: int,
)- width — width of the mode in hardware units
- height — height of the mode in hardware units
- refresh — vertical refresh rate in mHz or zero
set a custom mode
This request assigns a custom mode to the head. The size is given in
physical hardware units of the output device. If set to zero, the
refresh rate is unspecified.
It is a protocol error to set both a mode and a custom mode.
zwlr_output_configuration_head_v1
request set_position(
x: int,
y: int,
)- x — x position in the global compositor space
- y — y position in the global compositor space
set the position
This request sets the head's position in the global compositor space.
Copyright
Copyright © 2019 Purism SPC
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.
Control power management modes of outputs
This protocol allows clients to control power management modes
of outputs that are currently part of the compositor space. The
intent is to allow special clients like desktop shells to power
down outputs when the system is idle.
To modify outputs not currently part of the compositor space see
wlr-output-management.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Version 1
Compositor Support
Version 1cosmic 1.0.0
hyprland 0.52.1
labwc 0.20.2
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
manager to create per-output power management
This interface is a manager that allows creating per-output power
management mode controls.
zwlr_output_power_manager_v1
request destroy()
Destructor
destroy the manager
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
Version 1
adjust power management mode for an output
This object offers requests to set the power management mode of
an output.
zwlr_output_power_v1
request set_mode(
mode: uint<mode>,
)- mode — the power save mode to set
Set an outputs power save mode
Set an output's power save mode to the given mode. The mode change
is effective immediately. If the output does not support the given
mode a failed event is sent.
zwlr_output_power_v1
event mode(
mode: uint<mode>,
)- mode — the output's new power management mode
Report a power management mode change
Report the power management mode change of an output.
The mode event is sent after an output changed its power
management mode. The reason can be a client using set_mode or the
compositor deciding to change an output's mode.
This event is also sent immediately when the object is created
so the client is informed about the current power management mode.
zwlr_output_power_v1
event failed()
object no longer valid
This event indicates that the output power management mode control
is no longer valid. This can happen for a number of reasons,
including:
Upon receiving this event, the client should destroy this object.
Copyright
Copyright © 2018 Simon Ser
Copyright © 2019 Andri Yngvason
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
screen content capturing on client buffers
This protocol allows clients to ask the compositor to copy part of the
screen content to a client buffer.
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 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
Note! This protocol is deprecated and not intended for production use.
The ext-image-copy-capture-v1 protocol should be used instead.
Version 3
Compositor Support
Version 3cage 0.3.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
louvre 2.14.1
mir 2.26
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
treeland 0.8.0
wayfire 0.9.0
manager to inform clients and begin capturing
This object is a manager which offers requests to start capturing from a
source.
zwlr_screencopy_manager_v1
request capture_output_region(
frame: new_id<zwlr_screencopy_frame_v1>,
overlay_cursor: int,
output: object<wl_output>,
x: int,
y: int,
width: int,
height: int,
)- overlay_cursor — composite cursor onto the frame
capture an output's region
Capture the next frame of an output's region.
The region is given in output logical coordinates, see
xdg_output.logical_size. The region will be clipped to the output's
extents.
zwlr_screencopy_manager_v1
request destroy()
Destructor
destroy the manager
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
Version 3
a frame ready for copy
This object represents a single frame.
When created, a series of buffer events will be sent, each representing a
supported buffer type. The "buffer_done" event is sent afterwards to
indicate that all supported buffer types have been enumerated. The client
will then be able to send a "copy" request. If the capture is successful,
the compositor will send a "flags" event followed by a "ready" event.
For objects version 2 or lower, wl_shm buffers are always supported, ie.
the "buffer" event is guaranteed to be sent.
If the capture failed, the "failed" event is sent. This can happen anytime
before the "ready" event.
Once either a "ready" or a "failed" event is received, the client should
destroy the frame.
zwlr_screencopy_frame_v1
event buffer(
format: uint<wl_shm.format>,
width: uint,
height: uint,
stride: uint,
)- format — buffer format
- width — buffer width
- height — buffer height
- stride — buffer stride
wl_shm buffer information
Provides information about wl_shm buffer parameters that need to be
used for this frame. This event is sent once after the frame is created
if wl_shm buffers are supported.
zwlr_screencopy_frame_v1
enum error {
already_used = 0,
invalid_buffer = 1,
}- already_used — the object has already been used to copy a wl_buffer
- invalid_buffer — buffer attributes are invalid
zwlr_screencopy_frame_v1
event ready(
tv_sec_hi: uint,
tv_sec_lo: uint,
tv_nsec: uint,
)- tv_sec_hi — high 32 bits of the seconds part of the timestamp
- tv_sec_lo — low 32 bits of the seconds part of the timestamp
- tv_nsec — nanoseconds part of the timestamp
indicates frame is available for reading
Called as soon as the frame is copied, indicating it is available
for reading. This event includes the time at which the presentation took place.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
each component being an unsigned 32-bit value. Whole seconds are in
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
and the additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999]. The seconds part
may have an arbitrary offset at start.
After receiving this event, the client should destroy the object.
zwlr_screencopy_frame_v1
event failed()
frame copy failed
This event indicates that the attempted frame copy has failed.
After receiving this event, the client should destroy the object.
zwlr_screencopy_frame_v1
event damage(
x: uint,
y: uint,
width: uint,
height: uint,
)Available since version 2
- x — damaged x coordinates
- y — damaged y coordinates
- width — current width
- height — current height
carries the coordinates of the damaged region
This event is sent right before the ready event when copy_with_damage is
requested. It may be generated multiple times for each copy_with_damage
request.
The arguments describe a box around an area that has changed since the
last copy request that was derived from the current screencopy manager
instance.
The union of all regions received between the call to copy_with_damage
and a ready event is the total damage since the prior ready event.
zwlr_screencopy_frame_v1
event linux_dmabuf(
format: uint,
width: uint,
height: uint,
)Available since version 3
- format — fourcc pixel format
- width — buffer width
- height — buffer height
linux-dmabuf buffer information
Provides information about linux-dmabuf buffer parameters that need to
be used for this frame. This event is sent once after the frame is
created if linux-dmabuf buffers are supported.
zwlr_screencopy_frame_v1
event buffer_done()
Available since version 3
all buffer types reported
This event is sent once after all buffer events have been sent.
The client should proceed to create a buffer of one of the supported
types, and send a "copy" request.
Copyright
Copyright © 2019 Josef Gajdusek
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.
Version 2
virtual pointer
This protocol allows clients to emulate a physical pointer device. The
requests are mostly mirror opposites of those specified in wl_pointer.
zwlr_virtual_pointer_v1
enum error {
invalid_axis = 0,
invalid_axis_source = 1,
}- invalid_axis — client sent invalid axis enumeration value
- invalid_axis_source — client sent invalid axis source enumeration value
zwlr_virtual_pointer_v1
request motion(
time: uint,
dx: fixed,
dy: fixed,
)- time — timestamp with millisecond granularity
- dx — displacement on the x-axis
- dy — displacement on the y-axis
pointer relative motion event
The pointer has moved by a relative amount to the previous request.
Values are in the global compositor space.
zwlr_virtual_pointer_v1
request motion_absolute(
time: uint,
x: uint,
y: uint,
x_extent: uint,
y_extent: uint,
)- time — timestamp with millisecond granularity
- x — position on the x-axis
- y — position on the y-axis
- x_extent — extent of the x-axis
- y_extent — extent of the y-axis
pointer absolute motion event
The pointer has moved in an absolute coordinate frame.
Value of x can range from 0 to x_extent, value of y can range from 0
to y_extent.
zwlr_virtual_pointer_v1
request button(
time: uint,
button: uint,
state: uint<wl_pointer.button_state>,
)- time — timestamp with millisecond granularity
- button — button that produced the event
- state — physical state of the button
button event
A button was pressed or released.
zwlr_virtual_pointer_v1
request axis(
time: uint,
axis: uint<wl_pointer.axis>,
value: fixed,
)- time — timestamp with millisecond granularity
- axis — axis type
- value — length of vector in touchpad coordinates
axis event
Scroll and other axis requests.
zwlr_virtual_pointer_v1
request axis_discrete(
time: uint,
axis: uint<wl_pointer.axis>,
value: fixed,
discrete: int,
)- time — timestamp with millisecond granularity
- axis — axis type
- value — length of vector in touchpad coordinates
- discrete — number of steps
axis click event
Discrete step information for scroll and other axes.
This event allows the client to extend data normally sent using the axis
event with discrete value.
Version 2
Compositor Support
Version 2cage 0.3.0
hyprland 0.52.1
jay 1.14.0
labwc 0.20.2
mir 2.26
niri 26.04
phoc 0.55
river 0.3.13
sway 1.11
wayfire 0.9.0
virtual pointer manager
This object allows clients to create individual virtual pointer objects.