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

Commit 34b5e3b

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, allowing frame perfection to be maintained.
1 parent 16a2888 commit 34b5e3b

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

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

Lines changed: 36 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="3">
28+
<interface name="zwlr_layer_shell_v1" version="4">
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
@@ -92,9 +92,43 @@
9292
are not affected.
9393
</description>
9494
</request>
95+
96+
<!-- Version 4 additions -->
97+
98+
<event name="new_output" since="4">
99+
<description summary="notify of a new wl_output">
100+
This event indicates that one or more new outputs have been
101+
created. All clients must send an ack_new_output request in response
102+
to this event. If a client wishes to create a new layer surface in
103+
response to the new output(s), it must make an ack_new_output request
104+
with the provided serial after creating any new layer surfaces using
105+
the get_layer_surface request and before the first commit on any of
106+
the new surfaces. If the client does not wish to create a new layer
107+
surface, it should ack immediately.
108+
109+
This allows the compositor to wait until new layer surfaces are ready
110+
before rendering the first frame of new outputs, avoiding a race that
111+
could cause imperfect frames.
112+
</description>
113+
<arg name="serial" type="uint"/>
114+
</event>
115+
116+
<request name="ack_new_output" since="4">
117+
<description summary="ack a new_output event">
118+
This request informs the server that the client has created all
119+
layer surfaces it intends to create in response to the new output(s).
120+
These new layer surfaces are associated only with this ack sequence
121+
and do *not* carry over to following ack sequences should any occur
122+
before the first commit on the surfaces.
123+
124+
If the client receives multiple new_output events before it
125+
can respond to one, it only has to ack the last new_output event.
126+
</description>
127+
<arg name="serial" type="uint" summary="serial from a new_output event"/>
128+
</request>
95129
</interface>
96130

97-
<interface name="zwlr_layer_surface_v1" version="3">
131+
<interface name="zwlr_layer_surface_v1" version="4">
98132
<description summary="layer metadata interface">
99133
An interface that may be implemented by a wl_surface, for surfaces that
100134
are designed to be rendered as a layer of a stacked desktop-like

0 commit comments

Comments
 (0)