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

39 lines
1.5 KiB
Diff
Raw Normal View History

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