wayland/compositor: drop pending buffer ref if synchronous

fixes https://github.com/hyprwm/hyprpicker/issues/85
This commit is contained in:
Vaxry 2024-08-06 17:08:22 +02:00
parent d597ae41b9
commit b0a70f63e3
1 changed files with 3 additions and 1 deletions

View File

@ -448,8 +448,10 @@ void CWLSurfaceResource::commitPendingState() {
// release the buffer if it's synchronous as update() has done everything thats needed // release the buffer if it's synchronous as update() has done everything thats needed
// so we can let the app know we're done. // so we can let the app know we're done.
if (current.buffer->buffer->isSynchronous()) if (current.buffer->buffer->isSynchronous()) {
dropCurrentBuffer(); 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 // TODO: we should _accumulate_ and not replace above if sync