main loop dispatch without blocking

This commit is contained in:
xunuwu 2025-06-19 01:14:38 +02:00
parent 288014339a
commit 147574b06b
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI

View file

@ -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?;
}
}