diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-04-24 07:50:38 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-04-24 07:50:38 +0200 |
commit | c1af76550f311e3da7a08d393b4ea9805cb61a7b (patch) | |
tree | de6e00d0733a18639b3f4be6a81c4abe10f95b0b /src | |
parent | ff31390ab0a1c7abdd712d99b827b20bd532ecd9 (diff) | |
parent | 0670b1ec2e002f8881154d10720d7dded0f23b10 (diff) | |
download | glutin-c1af76550f311e3da7a08d393b4ea9805cb61a7b.tar.gz glutin-c1af76550f311e3da7a08d393b4ea9805cb61a7b.zip |
Merge pull request #391 from glennw/upstream-i3-vis
Add Expose event handler which is needed on some window managers.
Diffstat (limited to 'src')
-rw-r--r-- | src/events.rs | 3 | ||||
-rw-r--r-- | src/x11/window/mod.rs | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/events.rs b/src/events.rs index ac30cfd..957e0c3 100644 --- a/src/events.rs +++ b/src/events.rs @@ -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; diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 8f30373..80338c7 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -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) }; |