diff options
author | Inho Lee <inho.lee@qt.io> | 2021-09-23 19:59:08 +0200 |
---|---|---|
committer | Inho Lee <inho.lee@qt.io> | 2021-12-07 11:11:00 +0200 |
commit | 07ddfbfa43d08c2b76aabafaab38830e04a42690 (patch) | |
tree | 5d30a9249279d5393c9a55547326574a13fd3294 /src/plugins | |
parent | 8d49793cbdaefd153b43b821bed038923015e7c3 (diff) | |
download | qtwayland-07ddfbfa43d08c2b76aabafaab38830e04a42690.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
Pick-to: 6.2 6.1 6.0 5.15
Change-Id: I849d2daf4acc8ef6e7f8528af9c5a57f671f43e6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 9 | ||||
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h | 1 |
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 afb2e3b2..8378cf9f 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -342,15 +342,16 @@ bool QWaylandXdgSurface::handleExpose(const QRegion ®ion) 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; }; |