Update of /project/mcclim/cvsroot/mcclim/Backends/CLX In directory clnet:/tmp/cvs-serv25483
Modified Files: image.lisp port.lisp Log Message: Fix (temporary hack) to use file sockets in CLX on ACL
--- /project/mcclim/cvsroot/mcclim/Backends/CLX/image.lisp 2005/02/21 13:32:49 1.20 +++ /project/mcclim/cvsroot/mcclim/Backends/CLX/image.lisp 2006/03/23 08:45:26 1.21 @@ -18,7 +18,7 @@ ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;;; Boston, MA 02111-1307 USA.
-(defpackage "IMAGE" +(defpackage :image ; (:use #:clim-lisp) (:use :clim-clx :common-lisp) (:export --- /project/mcclim/cvsroot/mcclim/Backends/CLX/port.lisp 2006/03/15 22:56:55 1.121 +++ /project/mcclim/cvsroot/mcclim/Backends/CLX/port.lisp 2006/03/23 08:45:26 1.122 @@ -1412,3 +1412,24 @@ Sending property NIL to target.~%" target) (send-event :target target :property nil)))) (xlib:display-force-output (xlib:window-display requestor)))) + +;;; XXX CLX in ACL doesn't use local sockets, so here's a fix. This is gross +;;; and should obviously be included in Franz' clx and portable clx, but I +;;; believe that enough users will find that their X servers don't listen for +;;; TCP connections that it is worthwhile to include this code here +;;; temporarily. + +#+allegro +(defun xlib::open-x-stream (host display protocol) + (declare (ignore protocol)) ;; Derive from host + (let ((stream (if (or (string= host "") (string= host "unix")) + (socket:make-socket + :address-family :file + :remote-filename (format nil "/tmp/.X11-unix/X~D" display) + :format :binary) + (socket:make-socket :remote-host (string host) + :remote-port (+ *x-tcp-port* display) + :format :binary)))) + (if (streamp stream) + stream + (error "Cannot connect to server: ~A:~D" host display))))