Be slightly more cautious with XQueryPointer().

Probably not really necessary, but can't hurt.
Ignore some uninteresting X events.