x11-screen.scm: Fix DISPLAY test.
authorMatt Birkholz <puck@birchwood-abbey.net>
Sun, 29 May 2016 17:02:40 +0000 (10:02 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Sun, 29 May 2016 17:02:40 +0000 (10:02 -0700)
src/x11-screen/x11-screen.scm

index b5bb4e1ace959aa42944fb180d4d34bff5965561..bc198af52a0cadcf1bae7b92e26272aae9e19e4b 100644 (file)
@@ -1314,7 +1314,10 @@ Otherwise, it is copied from the primary selection."
   ;; 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 (or x-display-name (get-environment-variable "DISPLAY"))
+      (and (or x-display-name
+              (let ((DISPLAY (get-environment-variable "DISPLAY")))
+                (and (string? DISPLAY)
+                     (not (string-null? DISPLAY)))))
           (plugin-available? "x11")
           (begin
             (load-option 'X11)