Fix poll_events returning None when it shouldn't
This commit is contained in:
parent
de56a569e8
commit
59220d35ce
1 changed files with 118 additions and 118 deletions
|
|
@ -119,6 +119,7 @@ impl<'a> Iterator for PollEventsIterator<'a> {
|
||||||
return Some(ev);
|
return Some(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loop {
|
||||||
let mut xev = unsafe { mem::uninitialized() };
|
let mut xev = unsafe { mem::uninitialized() };
|
||||||
let res = unsafe { ffi::XCheckMaskEvent(self.window.x.display, Int::max_value(), &mut xev) };
|
let res = unsafe { ffi::XCheckMaskEvent(self.window.x.display, Int::max_value(), &mut xev) };
|
||||||
|
|
||||||
|
|
@ -238,8 +239,7 @@ impl<'a> Iterator for PollEventsIterator<'a> {
|
||||||
|
|
||||||
_ => ()
|
_ => ()
|
||||||
};
|
};
|
||||||
|
}
|
||||||
return None;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue