[wayland] Ensure size is updated before marking window as ready for painting
Fixes regression introduced with 90a6814
: 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.
This commit is contained in:
parent
90a6814513
commit
988ce28943
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue