Hi,
I'm having problems getting data for touch events redirected to my application window using X11EventFilter.
I've used
Qt Code:
  1. XISelectEvents(QX11Info::display(), viewer->winId(), &eventmask, 1);
To copy to clipboard, switch view to plain text mode 
to select Events for my window. In my X11Eventfilter function
Qt Code:
  1. bool MainApplication::x11EventFilter(XEvent *event)
  2. {
  3.  
  4. XEvent ev = *event;
  5. if (ev.xcookie.type == GenericEvent)
  6. {
  7. std::cout << "Extension" << ev.xcookie.extension;
  8. XIDeviceEvent* evData = (XIDeviceEvent*)(ev.xcookie.data);
  9. int id = 0;
  10. if(evData != 0){
  11. id = evData->detail;
  12. printf("Success\n");
  13. }else{
  14. printf("Device Event data not coming\n");
  15. }
  16. ....
To copy to clipboard, switch view to plain text mode 
everything seems to be in order except that `ev.XCookie.data` field is zero.
This is happening on Debian 8 OS, on Ubuntu the same code works fine.

Any Ideas on where I might be going wrong or if it has something to do with the OS?

Thanks.