From 9cca0dbb45941e13322ff95796f486676f061c6e Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 2 May 2024 15:18:17 +0100 Subject: [PATCH] core: avoid sending duplicate acks for ls --- src/core/LockSurface.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/LockSurface.cpp b/src/core/LockSurface.cpp index 8446354..853356d 100644 --- a/src/core/LockSurface.cpp +++ b/src/core/LockSurface.cpp @@ -69,13 +69,16 @@ CSessionLockSurface::CSessionLockSurface(COutput* output) : output(output) { void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) { Debug::log(LOG, "configure with serial {}", serial_); + const bool sameSerial = serial == serial_; + serial = serial_; size = (size_ * fractionalScale).floor(); logicalSize = size_; Debug::log(LOG, "Configuring surface for logical {} and pixel {}", logicalSize, size); - ext_session_lock_surface_v1_ack_configure(lockSurface, serial); + if (!sameSerial) + ext_session_lock_surface_v1_ack_configure(lockSurface, serial); if (fractional) wp_viewport_set_destination(viewport, logicalSize.x, logicalSize.y);