client: Always call mShellSurface->setWindowGeometry regardless of exposure

setWindowGeometry is called to tell shell surfaces when the window tries
to request a new size.

On XdgShell this should not be called before the window is exposed and
we are attaching buffers, this check belongs in XdgShell itself as other
shells may be using this for other purposes.

Pick-to: 6.7
Change-Id: Iae09e71e1b5071fc8c1f3790ec1a260c3d6462ce
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
David Edmundson 2024-02-16 11:38:01 +00:00
parent 6b8be3a4a9
commit d82cbae72d
2 changed files with 3 additions and 2 deletions

View File

@ -411,7 +411,8 @@ void QWaylandXdgSurface::propagateSizeHints()
void QWaylandXdgSurface::setWindowGeometry(const QRect &rect)
{
set_window_geometry(rect.x(), rect.y(), rect.width(), rect.height());
if (window()->isExposed())
set_window_geometry(rect.x(), rect.y(), rect.width(), rect.height());
}
void QWaylandXdgSurface::setSizeHints()

View File

@ -453,7 +453,7 @@ void QWaylandWindow::setGeometry(const QRect &r)
if (isExposed() && !mInResizeFromApplyConfigure && exposeGeometry != mLastExposeGeometry)
sendExposeEvent(exposeGeometry);
if (mShellSurface && isExposed()) {
if (mShellSurface) {
mShellSurface->setWindowGeometry(windowContentGeometry());
if (!qt_window_private(window())->positionAutomatic)
mShellSurface->setWindowPosition(windowGeometry().topLeft());