diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-08-06 17:08:22 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-08-06 17:08:22 +0200 |
| commit | b0a70f63e3865eaa77f0b78a04b230aa583bc95c (patch) | |
| tree | b263cc411e4f36a6a459a23a33f1924c0cf5ce4a /src/protocols/core/Compositor.cpp | |
| parent | d597ae41b9ce7d995a4ad28bda9ef54d4d01a020 (diff) | |
wayland/compositor: drop pending buffer ref if synchronous
fixes https://github.com/hyprwm/hyprpicker/issues/85
Diffstat (limited to 'src/protocols/core/Compositor.cpp')
| -rw-r--r-- | src/protocols/core/Compositor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index b0111032..656433d3 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -448,8 +448,10 @@ 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()) + if (current.buffer->buffer->isSynchronous()) { dropCurrentBuffer(); + dropPendingBuffer(); // pending atm is just a copied ref of the current, drop it too to send a release + } } // TODO: we should _accumulate_ and not replace above if sync |
