Call flush so that the wayland eventsloop correctly breaks from dispatch when wakeup is called

This commit is contained in:
mitchmindtree 2017-05-27 22:51:59 +10:00
parent f6587aed39
commit 9ca2f83784

View file

@ -95,9 +95,9 @@ impl EventsLoopProxy {
(Some(ctxt), Some(wakeup)) => { (Some(ctxt), Some(wakeup)) => {
// Update the `EventsLoop`'s `pending_wakeup` flag. // Update the `EventsLoop`'s `pending_wakeup` flag.
wakeup.store(true, atomic::Ordering::Relaxed); wakeup.store(true, atomic::Ordering::Relaxed);
// TODO:
// Cause the `EventsLoop` to break from `dispatch` if it is currently blocked. // Cause the `EventsLoop` to break from `dispatch` if it is currently blocked.
ctxt.display.sync(); ctxt.display.sync();
ctxt.display.flush().ok();
Ok(()) Ok(())
}, },
_ => Err(EventsLoopClosed), _ => Err(EventsLoopClosed),