[Patch 1/2] libXt: Don't reenter the WaitLoop if block==False.

Jeremy Huddleston jeremyhu at freedesktop.org
Wed Feb 18 12:44:23 PST 2009


These two patches are from http://bugs.freedesktop.org/show_bug.cgi?id=20048

They seem right to me, but I wanted some more eyes first.  They're  
both submitted by Stephen Turnbull

---

Don't re-enter the Waitloop if block is false.

Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
Written-by: Stephen Turnbull <stephenjturnbull at gmail.com>

--- src/NextEvent.c.orig	2006-07-12 03:05:55.000000000 +0900
+++ src/NextEvent.c	2009-02-14 17:22:36.000000000 +0900
@@ -722,7 +722,14 @@
  #endif
  	return dpy_no;
      }
-    goto WaitLoop;
+    if (block)
+        goto WaitLoop;
+    else {
+#ifdef USE_POLL
+	XtStackFree ((XtPointer) wf.fdlist, fdlist);
+#endif
+        return -1;
+    }
  }

  #define IeCallProc(ptr) \


More information about the xorg-devel mailing list