From e1be14cbf3fea29e425a8438eabadbb4da8435b8 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Mon, 24 Jul 2023 17:16:07 -0700 Subject: [PATCH] Fix crash in `simple_window` example We need to handle or ignore events from `wl_shm` and `wl_surface`, since the server does in fact produce events for those. --- wayland-client/examples/simple_window.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wayland-client/examples/simple_window.rs b/wayland-client/examples/simple_window.rs index 84d41ad1286..0adaee1432b 100644 --- a/wayland-client/examples/simple_window.rs +++ b/wayland-client/examples/simple_window.rs @@ -109,11 +109,11 @@ impl Dispatch for State { } // Ignore events from these object types in this example. -delegate_noop!(State: wl_compositor::WlCompositor); -delegate_noop!(State: wl_surface::WlSurface); -delegate_noop!(State: wl_shm::WlShm); -delegate_noop!(State: wl_shm_pool::WlShmPool); -delegate_noop!(State: wl_buffer::WlBuffer); +delegate_noop!(State: ignore wl_compositor::WlCompositor); +delegate_noop!(State: ignore wl_surface::WlSurface); +delegate_noop!(State: ignore wl_shm::WlShm); +delegate_noop!(State: ignore wl_shm_pool::WlShmPool); +delegate_noop!(State: ignore wl_buffer::WlBuffer); fn draw(tmp: &mut File, (buf_x, buf_y): (u32, u32)) { use std::{cmp::min, io::Write};