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

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