From: Chris Hanson Date: Sat, 2 Jun 2001 22:25:38 +0000 (+0000) Subject: Add logic to GET-X-DISPLAY to test for existence of X primitives, and X-Git-Tag: 20090517-FFI~2742 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=47882eab8cfaf72ace51ea407be296f727b1bd3c;p=mit-scheme.git Add logic to GET-X-DISPLAY to test for existence of X primitives, and to make sure that a display variable exists. This is necessary so that Edwin will work on a system that doesn't have X support. --- diff --git a/v7/src/edwin/xterm.scm b/v7/src/edwin/xterm.scm index 6d7f5cce3..afb1ed637 100644 --- a/v7/src/edwin/xterm.scm +++ b/v7/src/edwin/xterm.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: xterm.scm,v 1.66 2001/03/21 19:25:42 cph Exp $ +;;; $Id: xterm.scm,v 1.67 2001/06/02 22:25:38 cph Exp $ ;;; ;;; Copyright (c) 1989-2001 Massachusetts Institute of Technology ;;; @@ -1324,10 +1324,12 @@ ;; X-OPEN-DISPLAY hangs, uninterruptibly, when the X server is ;; running the login loop of xdm. Can this be fixed? (or x-display-data - (let ((display (x-open-display x-display-name))) - (set! x-display-data display) - (set! x-display-events (make-queue)) - display))) + (and (implemented-primitive-procedure? x-open-display) + (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 '())