wayland: fix event dispatch, avoid double wait

This commit is contained in:
Victor Berger 2016-10-09 18:26:46 +02:00
parent 2d025a4a35
commit 42d73a1488

View file

@ -148,13 +148,13 @@ impl Window {
{ {
self.ctxt.flush(); self.ctxt.flush();
self.ctxt.dispatch(); self.ctxt.dispatch();
let mut guard = self.evq.lock().unwrap().dispatch(); let mut guard = self.evq.lock().unwrap().dispatch_pending();
// some events were dispatched, need to process a potential resising // some events were dispatched, need to process a potential resising
self.process_resize(); self.process_resize();
} }
// try again // try again
let mut guard = self.eviter.lock().unwrap(); let mut guard = self.eviter.lock().unwrap();
evt = guard.pop_front() evt = guard.pop_front();
} }
evt evt
} }