xf86-video-intel: tools/virtual.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Nov 11 02:49:26 PST 2013


 tools/virtual.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 3e81a9cbd68344450a6e82130edfef21dd04ec43
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Nov 11 10:47:24 2013 +0000

    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 at chris-wilson.co.uk>

diff --git a/tools/virtual.c b/tools/virtual.c
index 48fe347..4da8309 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;


More information about the xorg-commit mailing list