XPending() reports if there are any events pending and does not perform
any dequeuing itself - ergo for a remote display while (XPending()) ;
becomes an infinite loop should there be an event pending.
References: https://bugs.freedesktop.org/show_bug.cgi?id=71345
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
DisplayString(c->dst.dpy), c->dst.name,
(long)c->dst.serial, (long)LastKnownRequestProcessed(c->dst.dpy)));
if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy)) {
- while (XPending(c->dst.dpy))
- ;
-
+ XPending(c->dst.dpy);
if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy)) {
c->dst.display->skip_clone++;
return EAGAIN;