Xwayland: Improve rootfull mode for legacy X11 environments
Xwayland is a compatibility layer for legacy X11 applications on Wayland, with Wayland compositors running Xwayland rootless for seamless integration of X11 and Wayland clients.
But for legacy X11 environments, Xwayland rootless is hardly a solution. But Xwayland is a standard Xserver perfectly capable of running rootfull (it's even the default unless
-rootless is specified), one could use Xwayland rootfull and run the full legacy X11 environments and window managers.
This issue here is mostly about brainstorming and get some feedback, something we discussed in the past with @ajax.
This issue is not about defining the need for a kiosk mode Wayland compositor, this is only about what is missing for Xwayland to play nicely (or at least as nicely as technically possible, reasonably) in such a scenario.
Obviously, anything that tries to configure the hardware would not work, so things like pointer acceleration are unlikely to work.
Configuring Keyboard repeat delay/rate would work, as it is handled client side with Wayland, so that is the Xserver doing.
Same for pointer and keyboard grabs, they are handled in the Xserver and would work as long as the Wayland compositor doesn't fiddle with the relevant key combos (which would be the case with the dedicated kiosk mode or similar Wayland compositor).
XRandR is a bit of an odd beast here. Right now, the root window of Xwayland (even when rootfull) is configured according the the Wayland outputs given by the Wayland compositor using
xdg-output. While XRandr emulation is only enabled when rootless, we could imagine a similar mechanism (using viewports as well) to allow X11 clients and desktops alike to configure the resolution as they would with plain Xorg.
The output layout though wouldn't be configurable from X11 and this is managed from the Wayland compositor and changing the layout is not a matter of changing the viewport configuration. That makes me wonder if that wouldn't be best to keep just one Xwayland window fullscreen on a single monitor (i.e. no multihead) sized by the XRandR resolution (rather than the Wayland output size).
X11 clients could choose to check for an output property (such as "RANDR Emulation" as in !890 (merged)) to disable the XRandR features from their UI.