(define x-selection-timeout 5000)
\f
-;;;; Initialization
+;;;; Interrupts
(define reading-event?)
(define signal-interrupts?)
(editor-beep)
(temporary-message "Quit")
(^G-signal))
+\f
+;;;; Initialization
(define x-display-type)
(define x-display-data)
(define x-display-events)
(define x-display-name #f)
+(define (reset-x-display!)
+ (set! x-display-data #f)
+ (set! x-display-events)
+ unspecific)
+
(define (get-x-display)
;; X-OPEN-DISPLAY hangs, uninterruptibly, when the X server is
;; running the login loop of xdm. Can this be fixed?
(or x-display-data
(and (begin
- (load-library-object-file "prx11" #f)
- (implemented-primitive-procedure?
- (ucode-primitive x-open-display 1)))
- (or x-display-name (get-environment-variable "DISPLAY"))
- (let ((display (x-open-display x-display-name)))
- (set! x-display-data display)
- (set! x-display-events (make-queue))
- display))))
+ (load-library-object-file "prx11" #f)
+ (implemented-primitive-procedure?
+ (ucode-primitive x-open-display 1)))
+ (or x-display-name (get-environment-variable "DISPLAY"))
+ (let ((display (x-open-display x-display-name)))
+ (set! x-display-data display)
+ (set! x-display-events (make-queue))
+ display))))
(define (initialize-package!)
(set! screen-list '())
with-editor-interrupts-from-x
with-x-interrupts-enabled
with-x-interrupts-disabled))
- (set! x-display-data #f)
- (set! x-display-events)
+ (reset-x-display!)
+ (add-event-receiver! event:after-restore reset-x-display!)
unspecific)
\ No newline at end of file