Skip to content

Client: Announce an output after receiving more complete state

Bhushan Shah requested to merge bshah/qtwayland:work/output-bug-fix into kde/5.15

Output initialization is not atomic, meaning that the compositor may process a wl_output bind request in one event loop cycle, and the xdg_output_manager.get_xdg_output in another event loop cycle.

This means that xdg_output properties may arrive in another wl_output done frame. Prior to xdg-output v3, that wasn't an issue because the compositor is required to send an xdg_output.done event after sending xdg_output properties.

Starting with v3, the compositor may choose not to send an xdg_output.done event after sending xdg_output properties. Therefore, as is, QtWayland may announce an output with bad logical geometry or even worse without name assigned by the compositor.

Unfortunately, that breaks applications such as plasmashell. Plasma uses output names as a criterion to determine what kind of contents should be displayed on a particular output.

In order to fix the initialization sequence, this change makes every QWaylandScreen track processed events. After all required events have been received, the screen can be announced to the rest of Qt.

Change-Id: If5da747edd7af277ec1364cbea105c6994f47402

Reviewed-by: David Edmundson davidedmundson@kde.org

(cherry picked from commit 69ea480f)

Original Ticket: https://codereview.qt-project.org/c/qt/qtwayland/+/347774

CCBUG: 435124

Merge request reports