|
Re: Fix for CLX display host problem: msg#00290lisp.cmucl.devel
I wrote: > Some time ago I noticed that CMUCL no longer liked displays of the > form ":0.0". Turns out that there's a simple fix for this. I keep getting fooled by programs that use ext:open-clx-display vs. xlib:open-display. Anyway the patch in my previous message makes ext:open-clx-display work right, but the following is also needed to make xlib:open-display work right. This is simple too. It just makes sure that if the host is "" or "unix" it passes the :unix protocol to open-x-stream as well as get-best-authorization. I've tested the resulting build with both hemlock, which calls ext:open-clx-display, and garnet, which calls xlib:open-display. I tested with DISPLAY set to :0 and to boomerang:0.0 ---------------------------------------- *** src-old/clx/display.lisp Sun Jul 20 08:55:23 2003 --- src/clx/display.lisp Mon Aug 25 20:18:38 2003 *************** *** 326,357 **** ;; Get the authorization mechanism from the environment. Handle the ;; special case of a host name of "" and "unix" which means the ;; protocol is :unix ! (when (null authorization-name) ! (multiple-value-setq (authorization-name authorization-data) ! (get-best-authorization host ! display ! (if (member host '("" "unix") :test #'equal) ! :unix ! protocol)))) ! ;; PROTOCOL is the network protocol (something like :TCP or :UNIX). ! (let* ((stream (open-x-stream host display protocol)) ! (disp (make-buffer *output-buffer-size* #'make-display-internal ! :host host :display display ! :output-stream stream :input-stream stream)) ! (ok-p nil)) ! (unwind-protect ! (progn ! (display-connect disp ! :authorization-name authorization-name ! :authorization-data authorization-data) ! (setf (display-authorization-name disp) authorization-name) ! (setf (display-authorization-data disp) authorization-data) ! (initialize-resource-allocator disp) ! (initialize-predefined-atoms disp) ! (initialize-extensions disp) ! (setq ok-p t)) ! (unless ok-p (close-display disp :abort t))) ! disp)) (defun display-force-output (display) ; Output is normally buffered, this forces any buffered output to the server. --- 326,356 ---- ;; Get the authorization mechanism from the environment. Handle the ;; special case of a host name of "" and "unix" which means the ;; protocol is :unix ! (let ((actual-protocol (if (member host '("" "unix") :test #'equal) ! :unix ! protocol))) ! (when (null authorization-name) ! (multiple-value-setq (authorization-name authorization-data) ! (get-best-authorization host display actual-protocol))) ! ;; PROTOCOL is the network protocol (something like :TCP or :UNIX). ! (let* ((stream (open-x-stream host display actual-protocol)) ! (disp (make-buffer *output-buffer-size* #'make-display-internal ! :host host :display display ! :output-stream stream :input-stream stream)) ! (ok-p nil)) ! (unwind-protect ! (progn ! (display-connect disp ! :authorization-name authorization-name ! :authorization-data authorization-data) ! (setf (display-authorization-name disp) authorization-name) ! (setf (display-authorization-data disp) authorization-data) ! (initialize-resource-allocator disp) ! (initialize-predefined-atoms disp) ! (initialize-extensions disp) ! (setq ok-p t)) ! (unless ok-p (close-display disp :abort t))) ! disp))) (defun display-force-output (display) ; Output is normally buffered, this forces any buffered output to the server. ---------------------------------------- -- Fred Gilham gilham@xxxxxxxxxxx An ABC camera crew interviewed Hillary Clinton in the Bahamas, where she was sunning herself on a flat rock to keep her body temperature up. "Cookies," she said, eyeing the cameras. "Children." -- Fred Reed |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Fix for CLX display host problem: 00290, Fred Gilham |
|---|---|
| Next by Date: | Re: [HEADS UP} dynamic-extent merged: 00290, Raymond Toy |
| Previous by Thread: | Fix for CLX display host problemi: 00290, Fred Gilham |
| Next by Thread: | Re: Fix for CLX display host problem: 00290, Gerd Moellmann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |