mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 14:20:05 -04:00
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:
@@ -34,6 +34,9 @@ pub enum Event {
|
|||||||
|
|
||||||
/// The event loop was woken up by another thread.
|
/// The event loop was woken up by another thread.
|
||||||
Awakened,
|
Awakened,
|
||||||
|
|
||||||
|
/// The window needs to be redrawn.
|
||||||
|
Refresh,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type ScanCode = u8;
|
pub type ScanCode = u8;
|
||||||
|
|||||||
@@ -161,6 +161,11 @@ impl<'a> Iterator for PollEventsIterator<'a> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
ffi::Expose => {
|
||||||
|
use events::Event::Refresh;
|
||||||
|
return Some(Refresh);
|
||||||
|
},
|
||||||
|
|
||||||
ffi::MotionNotify => {
|
ffi::MotionNotify => {
|
||||||
use events::Event::MouseMoved;
|
use events::Event::MouseMoved;
|
||||||
let event: &ffi::XMotionEvent = unsafe { mem::transmute(&xev) };
|
let event: &ffi::XMotionEvent = unsafe { mem::transmute(&xev) };
|
||||||
|
|||||||
Reference in New Issue
Block a user