aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-04-25 16:43:25 +0300
committerScott Murray <scott.murray@konsulko.com>2022-05-02 19:16:50 +0000
commit85bab6fcc3a02167a164d57816a982eeb5d6eea2 (patch)
tree9396fb980b13a4d39138b4217483236f111b8e08 /recipes-qt/qt
parentf3dc6165f647dc35b3d6cb28566d9fb7fb63eb08 (diff)
qwaylandwindow-Short-circuit-isExposed: qtwayland resize fix
An initial configure event does make qtwayland to send a window geometry with the initial values, just that it doesn't take into account new resizes which are required when starting before the shell. Bug-AGL: SPEC-4341 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I74c74e7977dcf4dc9516572033e223449e1c44fb (cherry picked from commit 5403a4d3e0e2252883ca48fa3b49b23c92bc1e4f)
Diffstat (limited to 'recipes-qt/qt')
-rw-r--r--recipes-qt/qt/qtwayland/0001-qwaylandwindow-Short-circuit-isExposed.patch39
-rw-r--r--recipes-qt/qt/qtwayland_agldemo.inc1
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes-qt/qt/qtwayland/0001-qwaylandwindow-Short-circuit-isExposed.patch b/recipes-qt/qt/qtwayland/0001-qwaylandwindow-Short-circuit-isExposed.patch
new file mode 100644
index 000000000..4dc55c5d2
--- /dev/null
+++ b/recipes-qt/qt/qtwayland/0001-qwaylandwindow-Short-circuit-isExposed.patch
@@ -0,0 +1,39 @@
+From f7fdce7a47e717107385408de1eae3b723e4d53c Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Mon, 25 Apr 2022 16:34:18 +0300
+Subject: [PATCH] qwaylandwindow: Short-circuit isExposed()
+
+This patch short-circuits isExposed() to allow sending
+xdg_shell:set_window_geometry() when re-sizing the window.
+
+isExposed() depends on mFrameCallbackTimedOut begin set-up, which takes
+precedence on checking isExposed() from mShellSurface.
+
+As such, this patch allows to take into consideration the fact that
+geometry did indeed changed and requires sending a new
+set_window_geometry() request, in order to to avoid a protocol error as
+the compositor already geometry provided by the client instead of
+computing one for itself, so we need to send a new set_window_geometry()
+with newer dimensions.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ 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 e875af3a..7a13e06e 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -365,7 +365,7 @@ void QWaylandWindow::setGeometry(const QRect &rect)
+ if (isExposed() && !mInResizeFromApplyConfigure && exposeGeometry != mLastExposeGeometry)
+ sendExposeEvent(exposeGeometry);
+
+- if (mShellSurface && isExposed())
++ if (mShellSurface && (isExposed() || exposeGeometry != mLastExposeGeometry))
+ mShellSurface->setWindowGeometry(windowContentGeometry());
+
+ if (isOpaque() && mMask.isEmpty())
+--
+2.35.1
+
diff --git a/recipes-qt/qt/qtwayland_agldemo.inc b/recipes-qt/qt/qtwayland_agldemo.inc
index a02ecf0a3..fc02d571a 100644
--- a/recipes-qt/qt/qtwayland_agldemo.inc
+++ b/recipes-qt/qt/qtwayland_agldemo.inc
@@ -14,5 +14,6 @@ FILESEXTRAPATHS:append := ":${THISDIR}/qtwayland"
SRC_URI:append = "\
file://0001-client-qwaylandintegration-Do-not-attempt-to-use-the.patch \
+ file://0001-qwaylandwindow-Short-circuit-isExposed.patch \
"