summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-11 10:47:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-11 10:49:10 +0000
commit3e81a9cbd68344450a6e82130edfef21dd04ec43 (patch)
tree687fbfa8aac956e101f4b25a887aca76a4236ca4 /tools
parent922a8bab89c1a5970db61670aaee21e827652bc2 (diff)
intel-virtual-output: Avoid the infinite loop around XPending
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtual.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/virtual.c b/tools/virtual.c
index 48fe3478..4da83099 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1357,9 +1357,7 @@ static int clone_paint(struct clone *c)
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;