XIQueryDevicePointer generates an XIO error

Mark Dokter mark.dokter at icg.tugraz.at
Wed May 13 10:12:42 PDT 2009


I am playing around with the XI2 stuff and always get an error when using 
XIQueryDevicePointer(). The function seems to do what its supposed to and 
gives me the pointer coordinates, but as soon as I call it again or another 
function like XCloseDisplay() I get an error like this:

XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0
      after 13 requests (12 known processed) with 0 events remaining.

This is the code I used to query the virtual core pointer:
------------------------------------------------
int pointer = 2; // virtual core
int rx,ry,wx,wy;
unsigned int mask = 0;
Window root_return = 0, unused_window = 0;
Display *dpy = XOpenDisplay(NULL);
Window  root = DefaultRootWindow(dpy);
[...query version for XI2...]
query_return = 
XIQueryDevicePointer(dpy,pointer,root,&root_return,&unused_window,&rx,&ry,&wx,&wy,&mask);
[...print output...]
XCloseDisplay(dpy);
------------------------------------------------

Is this a bug or am I using the function incorrectly?  (I am fairly new to X 
programming).

Thanks in advance for any help.

-- 
Mark 


More information about the xorg-devel mailing list