mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11: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:
commit
c1af76550f
|
@ -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;
|
||||
|
|
|
@ -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) };
|
||||
|
|
Loading…
Reference in a new issue