summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2026-01-05 15:12:11 +0100
committerVaxry <43317083+vaxerski@users.noreply.github.com>2026-01-05 18:53:29 +0100
commite165f841849114780c3fdc40a1b959470d51a5e2 (patch)
tree4a91da1bf035a7ddd3c8e437282c52f71a4dcc2b
parent686eda9d48b9d569986c122cfb8bdbe5264c6fe8 (diff)
core/compositor: immediately do readable if adding waiter fails for scheduling state
-rw-r--r--src/protocols/core/Compositor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp
index b9e677af..c897bfe8 100644
--- a/src/protocols/core/Compositor.cpp
+++ b/src/protocols/core/Compositor.cpp
@@ -500,7 +500,10 @@ void CWLSurfaceResource::scheduleState(WP<SSurfaceState> state) {
if (state->updated.bits.acquire) {
// wait on acquire point for this surface, from explicit sync protocol
- state->acquire.addWaiter([state, whenReadable]() { whenReadable(state, LOCK_REASON_FENCE); });
+ if (!state->acquire.addWaiter([state, whenReadable]() { whenReadable(state, LOCK_REASON_FENCE); })) {
+ Log::logger->log(Log::ERR, "Failed to addWaiter in CWLSurfaceResource::scheduleState");
+ whenReadable(state, LOCK_REASON_FENCE);
+ }
} else if (state->buffer && state->buffer->isSynchronous()) {
// synchronous (shm) buffers can be read immediately
m_stateQueue.unlock(state);