diff --git a/main_wayland.cpp b/main_wayland.cpp index a9ece4de5d..0f6d5d60b0 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -86,12 +86,12 @@ ApplicationWayland::~ApplicationWayland() } kwinApp()->platform()->setOutputsEnabled(false); - destroyWorkspace(); - waylandServer()->dispatch(); // need to unload all effects prior to destroying X connection as they might do X calls if (effects) { static_cast(effects)->unloadAllEffects(); } + destroyWorkspace(); + waylandServer()->dispatch(); disconnect(m_xwaylandFailConnection); if (x11Connection()) { Xcb::setInputFocus(XCB_INPUT_FOCUS_POINTER_ROOT);