[clfswm-devel] Type Error in CLFSWM::ADAPT-CHILD-TO-RECT

Desmond O. Chang dochang at gmail.com
Mon Dec 19 17:14:45 UTC 2011


Hi all,

Did anyone get an error like "-63634 isn't a CARD16." when using
clfswm with clisp/new-clx?

This bug doesn't occur so often.  I made a screenshot [1].

The error is from the SETF sexp in CLFSWM::ADAPT-CHILD-TO-RECT:

  (setf (xlib:drawable-x window) (child-rect-x rect)
        (xlib:drawable-y window) (child-rect-y rect)
        (xlib:drawable-width window) (child-rect-w rect)
        (xlib:drawable-height window) (child-rect-h rect)))

clisp/new-clx [2] requires that the types of the values of
CHILD-RECT-* must be:

 CHILD-RECT-X: INT16
 CHILD-RECT-Y: INT16
 CHILD-RECT-W: CARD16
 CHILD-RECT-H: CARD16

INT16 is (SIGNED-BYTE 16) and CARD16 is (UNSIGNED-BYTE 16) [3].

When CHILD-RECT-W returns -63634 which isn't CARD16, the error will
occur.  To fix this bug, I convert -63634 to 1902, by redefining the
function.  A simple patch is on the branch 'fix-type-error' at [4].

It's just my workaround and should not be merged.  A better solution
may be redefining CHILD-RECT-* or else.


[1] http://i39.tinypic.com/2wrnkvd.jpg

[2] clx.f : line 2618 - 2622

[3] clx.lisp : line 203 & 197

[4] git://github.com/dochang/clfswm.git



Thanks,
Des




More information about the clfswm-devel mailing list