XWayland Integration In The Works For KDE's KWin 5.3
It's been a big challenge getting the XWayland server support properly integrated into KWin as a step towards native KWin Wayland support. In the process of integrating XWayland support, there's been many circular dependency issues, an initial problem with getting accelerated OpenGL, and other issues to workaround in the KWin code and related components.
Martin summarized the situation as, "we can start kwin_wayland on platform wayland connecting to a Wayland server started by kwin_wayland, we do not require QX11Info in (most of) KF5WindowSystem and KWin. We are a good step closer to the aim, but still not there. The dependency loop is still in place: Workspace starts the Compositor, the Compositor creates the EGLDisplay which is needed to start Xwayland, which provides X11 which is needed for starting the Workspace...With all that in place I was able to delay starting Xwayland to after the Compositor is created and Xwayland can provide OpenGL to the connected clients."
Martin's screenshot showing kwin_wayland running on the Wayland Weston compositor.
Martin is hoping to have the rootless XWayland server integration ready for the KWin 5.3 release due out in April as an important step towards KDE better supporting Wayland. More details can be found via Martin's blog.