diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp index 2f20905a23..4317c13176 100644 --- a/src/wayland_server.cpp +++ b/src/wayland_server.cpp @@ -687,7 +687,9 @@ void WaylandServer::destroyInputMethodConnection() void WaylandServer::removeWindow(Window *c) { m_windows.removeAll(c); - Q_EMIT windowRemoved(c); + if (c->readyForPainting()) { + Q_EMIT windowRemoved(c); + } } static Window *findWindowInList(const QList &windows, const KWaylandServer::SurfaceInterface *surface)