diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2025-07-08 18:55:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-08 18:55:46 +0200 |
| commit | 2f34ef141b0728857d2a6f777c608dfe4c207733 (patch) | |
| tree | a5d02d14d5dcd296a5f3478968e7178c62bc2d5a /src/protocols/core/Compositor.cpp | |
| parent | 8f948827a69499c0b112043debad35f82a312b6b (diff) | |
compositor: fix race to finish on null buffer (#10970)
if a null buffer is commited and a pending state is awaiting, drop the
pending state so we dont end up in race to finish brokeness.
Diffstat (limited to 'src/protocols/core/Compositor.cpp')
| -rw-r--r-- | src/protocols/core/Compositor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index 9f3a5407..10245982 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -128,6 +128,13 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : m_resource(re (!m_pending.buffer && !m_pending.texture) // null buffer attached ) { commitState(m_pending); + + if (!m_pending.buffer && !m_pending.texture) { + // null buffer attached, remove any pending states. + while (!m_pendingStates.empty()) { + m_pendingStates.pop(); + } + } m_pending.reset(); return; } |
