xx-cutouts-v1: Extend protocol for layer surfaces

Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
Guido Günther 2026-03-02 22:44:23 +01:00
parent b1f15f8dbf
commit fee4e812e4

View file

@ -42,9 +42,8 @@
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.
The protocol currently supports xdg_toplevel surfaces and
ext_layer_shell surfaces.
Warning! The protocol described in this file is experimental and
backward incompatible changes may be made. Backward compatible
@ -53,7 +52,7 @@
creating a new major version of the extension.
</description>
<interface name="xx_cutouts_manager_v1" version="1">
<interface name="xx_cutouts_manager_v1" version="2">
<description summary="Display cutouts area manager">
This interface allows a compositor to announce support for
supplying cutout information to the client.
@ -75,11 +74,11 @@
</request>
<request name="get_cutouts">
<description summary="create a cutout notifier from a xdg toplevel">
This creates a new xx_cutouts object for the given
surface. The role of the surface must be xdg_toplevel
otherwise an invalid_role protocol error will be raised. Later
versions of this protocol might allow for other surface roles.
<description summary="create a cutout notifier from a xdg toplevel or layer surface">
This creates a new xx_cutouts object for the given surface. The role of
the surface must be xdg_toplevel or ext_layer_surface_v1 otherwise an
invalid_role protocol error will be raised. Later versions of this
protocol might allow for other surface roles.
</description>
<arg name="id" type="new_id" interface="xx_cutouts_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
@ -87,7 +86,7 @@
</interface>
<interface name="xx_cutouts_v1" version="1">
<interface name="xx_cutouts_v1" version="2">
<description summary="cutout regions information">
An xx_cutouts describes the areas currently "cut out" of a
toplevel.
@ -104,11 +103,14 @@
Typically compositors would only send cutout information when
the toplevel enters fullscreen or maxmized state (as specified
in the xdg_shell protocol).
in the xdg_shell protocol). For layer surfaces the compositor
typically always sends cutout information as layer surfaces
are often anchored to screen edges and usually aren't moved
by the user.
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.
underlying xdg_toplevel or ext_layer_surface_v1 and wl_surface.
Otherwise the defunct_cutouts_object protocol error will be send.
</description>
<enum name="type">
@ -202,6 +204,13 @@
xdg_surface.ack_configure in the xdg_shell protocol for
details.
In the case of a ext_layer_surface_v1 clients should arrange their
surface for the new cutouts, and then send an
ext_layer_surface_v1.ack_configure request at some point before
committing the new surface. See ext_layer_surface_v1.configure and
ext_layer_surface_v1.ack_configure in the ext_layer_shell_v1
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.