diff --git a/src/main.rs b/src/main.rs index 0b571c2..2a6efc9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -122,9 +122,11 @@ fn main() -> Result<()> { // layer_surface.set_margin(10, 10, 10, 10); // surface.commit(); + queue.flush()?; + loop { - debug!("dispatched!"); - queue.blocking_dispatch(&mut state)?; + debug!("loop iteration!"); + poll_fn(|cx| queue.poll_dispatch_pending(cx, &mut state)).await?; } }