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