Commit 988ce289 authored by Martin Flöser's avatar Martin Flöser

[wayland] Ensure size is updated before marking window as ready for painting

Fixes regression introduced with 90a68145: we may not queue a signal
taking a pointer to a ShellClient as the ShellClient might be destroyed
before the queued signal is delivered.

The idea for the queued signal was to ensure that the size is set when
windowShown is emitted - this can also be achieved by first updating the
size.
parent 90a68145
......@@ -151,11 +151,11 @@ void ShellClient::setOpacity(double opacity)
void ShellClient::addDamage(const QRegion &damage)
{
setReadyForPainting();
if (m_shellSurface->surface()->buffer()->size().isValid()) {
m_clientSize = m_shellSurface->surface()->buffer()->size();
setGeometry(QRect(geom.topLeft(), m_clientSize));
}
setReadyForPainting();
Toplevel::addDamage(damage);
}
......
......@@ -127,7 +127,7 @@ void WaylandServer::init(const QByteArray &socketName)
connect(client, &ShellClient::windowShown, this,
[this, client] {
emit shellClientAdded(client);
}, Qt::QueuedConnection
}
);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment