summaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/event.rs b/src/event.rs
index e15ee18..366ca28 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -6,6 +6,8 @@ use x11::xlib::{
XCrossingEvent,
XCreateWindowEvent,
XDestroyWindowEvent,
+ XUnmapEvent,
+ XMapEvent,
XConfigureEvent,
};
@@ -24,6 +26,8 @@ pub enum Event {
Generic(XEvent),
Create(XCreateWindowEvent),
Destroy(XDestroyWindowEvent),
+ Unmap(XUnmapEvent),
+ Map(XMapEvent),
Configure(XConfigureEvent),
NoEvent
}
@@ -39,6 +43,8 @@ impl fmt::Debug for Event {
&Event::Leave(ev) => format!("Enter({})", XEvent::from(ev).get_type()),
&Event::Create(ev) => format!("Create({})", XEvent::from(ev).get_type()),
&Event::Destroy(ev) => format!("Destroy({})", XEvent::from(ev).get_type()),
+ &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::NoEvent => format!("NoEvent"),
};
@@ -60,6 +66,8 @@ pub fn next_event(display: *mut Display) -> Event {
8 => Event::Leave(XCrossingEvent::from(ev)),
16 => Event::Create(XCreateWindowEvent::from(ev)),
17 => Event::Destroy(XDestroyWindowEvent::from(ev)),
+ 18 => Event::Unmap(XUnmapEvent::from(ev)),
+ 19 => Event::Map(XMapEvent::from(ev)),
22 => Event::Configure(XConfigureEvent::from(ev)),
e => {
println!("Unknown event {}", e);