But I would like to run native Wayland clients too, and have them behave in such an environment. Can a compositor be made in such a fashion that it would cooperate with XWayland and manage native clients?
I had assumed the same, but then they announced that they were discontinuing xorg-server without pointing to rootful xwayland, so I'm not sure how to read the situation.
> But I would like to run native Wayland clients too, and have them behave in such an environment. Can a compositor be made in such a fashion that it would cooperate with XWayland and manage native clients?
You can have a mix with non-rootful xwayland on a wayland compositor; that's the easy path, really. I don't know if there's a way to have a X11 window manager control Wayland windows in that kind of system, though.
jwz must be so happy...
The advantage is that you can have it both ways - users who are ill served by Wayland can keep running an effectively pure X11 environment, but ex. graphics drivers only need to support Wayland.
EDIT: Oh hey, it looks like Puppy Linux actually did exactly this, including using cage: https://github.com/puppylinux-woof-CE/woof-CE/pull/2265
[0] https://www.hjdskes.nl/projects/cage/
[1] Not 100% - there's some weirdness with keyboard configuration, and of all things xscreensaver-settings wouldn't run, even though everything else I ran worked just fine.