Skip to content

xwayland: Make sure output is suitable for fullscreen

Since commit d370f1e5, Xwayland can optionally be started rootful and fullscreen.

To do so, it will setup a viewport to scale the root window to match the size of the output.

However, if the rootful Xwayland window receives an xdg-surface configure event before the output definition is complete, as with e.g. the labwc Wayland compositor, we might end up trying to setup a viewport with a destination size of 0x0 which is a protocol violation, and that kills Xwayland.

To avoid that issue, only setup the viewport if the output size is meaningful.

Also, please note that once the output definition is complete, i.e. when the "done" event is eventually received, we shall recompute the size for fullscreen again, hence achieving the desired fullscreen state.

Fixes: d370f1e5 - xwayland: add fullscreen mode for rootful
Closes: #1717 (closed)
Signed-off-by: Olivier Fourdan ofourdan@redhat.com

Edited by Olivier Fourdan

Merge request reports