<div><div>Hi</div><div><br></div><div>I am running a test using X11 and get an error when I run the test in lisp process:</div><div><br></div><div>(use-interface-dir :X11)</div><div><br></div><div>#+darwin </div><div>(open-shared-library "/usr/X11/lib/libX11.dylib")</div>
<div><br></div><div>(defvar *close-app* nil)</div><div><br></div><div>(defun x-test ()</div><div> (setf *close-app* nil)</div><div> (let* ((*display* (with-cstrs ((str ":0.0")) (#_XOpenDisplay str)))</div><div>
<span class="Apple-tab-span" style="white-space:pre"> </span> (*screen* (#_XDefaultScreen *display*))</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (*visual* (#_XDefaultVisual *display* *screen*))</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (*depth* (#_XDefaultDepth *display* *screen*))</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (*root* (#_XDefaultRootWindow *display*))</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (%wm-delete-window% </div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (with-cstrs ((str "WM_DELETE_WINDOW")) </div><div>
<span class="Apple-tab-span" style="white-space:pre"> </span> (#_XInternAtom *display* str 1)))</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (*window* (rlet ((xsetattributes :<XS>et<W>indow<A>ttributes))</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (setf (pref xsetattributes :<XS>et<W>indow<A>ttributes.event_mask) </div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (logior #$ExposureMask))</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (#_XCreateWindow *display* *root*</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> 0 0 300 300 0 *depth* 1 *visual* 2048 xsetattributes))))</div>
<div> (rlet ((prot (:array :unsigned-long 1)))</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (setf (paref prot (:array :unsigned-long 1) 0) %wm-delete-window%)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (#_XSetWMProtocols *display* *window* prot 1))</div>
<div> (#_XMapWindow *display* *window*)</div><div> (rlet ((xev :<XA>ny<E>vent))</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (do () (*close-app*)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (#_XNextEvent *display* xev)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (let ((type (pref xev :<XA>ny<E>vent.type))</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (window (pref xev :<XA>ny<E>vent.window)))</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (if (= type 33) (setf *close-app* t))</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (format t "event: type ~A window ~A~%~%" type window)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (force-output t))))</div><div> (#_XUnmapWindow *display* *window*)</div><div> (#_XCloseDisplay *display*)))</div><div><br></div></div><div>? (x-test)</div>
<div>event: type 12 window 8388609</div><div><br></div><div>event: type 12 window 8388609</div><div><br></div><div>event: type 33 window 8388609</div><div><br></div><div>0</div><div><br></div><div><br></div><div>? (process-run-function (string (gensym "XLOOP-")) #'x-test)</div>
<div>#<PROCESS XLOOP-2357(2) [Active] #x90232D6></div><div>? event: type 12 window 8388609</div><div><br></div><div>event: type 12 window 8388609</div><div><br></div><div>event: type 33 window 8388609</div><div><br>
</div><div>> Error: Fault during read of memory address #xDA</div><div>> While executing: (:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION), in process Initial(0).</div><div><br></div><div><br></div><div>;;;</div><div>;;; #<PROCESS Initial(0) [Active] #x8355D0E> requires access to Shared Terminal Input</div>
<div>;;; Type (:y 0) to yield control to this thread.</div><div>;;;</div><div><br></div><div><br></div><div>Thank you for your help</div><div><br></div><div>Taoufik</div>