Hi,
I'm having problems getting data for touch events redirected to my application window using X11EventFilter.
I've used
XISelectEvents
(QX11Info::display(), viewer
->winId
(),
&eventmask,
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
bool MainApplication::x11EventFilter(XEvent *event)
{
XEvent ev = *event;
if (ev.xcookie.type == GenericEvent)
{
std::cout << "Extension" << ev.xcookie.extension;
XIDeviceEvent* evData = (XIDeviceEvent*)(ev.xcookie.data);
int id = 0;
if(evData != 0){
id = evData->detail;
printf("Success\n");
}else{
printf("Device Event data not coming\n");
}
....
bool MainApplication::x11EventFilter(XEvent *event)
{
XEvent ev = *event;
if (ev.xcookie.type == GenericEvent)
{
std::cout << "Extension" << ev.xcookie.extension;
XIDeviceEvent* evData = (XIDeviceEvent*)(ev.xcookie.data);
int id = 0;
if(evData != 0){
id = evData->detail;
printf("Success\n");
}else{
printf("Device Event data not coming\n");
}
....
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.
Bookmarks