summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInho Lee <inho.lee@qt.io>2021-09-23 19:59:08 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-12-07 10:43:00 +0000
commit48447897ad0a28e756ed27fecdb4e22aefa01d2c (patch)
tree3abd29aea1fcb7f0e8acadbb9ddf6432b6f3f6b1
parent5e6f3ba87e37e1acee900e34925f7d80966efc8b (diff)
downloadqtwayland-48447897ad0a28e756ed27fecdb4e22aefa01d2c.tar.gz
Use a correct serial for xdg_surface.ack_configure
Previous pendingConfigureSerial can be overwritten regardless of the current configuration. With this patch, the client surface can use correct serial for xdg_surface.ack_configure. Fixes: QTBUG-95962 Change-Id: I849d2daf4acc8ef6e7f8528af9c5a57f671f43e6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 07ddfbfa43d08c2b76aabafaab38830e04a42690) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp9
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index 5d9a21f8..301d1847 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -348,15 +348,16 @@ bool QWaylandXdgSurface::handleExpose(const QRegion &region)
void QWaylandXdgSurface::applyConfigure()
{
- Q_ASSERT(m_pendingConfigureSerial != 0);
+ // It is a redundant ack_configure, so skipped.
+ if (m_pendingConfigureSerial == m_appliedConfigureSerial)
+ return;
if (m_toplevel)
m_toplevel->applyConfigure();
+ m_appliedConfigureSerial = m_pendingConfigureSerial;
m_configured = true;
- ack_configure(m_pendingConfigureSerial);
-
- m_pendingConfigureSerial = 0;
+ ack_configure(m_appliedConfigureSerial);
}
bool QWaylandXdgSurface::wantsDecorations() const
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
index e3a90c54..b504a24d 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
@@ -156,6 +156,7 @@ private:
bool m_configured = false;
QRegion m_exposeRegion;
uint m_pendingConfigureSerial = 0;
+ uint m_appliedConfigureSerial = 0;
friend class QWaylandXdgShell;
};