From a77d73e8d0844fb25fe6907a9c98abaff930c462 Mon Sep 17 00:00:00 2001 From: corey Date: Thu, 25 Apr 2013 16:08:50 -0400 Subject: [PATCH] xfreerdp-client: xi more tweaks --- client/X11/xf_event.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index 806114f2a..bfdf44026 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -986,22 +986,30 @@ BOOL xf_event_process(freerdp* instance, XEvent* event) } //handle touch events - XGenericEventCookie *cookie = &event->xcookie; + XGenericEventCookie* cookie = &event->xcookie; XGetEventData(xfi->display, cookie); - if ( event->xcookie.type == GenericEvent && - event->xcookie.extension == xfi->XInputOpcode) + if ( (cookie->type == GenericEvent) && + (cookie->extension == xfi->XInputOpcode) ) { switch(cookie->evtype) { case XI_ButtonPress: case XI_Motion: case XI_KeyPress: - printf("Touch %d\n", cookie->evtype); + printf("\tTouch %d\n", cookie->evtype); //do_something(ev.xcookie.data); break; + + default: + printf("evtype= %d\n", cookie->evtype); + break; } } + else + { + printf("cookie type, opcode = %d, %d\n", cookie->type, cookie->extension); + } XFreeEventData(xfi->display,cookie);