aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/events.rs3
-rw-r--r--src/x11/window/mod.rs5
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 9f600a8..5b1b42d 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) };