[gsharp-devel] Occasional type errors from CLX

Christophe Rhodes csr21 at cam.ac.uk
Mon Jul 26 12:17:55 UTC 2004


Hi,

I'm not certain that this is a uniquely gsharp error... however:

On starting up I sometimes get a type error of the form:
  debugger invoked on a TYPE-ERROR in thread 5361:
    The value #<XLIB:PIXMAP :0 33554506>
    is not of type
      (OR (MEMBER :POINTER-ROOT :NONE) XLIB:WINDOW).
from XLIB:SET-INPUT-FOCUS called, I think, from the (:EXPOSURE
:DISPLAY) clause of McCLIM's CLX backend EVENT-HANDLER.

My suspicion lands on gsharp rather than general McCLIM because of the
following detail in WITH-SCORE-PANE:
(defmacro with-score-pane (pane &body body)
  (let ((pixmap (gensym))
        (mirror (gensym)))
    `(let* ((*pane* ,pane)
            (*lighter-gray-progressions* (lighter-gray-progressions pane))
            (*darker-gray-progressions* (darker-gray-progressions pane))
            (,pixmap (allocate-pixmap *pane* 800 900))
            (,mirror (sheet-direct-mirror *pane*)))
      (draw-rectangle* ,pixmap 0 0 800 900 :filled t :ink +white+)
      (setf (sheet-direct-mirror *pane*) (climi::pixmap-mirror ,pixmap))
      (clear-output-record (stream-output-history *pane*))
      (with-translation (pane 0 900)
        (with-scaling (pane 1 -1)
          , at body))
      (setf (sheet-direct-mirror *pane*) ,mirror)
      (copy-from-pixmap ,pixmap 0 0 800 900 *pane* 0 0)
      (deallocate-pixmap ,pixmap))))
During the body of this, we appear to have set the mirror of *pane* to
something which is a CLX pixmap: which isn't (I guess: I do not speak
from authority here) a window.  Since we're using
climi::pixmap-mirror, my suspicion is that this is a no-no.  I have to
ask, though, what was this for?

Cheers,

Christophe
-- 
http://www-jcsu.jesus.cam.ac.uk/~csr21/       +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%")    (pprint #36rJesusCollegeCambridge)




More information about the gsharp-devel mailing list