diff options
| author | UjinT34 <41110182+UjinT34@users.noreply.github.com> | 2025-01-06 19:52:35 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-06 16:52:35 +0000 |
| commit | 6a90b505456cc708ec2779e0943eb9764e7630a5 (patch) | |
| tree | 761493c1e63a7a10f98a132186176c0ce6ff7ea0 /src/protocols/core/Compositor.cpp | |
| parent | 602d6b73563e56fe003bbf3d25b45a53c51bad24 (diff) | |
core/compositor: fix too early buffer release (#8966)
Diffstat (limited to 'src/protocols/core/Compositor.cpp')
| -rw-r--r-- | src/protocols/core/Compositor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index ee1e6224..6213f987 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -428,6 +428,7 @@ void CWLSurfaceResource::commitPendingState() { pending.damage.clear(); pending.bufferDamage.clear(); pending.newBuffer = false; + dropPendingBuffer(); // at this point current.buffer holds the same SP and we don't use pending anymore events.roleCommit.emit(); @@ -448,10 +449,9 @@ void CWLSurfaceResource::commitPendingState() { // release the buffer if it's synchronous as update() has done everything thats needed // so we can let the app know we're done. - if (current.buffer->buffer->isSynchronous()) { - dropCurrentBuffer(); - dropPendingBuffer(); // pending atm is just a copied ref of the current, drop it too to send a release - } + // Some clients aren't ready to receive a release this early. Should be fine to release it on the next commitPendingState. + // if (current.buffer->buffer->isSynchronous()) + // dropCurrentBuffer(); } // TODO: we should _accumulate_ and not replace above if sync |
