summaryrefslogtreecommitdiff
path: root/src/protocols/core/Compositor.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-08-06 17:08:22 +0200
committerVaxry <vaxry@vaxry.net>2024-08-06 17:08:22 +0200
commitb0a70f63e3865eaa77f0b78a04b230aa583bc95c (patch)
treeb263cc411e4f36a6a459a23a33f1924c0cf5ce4a /src/protocols/core/Compositor.cpp
parentd597ae41b9ce7d995a4ad28bda9ef54d4d01a020 (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.cpp4
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