Skip to content

xwayland: Add an option to enable portal support

With EI support wired to XTEST, and oeffis being enabled unconditionally means that Xwayland will always go through the XDG portal for XTEST when supported.

While this the intended behavior for the general use case of Xwayland running rootless on a desktop compositor, that breaks when Xwayland is running on a nested compositor, because the portal is for the entire session and not limited to the nested Wayland compositor.

Xwayland itself, as a regular Wayland client, has no way to tell that it is running on a nested compositor.

So to keep backward compatibility with existing (and also common) use cases such as nested compositors, best is to disable support for the XDG portal by default, and add a new command line option "-enable-portal" for the Wayland compositors (who spawn Xwayland rootless) to explicitly enable support for XDG portal in Xwayland.

A Wayland compositor running nested should not use that command line option with Xwayland.

Signed-off-by: Olivier Fourdan ofourdan@redhat.com
Fixes: a1333342 - xwayland: Add XTEST support using EIS
Closes: #1586 (closed)
See-also: https://gitlab.gnome.org/GNOME/mutter/-/issues/3047

/cc @whot @JoshuaAshton

Edited by Olivier Fourdan

Merge request reports