mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Fix poll_events on x11 not draining completely
If the interrupted flag were set going into poll_events, it would only ever handle the first event in the queue. Now, the flag is reset at the start so events are processed until the caller requests otherwise.
This commit is contained in:
parent
ad8d2b0470
commit
4ec5078bdb
|
@ -126,6 +126,7 @@ impl EventsLoop {
|
||||||
pub fn poll_events<F>(&self, mut callback: F)
|
pub fn poll_events<F>(&self, mut callback: F)
|
||||||
where F: FnMut(Event)
|
where F: FnMut(Event)
|
||||||
{
|
{
|
||||||
|
self.interrupted.store(false, ::std::sync::atomic::Ordering::Relaxed);
|
||||||
let xlib = &self.display.xlib;
|
let xlib = &self.display.xlib;
|
||||||
|
|
||||||
let mut xev = unsafe { mem::uninitialized() };
|
let mut xev = unsafe { mem::uninitialized() };
|
||||||
|
|
Loading…
Reference in a new issue