From 0a8fe091f78bddb8e986953ee87fc2626f45e751 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 4 Dec 2024 10:16:27 +0100 Subject: [PATCH] Client: Always trigger a commit in flush There are a few paths in wayland that require the client to always commit to apply changes or ack requests. We need this synchronized with any rendering so it is normally triggered with an expose or update event relying that this will always commit at the end. There is a path in QWidget code where if the window is not damaged we never call backingStore->beginPaint. If this doesn't happen we don't swap the front buffer, and the expose event will no-op. We want to avoid attaching in this case, but we should commit without attaching regardless to flush these events. This fixes an issue where Qt could fail to ack configure events which don't trigger updates. Pick-to: 6.8 Change-Id: Iaa606b0bf9fbbaefd3e67444cc768f95076967fe Reviewed-by: Vlad Zahorodnii --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index c266b49bae5..393f33cfd47 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -740,7 +740,8 @@ void QWaylandWindow::commit(QWaylandBuffer *buffer, const QRegion &damage) { Q_ASSERT(isExposed()); if (buffer->committed()) { - qCDebug(lcWaylandBackingstore) << "Buffer already committed, ignoring."; + mSurface->commit(); + qCDebug(lcWaylandBackingstore) << "Buffer already committed, not attaching."; return; }