[wayland] Reuse position when size of a ShellClient changes
Means the window is not always reset to (0,0) when the size changes.
This commit is contained in:
parent
74ae2f503e
commit
31cc2628cc
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ ShellClient::ShellClient(ShellSurfaceInterface *surface)
|
|||
connect(surface->surface(), &SurfaceInterface::sizeChanged, this,
|
||||
[this] {
|
||||
m_clientSize = m_shellSurface->surface()->buffer()->size();
|
||||
setGeometry(QRect(QPoint(0, 0), m_clientSize));
|
||||
setGeometry(QRect(geom.topLeft(), m_clientSize));
|
||||
}
|
||||
);
|
||||
connect(surface, &ShellSurfaceInterface::destroyed, this, &ShellClient::destroyClient);
|
||||
|
@ -140,7 +140,7 @@ void ShellClient::addDamage(const QRegion &damage)
|
|||
setReadyForPainting();
|
||||
if (m_shellSurface->surface()->buffer()->size().isValid()) {
|
||||
m_clientSize = m_shellSurface->surface()->buffer()->size();
|
||||
setGeometry(QRect(QPoint(0, 0), m_clientSize));
|
||||
setGeometry(QRect(geom.topLeft(), m_clientSize));
|
||||
}
|
||||
Toplevel::addDamage(damage);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue