[mcclim-cvs] CVS mcclim/Backends/CLX
ahefner
ahefner at common-lisp.net
Thu Jan 17 07:11:16 UTC 2008
Update of /project/mcclim/cvsroot/mcclim/Backends/CLX
In directory clnet:/tmp/cvs-serv10674
Modified Files:
port.lisp
Log Message:
Add a restart around the magic clx server path generator to use the
local display. Somewhat redundant, but the restart provided by assert
is not the friendliest interface, and what value it wants is not
100% obvious.
--- /project/mcclim/cvsroot/mcclim/Backends/CLX/port.lisp 2008/01/14 04:53:11 1.131
+++ /project/mcclim/cvsroot/mcclim/Backends/CLX/port.lisp 2008/01/17 07:11:15 1.132
@@ -167,7 +167,7 @@
(selection-timestamp :initform nil :accessor selection-timestamp)
(font-families :accessor font-families)))
-(defun automagic-clx-server-path ()
+(defun automagic-clx-server-path ()
(let ((name (get-environment-variable "DISPLAY")))
(assert name (name)
"Environment variable DISPLAY is not set")
@@ -198,6 +198,12 @@
:screen-id (or screen 0)
:protocol protocol))))
+(defun helpfully-automagic-clx-server-path ()
+ (restart-case (automagic-clx-server-path)
+ (use-localhost ()
+ :report "Use local unix display"
+ (parse-clx-server-path '(:clx :host "" :protocol :unix)))))
+
(defun parse-clx-server-path (path)
(pop path)
(if path
@@ -206,7 +212,7 @@
:display-id (getf path :display-id 0)
:screen-id (getf path :screen-id 0)
:protocol (getf path :protocol :internet))
- (automagic-clx-server-path)))
+ (helpfully-automagic-clx-server-path)))
(setf (get :x11 :port-type) 'clx-port)
(setf (get :x11 :server-path-parser) 'parse-clx-server-path)
More information about the Mcclim-cvs
mailing list