x11grab: Check the XQueryPointer return value