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.
This commit is contained in:
Val Packett 2026-03-20 06:09:45 -03:00
parent 049eb03387
commit fd5a43ff62

View file

@ -52,6 +52,12 @@ impl WlShmPoolHandler for ClientWlShmPool {
id.set_handler(ClientWlBuffer { width, height }); id.set_handler(ClientWlBuffer { width, height });
slf.send_create_buffer(id, offset, width, height, stride, format); slf.send_create_buffer(id, offset, width, height, stride, format);
} }
fn handle_destroy(&mut self, slf: &Rc<WlShmPool>) {
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; pub struct ClientZwpLinuxDmabufV1;