Fix hanging issue in _XReply

Assume event queue is empty if another thread is blocking waiting for event.

If one thread was blocking waiting for an event and another thread sent a
reply to the X server, both threads got blocked until an event was

Signed-off-by: Tatu Frisk <>
Signed-off-by: Jose Alarcon <>
4 jobs for thread in 7 minutes and 17 seconds (queued for 17 seconds)