Fix implementation of X-GRAPHICS/DISCARD-EVENTS.
authorChris Hanson <org/chris-hanson/cph>
Tue, 22 Sep 1992 22:42:14 +0000 (22:42 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 22 Sep 1992 22:42:14 +0000 (22:42 +0000)
v7/src/runtime/x11graph.scm

index 65a8f7e8aed15e562a34043892d59640a74f8683..3ecd1874b0b404fbb3190e00e6f914ad43778454 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: x11graph.scm,v 1.24 1992/09/18 19:05:15 cph Exp $
+$Id: x11graph.scm,v 1.25 1992/09/22 22:42:14 cph Exp $
 
 Copyright (c) 1989-92 Massachusetts Institute of Technology
 
@@ -375,8 +375,14 @@ MIT in each case. |#
      (lambda ()
        (let ((queue (x-display/event-queue display)))
         (let loop ()
-          (if (not (queue-empty? queue))
-              (dequeue! queue)))))
+          (cond ((not (queue-empty? queue))
+                 (dequeue! queue)
+                 (loop))
+                ((x-display-process-events (x-display/xd display) 2)
+                 =>
+                 (lambda (event)
+                   (process-event display event)
+                   (loop)))))))
      (lambda ()
        (unlock-thread-mutex mutex)))))
 \f