From 47882eab8cfaf72ace51ea407be296f727b1bd3c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 2 Jun 2001 22:25:38 +0000 Subject: [PATCH] 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. --- v7/src/edwin/xterm.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 '()) -- 2.25.1