X-DISPLAY-PROCESS-EVENTS may have the side effect of moving events
from the kernel's pipe buffer into Xlib's queue, in which case after
processing one event there may be more events pending in the queue
but no more I/O pending on the pipe. Before this change we failed to
report these other events in a timely fashion.
Do this both in Edwin's xterm.scm and the runtime's x11graph.scm.
(lambda (mode)
mode
(if (not reading-event?)
- (let ((event (x-display-process-events x-display-data 2)))
- (if event
- (preview-event event)))))))
+ (let loop ()
+ (let ((event (x-display-process-events x-display-data 2)))
+ (if event
+ (begin (preview-event event)
+ (loop)))))))))
unspecific)
(define (wait-for-event interval predicate process-event)
(deregister-io-thread-event registration)
(continuation unspecific))
(lambda ()
- (let ((event
- (x-display-process-events (x-display/xd display)
- 2)))
- (if event
- (process-event display event))))))))))
+ (let loop ()
+ (let ((event
+ (x-display-process-events (x-display/xd display)
+ 2)))
+ (if event
+ (begin (process-event display event)
+ (loop))))))))))))
registration))
(define (read-event display)