[Xcb-commit] neko tests

Julien Danjou jdanjou at kemper.freedesktop.org
Thu Sep 18 00:37:38 PDT 2008


 neko/xcbneko.c |    2 +-
 tests/flames.c |    2 +-
 tests/julia.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1e23ea8af077353dbe4b08e3aab8219f28cad1ac
Author: Henning Sten <henning.sten at yahoo.com>
Date:   Tue Sep 16 21:39:15 2008 +0200

    make flames/julia/neko demos use XCB_EVENT_RESPONSE_TYPE to determine event type
    
    Signed-off-by: Julien Danjou <julien at danjou.info>

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:
 	      {


More information about the xcb-commit mailing list