Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 032cbfe

Browse files
committed
layer-shell: introduce ack for new outputs
This ack sequence eliminates the race between a client creating a new layer surface and the compositor rendering the first frame of a new output.
1 parent 06062c6 commit 032cbfe

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

unstable/wlr-layer-shell-unstable-v1.xml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
THIS SOFTWARE.
2626
</copyright>
2727

28-
<interface name="zwlr_layer_shell_v1" version="2">
28+
<interface name="zwlr_layer_shell_v1" version="3">
2929
<description summary="create surfaces that are layers of the desktop">
3030
Clients can use this interface to assign the surface_layer role to
3131
wl_surfaces. Such surfaces are assigned to a "layer" of the output and
@@ -82,9 +82,37 @@
8282
<entry name="top" value="2"/>
8383
<entry name="overlay" value="3"/>
8484
</enum>
85+
86+
<!-- Version 3 additions -->
87+
88+
<event name="new_output" since="3">
89+
<description summary="notify of a new wl_output">
90+
This event indicates that a new output has been created. If the client
91+
wishes to create a new layer surface in response to this new output,
92+
it must make an ack_new_output request with the provided serial
93+
after creating any new layer surfaces using the get_layer_surface
94+
request and before the first commit on any of the new surfaces.
95+
96+
This allows the compositor to wait until new layer surfaces are ready
97+
before rendering the first frame of the output.
98+
</description>
99+
<arg name="serial" type="uint"/>
100+
</event>
101+
102+
<request name="ack_new_output" since="3">
103+
<description summary="ack a new_output event">
104+
This request informs the server that following commits on layer surfaces
105+
created by the client take the new output into account.
106+
107+
A client may make multiple ack_new_output requests before committing.
108+
The last request made before the commit indicates which new_output
109+
event the commit is in response to.
110+
</description>
111+
<arg name="serial" type="uint" summary="serial from a new_output event"/>
112+
</request>
85113
</interface>
86114

87-
<interface name="zwlr_layer_surface_v1" version="2">
115+
<interface name="zwlr_layer_surface_v1" version="3">
88116
<description summary="layer metadata interface">
89117
An interface that may be implemented by a wl_surface, for surfaces that
90118
are designed to be rendered as a layer of a stacked desktop-like

0 commit comments

Comments
 (0)