diff options
author | David Edmundson <davidedmundson@kde.org> | 2024-02-16 11:38:01 +0000 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2024-02-28 09:03:49 +0000 |
commit | 819bd4d9c0e99f1cb58acaa87321b27dfff936d3 (patch) | |
tree | 60130ab04b9b68273f88a8dffc1fabfcb68511d5 /src | |
parent | 18ced72bb3ce1de98e622fee71804a12f9d4ef15 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 2 | ||||
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 4c8d2eedc..f5a9fddb8 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -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()); diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index 45714e2fe..977657e59 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -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() |