platforms/wayland: Delay setup until first configure
As per the xdg-shell specification, the compositor can only attach a wl_buffer to an xdg_surface once the compositor has sent an xdg_surface.configure event. Previously, there was a race condition in which WaylandOutput objects were added/enabled on creation, making it possible for the EglWaylandOutputs to be set up and for EglWaylandBackend to draw a frame (thereby attaching a buffer), all before the xdg_surface.configure configure event was received. Compositors other than kwin would then send an unconfigured buffer error and close the connection. This commit avoids the problem by not marking the WaylandBackend ready for use until all the output surfaces constructed at startup have received their initial configure event. (In practice, this takes one additional roundtrip.)
parent
1bf901cf
Please register or sign in to comment