mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Add Expose event handler which is needed on some window managers.
This commit is contained in:
parent
d8cd748e35
commit
0670b1ec2e
|
@ -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) };
|
||||||
|
|
Loading…
Reference in a new issue