1) Use XIQueryDevice(XIAllMasterDevices) and find all the devices that are XIMasterPointer
2) Remember the current XGetClientPointer(dpy)
2) For each one found, do XSetClientPointer(dpy, pointer, None)
3) Now when we do XFixesGetCursorImage(dpy) we will get the image of the current cursor
4) XSetClientPointer the cursor back to the original one
For multiple cursor support we need to:
1) Use XIQueryDevice( XIAllMasterDevi ces) and find all the devices that are XIMasterPointer er(dpy) er(dpy, pointer, None) Image(dpy) we will get the image of the current cursor
2) Remember the current XGetClientPoint
2) For each one found, do XSetClientPoint
3) Now when we do XFixesGetCursor
4) XSetClientPointer the cursor back to the original one