Skip to content

backend-wayland: don't wait for one frame when starting the repaint loop

Michael Olbrich requested to merge mol/weston:wayland into main

The repaint loop is started when a client provides a new frame while the compositor is idle. This frame should be shown as soon as possible. So it makes no sense to commit the previous frame one more time before rendering the next frame.

Just call weston_output_finish_frame() directly to start repainting immediately.

As a side effect, this fixes an issue when the output is resized when no fullscreen shell is involved: At that point, parent.draw_initial_frame is already false, so draw_initial_frame() is not called. But when resizing, the old buffers are removed so the commit happens without a buffer attached to the surface. So the surface is invisible for one frame until the next one is rendered.

draw_initial_frame() is not removed here, because it is still needed for the synchronous resize that happens with the fullscreen shell.

Merge request reports