Merge pull request #391 from glennw/upstream-i3-vis

Add Expose event handler which is needed on some window managers.
This commit is contained in:
tomaka 2015-04-24 07:50:38 +02:00
commit c1af76550f
2 changed files with 8 additions and 0 deletions

View file

@ -34,6 +34,9 @@ pub enum Event {
/// The event loop was woken up by another thread.
Awakened,
/// The window needs to be redrawn.
Refresh,
}
pub type ScanCode = u8;

View file

@ -161,6 +161,11 @@ impl<'a> Iterator for PollEventsIterator<'a> {
}
},
ffi::Expose => {
use events::Event::Refresh;
return Some(Refresh);
},
ffi::MotionNotify => {
use events::Event::MouseMoved;
let event: &ffi::XMotionEvent = unsafe { mem::transmute(&xev) };