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>
This commit is contained in:
Inho Lee 2021-09-23 19:59:08 +02:00
parent caded7fb85
commit 2bd5d5f2be
2 changed files with 6 additions and 4 deletions

View File

@ -342,15 +342,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

View File

@ -156,6 +156,7 @@ private:
bool m_configured = false;
QRegion m_exposeRegion;
uint m_pendingConfigureSerial = 0;
uint m_appliedConfigureSerial = 0;
friend class QWaylandXdgShell;
};