Fix closing a wayland session
Currently when I try to exit a native wayland session kwin crashes during the shutdown procedures.
This happens 100% of the time on my setup.
This has been tested to happen when using either the log out button in plasma or by sending a dbus message when not in a plasma shell.
qdbus org.kde.KWin /Session quit()
This merge request makes it actually possible to logout of plasma without the kwin_wayland_wrapper assuming that we wanted no such thing! :)
The approach taken was to reorder the shutdown procedure for a wayland session, and to disable libinput early on in the process.
What seems to be the root cause is that the xwayland shutdown wants to keep processing events, but the drm server was shutdown before this.
This caused normal events to segfault trying to access the wrapland server among other issues.
This should also close Issue #40 (closed) as it was a similar problem.
Closes #40 (closed)