From fd5a43ff62dafe11a1f636f96fdd59e726478774 Mon Sep 17 00:00:00 2001 From: Val Packett Date: Fri, 20 Mar 2026 06:09:45 -0300 Subject: [PATCH] Add workaround for wl-cross-domain-proxy SHM resize handling The VM proxy does a cursed object lifecycle thing with this.. and wl-proxy complains, kinda rightfully (but compositors are all fine with this). Add a workaround to handle it. --- src/client_buffer.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client_buffer.rs b/src/client_buffer.rs index 9374c7d..6636aa2 100644 --- a/src/client_buffer.rs +++ b/src/client_buffer.rs @@ -52,6 +52,12 @@ impl WlShmPoolHandler for ClientWlShmPool { id.set_handler(ClientWlBuffer { width, height }); slf.send_create_buffer(id, offset, width, height, stride, format); } + + fn handle_destroy(&mut self, slf: &Rc) { + slf.send_destroy(); + self.delete_id(slf); // HACK: workaround for wl-cross-domain-proxy's ID reuse trick + // (https://gitlab.freedesktop.org/wayland/wayland/-/issues/561#note_3385478) + } } pub struct ClientZwpLinuxDmabufV1;