Start accepting client connections after creating Workspace
It might happen that an xdg-toplevel is created before the compositor is fully initialized. In which case, the xdg-toplevel surface won't be displayed. The root cause of this bug is that kwin creates the xdg_wm_base global before the Workspace.
Ideally, we need to create the Wayland server after successfully initializing the platform and the workspace. However, due to bad design, it's not an option.
This merge request works around the startup race condition issue by making kwin start accepting client connections after the workspace has been created. Unfortunately, we can't swap a few lines of code and call it a day. We need to adjust some parts of kwin to make it properly handle delayed start of Xwayland.
Edited by Vlad Zahorodnii