1 From f7fdce7a47e717107385408de1eae3b723e4d53c Mon Sep 17 00:00:00 2001
2 From: Marius Vlad <marius.vlad@collabora.com>
3 Date: Mon, 25 Apr 2022 16:34:18 +0300
4 Subject: [PATCH] qwaylandwindow: Short-circuit isExposed()
6 This patch short-circuits isExposed() to allow sending
7 xdg_shell:set_window_geometry() when re-sizing the window.
9 isExposed() depends on mFrameCallbackTimedOut begin set-up, which takes
10 precedence on checking isExposed() from mShellSurface.
12 As such, this patch allows to take into consideration the fact that
13 geometry did indeed changed and requires sending a new
14 set_window_geometry() request, in order to to avoid a protocol error as
15 the compositor already geometry provided by the client instead of
16 computing one for itself, so we need to send a new set_window_geometry()
17 with newer dimensions.
19 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
21 src/client/qwaylandwindow.cpp | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
24 diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
25 index e875af3a..7a13e06e 100644
26 --- a/src/client/qwaylandwindow.cpp
27 +++ b/src/client/qwaylandwindow.cpp
28 @@ -365,7 +365,7 @@ void QWaylandWindow::setGeometry(const QRect &rect)
29 if (isExposed() && !mInResizeFromApplyConfigure && exposeGeometry != mLastExposeGeometry)
30 sendExposeEvent(exposeGeometry);
32 - if (mShellSurface && isExposed())
33 + if (mShellSurface && (isExposed() || exposeGeometry != mLastExposeGeometry))
34 mShellSurface->setWindowGeometry(windowContentGeometry());
36 if (isOpaque() && mMask.isEmpty())