Skip to content

Commit

Permalink
Fix crash in simple_window example
Browse files Browse the repository at this point in the history
We need to handle or ignore events from `wl_shm` and `wl_surface`, since
the server does in fact produce events for those.
  • Loading branch information
ids1024 committed Aug 31, 2023
1 parent 799c772 commit 947455f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions wayland-client/examples/simple_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ impl Dispatch<wl_registry::WlRegistry, ()> 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};
Expand Down

0 comments on commit 947455f

Please sign in to comment.