Blame SOURCES/qtwayland-send-set-window-geometry-only-once-configured.patch

89d4c9
From 2555663c9f59b93f5fcc5d3ead233bee280e36f8 Mon Sep 17 00:00:00 2001
89d4c9
From: David Edmundson <davidedmundson@kde.org>
89d4c9
Date: Mon, 16 Nov 2020 14:57:36 +0000
89d4c9
Subject: [PATCH] Client: Send set_window_geometry only once configured
89d4c9
89d4c9
The geometry only makes sense when a buffer exists, our currently send
89d4c9
value is somewhat meaningless, but till now harmless.
89d4c9
89d4c9
A specification clarification implies that it is an error if the
89d4c9
calculated effective window geometry is null, rather than just checking
89d4c9
the sent value. This is the case if set_window_geometry is sent before a
89d4c9
buffer is attached.
89d4c9
89d4c9
On our first configure call we enter resizeFromApplyConfigure which will
89d4c9
hit this path and send the initial state.
89d4c9
89d4c9
Pick-to: 5.15
89d4c9
Pick-to: 6.1
89d4c9
Pick-to: 6.0
89d4c9
Change-Id: Ib57ebe8b64210eae86e79dfdd6b5cb8a986b020b
89d4c9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
89d4c9
---
89d4c9
 src/client/qwaylandwindow.cpp | 2 +-
89d4c9
 1 file changed, 1 insertion(+), 1 deletion(-)
89d4c9
89d4c9
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
89d4c9
index 3e26384..80e9ffc 100644
89d4c9
--- a/src/client/qwaylandwindow.cpp
89d4c9
+++ b/src/client/qwaylandwindow.cpp
89d4c9
@@ -362,7 +362,7 @@ void QWaylandWindow::setGeometry(const QRect &rect)
89d4c9
     if (isExposed() && !mInResizeFromApplyConfigure && exposeGeometry != mLastExposeGeometry)
89d4c9
         sendExposeEvent(exposeGeometry);
89d4c9
 
89d4c9
-    if (mShellSurface)
89d4c9
+    if (mShellSurface && isExposed())
89d4c9
         mShellSurface->setWindowGeometry(windowContentGeometry());
89d4c9
 
89d4c9
     if (isOpaque() && mMask.isEmpty())