From 1e23ea8af077353dbe4b08e3aab8219f28cad1ac Mon Sep 17 00:00:00 2001 From: Henning Sten Date: Tue, 16 Sep 2008 21:39:15 +0200 Subject: make flames/julia/neko demos use XCB_EVENT_RESPONSE_TYPE to determine event type Signed-off-by: Julien Danjou --- neko/xcbneko.c | 2 +- tests/flames.c | 2 +- tests/julia.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neko/xcbneko.c b/neko/xcbneko.c index 23b150e..ed31f3e 100644 --- a/neko/xcbneko.c +++ b/neko/xcbneko.c @@ -1188,7 +1188,7 @@ Bool ProcessEvent(void) { case NORMAL_STATE: while ( ContinueState && NULL != (theEvent = xcb_poll_for_event( xc )) ) { /*while ( XCheckMaskEvent( theDisplay, EVENT_MASK, &theEvent ) ) {*/ - switch ( theEvent->response_type & 0x7f ) { + switch (XCB_EVENT_RESPONSE_TYPE(theEvent)) { case XCB_CONFIGURE_NOTIFY: theConfigureNotification = (xcb_configure_notify_event_t *)theEvent; WindowWidth = theConfigureNotification->width; diff --git a/tests/flames.c b/tests/flames.c index 59bfbdf..f55acea 100644 --- a/tests/flames.c +++ b/tests/flames.c @@ -243,7 +243,7 @@ main () { if ((e = xcb_poll_for_event (f->xcb.c))) { - switch (e->response_type & 0x7f) + switch (XCB_EVENT_RESPONSE_TYPE(e)) { case XCB_EXPOSE: xcb_copy_area(f->xcb.c, f->xcb.pixmap, f->xcb.draw, gc, diff --git a/tests/julia.c b/tests/julia.c index ebdc11f..c995d09 100644 --- a/tests/julia.c +++ b/tests/julia.c @@ -217,7 +217,7 @@ main (int argc, char *argv[]) xcb_generic_event_t *e; if (e = xcb_wait_for_event(data.conn)) { - switch (e->response_type & 0x7f) + switch (XCB_EVENT_RESPONSE_TYPE(e)) { case XCB_EXPOSE: { -- cgit v1.2.3