summaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2016-01-27 12:27:34 -0300
committerMatias Linares <matiaslina@openmailbox.org>2016-01-27 12:27:34 -0300
commit5d7d8a19f6364dfb6e6583125ced3103d069f2b3 (patch)
treed6906802f0427fd843783dba1d608cf3c54fcd82 /src/event.rs
parentf7a827971f436d9d493cff9ecb7fe91958f71be1 (diff)
downloaddotwm-5d7d8a19f6364dfb6e6583125ced3103d069f2b3.tar.gz
Refactor move sticky.
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/event.rs b/src/event.rs
index 3832a36..b97686f 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -11,6 +11,7 @@ use x11::xlib::{
XUnmapEvent,
XMapEvent,
XConfigureEvent,
+ XExposeEvent,
XPending,
};
@@ -48,6 +49,7 @@ pub enum Event {
Unmap(XUnmapEvent),
Map(XMapEvent),
Configure(XConfigureEvent),
+ Expose(XExposeEvent),
Socket(UnixStream),
NoEvent
}
@@ -66,6 +68,7 @@ impl fmt::Debug for Event {
&Event::Unmap(ev) => format!("Unmap({})", XEvent::from(ev).get_type()),
&Event::Map(ev) => format!("Map({})", XEvent::from(ev).get_type()),
&Event::Configure(ev) => format!("Configure({})", XEvent::from(ev).get_type()),
+ &Event::Expose(ev) => format!("Expose({})", XEvent::from(ev).get_type()),
&Event::Socket(_) => format!("Socket()"),
&Event::NoEvent => format!("NoEvent"),
};
@@ -116,6 +119,7 @@ pub fn next_event(display: *mut Display) -> Event {
6 => Event::Drag(XMotionEvent::from(ev)),
7 => Event::Enter(XCrossingEvent::from(ev)),
8 => Event::Leave(XCrossingEvent::from(ev)),
+ 12 => Event::Expose(XExposeEvent::from(ev)),
16 => Event::Create(XCreateWindowEvent::from(ev)),
17 => Event::Destroy(XDestroyWindowEvent::from(ev)),
18 => Event::Unmap(XUnmapEvent::from(ev)),