make flames/julia/neko demos use XCB_EVENT_RESPONSE_TYPE to determine event type
authorHenning Sten <henning.sten@yahoo.com>
Tue, 16 Sep 2008 19:39:15 +0000 (21:39 +0200)
committerJulien Danjou <julien@danjou.info>
Thu, 18 Sep 2008 07:37:31 +0000 (09:37 +0200)
Signed-off-by: Julien Danjou <julien@danjou.info>
neko/xcbneko.c
tests/flames.c
tests/julia.c

index 23b150e..ed31f3e 100644 (file)
@@ -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;
index 59bfbdf..f55acea 100644 (file)
@@ -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,
index ebdc11f..c995d09 100644 (file)
@@ -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:
              {