Commit 31cc2628 authored by Martin Flöser's avatar Martin Flöser

[wayland] Reuse position when size of a ShellClient changes

Means the window is not always reset to (0,0) when the size changes.
parent 74ae2f50
......@@ -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);
}
......
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