waylandserver: don't emit windowRemoved if it's not been added yet

This can happen when a client destroys the window before it ever got ready
for painting
This commit is contained in:
Xaver Hugl 2022-09-16 17:20:08 +02:00
parent 574b51f095
commit fa538edc74

View file

@ -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<Window *> &windows, const KWaylandServer::SurfaceInterface *surface)