diff --git a/plugins/platforms/wayland/wayland_backend.cpp b/plugins/platforms/wayland/wayland_backend.cpp --- a/plugins/platforms/wayland/wayland_backend.cpp +++ b/plugins/platforms/wayland/wayland_backend.cpp @@ -463,6 +463,7 @@ } delete m_waylandCursor; + m_eventQueue->release(); qDeleteAll(m_outputs); if (m_xdgShell) { @@ -473,11 +474,10 @@ m_registry->release(); delete m_seat; m_shm->release(); - m_eventQueue->release(); - m_connectionThreadObject->deleteLater(); m_connectionThread->quit(); m_connectionThread->wait(); + m_connectionThreadObject->deleteLater(); qCDebug(KWIN_WAYLAND_BACKEND) << "Destroyed Wayland display"; } diff --git a/xdgshellclient.cpp b/xdgshellclient.cpp --- a/xdgshellclient.cpp +++ b/xdgshellclient.cpp @@ -1401,7 +1401,8 @@ m_plasmaShellSurface->showAutoHidingPanel(); } ); - updatePosition(); + if (surface->isPositionSet()) + updatePosition(); updateRole(); updateShowOnScreenEdge(); connect(this, &XdgShellClient::frameGeometryChanged, this, &XdgShellClient::updateShowOnScreenEdge);