Hello,
As my paste on irc lisp, did not have any answer, I turning again to
this more specialized mailing list.
I have this MClim problem. The application runs fine on
Linux with SBCL 1.0.13, xorg-x11-server 1.3.0.0-9.fc7,
a recent version of MClim.
But doesn't on my Mac (Darwin PowerPC) with MacOS 10.5 (leopard),
SBCL 1.0.16, cvs version of MClim,
Xquartz 2.1.5 - (xorg-server 1.3.0-apple22)(2.1.5).
I have tried to create the smallest as possible
application where the problems occurs (attached).
Just compile the file and launch mini::(start)
On Linux, I have the desired behaviour:
a circle blinks (red/green/red/...) on the display pane
and at the bottom of the window application, the "quit"
button is displayed and works.
On the Mac, the circle blinks correctly but the "Quit"
button never shows up.
For a while the application is killable with C-c C-c
(under Slime), but after a while there is no way
to kill it than to stop Lisp and restart everything
(even /the/
<http://www.lispworks.com/reference/HyperSpec/Body/s_the.htm> X server).
Note that this application used to work on Mac OS 10.3 (Panther)
with older versions of everything.
I suspect the X server to behave differently from before.
But now I don't see how to make the application work.
This is too bad, as I usually use a similar application
for my Lisp undergraduate course.
If anyone has an idea, it will be welcomed.
Irène
(defpackage :mini
(:use :clim :clim-extensions :clim-lisp))
(in-package :mini)
(let ((colors (list +red+ +green+)))
(setf colors (nconc colors colors))
(defun display-function (frame pane)
(draw-circle* pane 10 10 10 :ink (pop colors))
(sleep 0.5)
(redisplay-frame-panes frame)))
(defun quit ()
(frame-exit *application-frame*))
(define-application-frame mini ()
()
(:panes
(display :application
:display-function 'display-function
:incremental-redisplay t)
(quit
:push-button
:label "Quit"
:activate-callback (lambda (x)
(declare (ignore x))
(quit))))
(:layouts
(defaults (vertically () display quit))))
(defun run-test (name)
(loop for port in climi::*all-ports*
do (destroy-port port))
(setq climi::*all-ports* nil)
(let ((frame (make-application-frame name)))
(run-frame-top-level frame)))
(defun start ()
(run-test 'mini)
0)
(defmethod run-frame-top-level :before ((mini mini) &key)
(let* ((frame-manager (frame-manager *application-frame*))
(port (climi::frame-manager-port frame-manager))
(display (clim-clx::clx-port-display port)))
(setf (xlib:display-after-function display)
g#'xlib:display-force-output)))