Lisp HUG Maillist Archive

Errors highlighting pinboard objects with graphics args with redisplay T

More problems with highlighting.  When the highlight-style is :invert
or :standard, and the pinboard-object has :graphics args, providing
:redisplay t to capi:unhighlight-pinboard-object gives an error about
non-numeric argument in (ROUND NIL 1).  As before, I'm on LWM6.0,
Intel.  Am I missing something?  Here's code to reproduce it.

(defun test (&key (redraw-manually nil)
                  (use-graphics-args t))
  (let ((p (make-instance 'capi:pinboard-layout
                          :highlight-style :standard))
        (b (apply 'make-instance 'capi:rectangle
                  :x 25 :y 25
                  :visible-min-width 50
                  :visible-min-height 50
                  (if (not use-graphics-args) '()
                    (list :graphics-args (list :foreground :black
                                               :background :white))))))
    (capi:contain p)
    (capi:manipulate-pinboard p b :add)

    (sleep 2)
    (capi:apply-in-pane-process
     p #'capi:highlight-pinboard-object p b :redisplay t)

    (sleep 2)
    (if redraw-manually
      (capi:apply-in-pane-process
       p #'(lambda ()
             (capi:unhighlight-pinboard-object p b)
             (capi:redraw-pinboard-object b t)))
      (capi:apply-in-pane-process
       p #'capi:unhighlight-pinboard-object p b
       :redisplay t))))

(test :redraw-manually nil :use-graphics-args nil) ; no error
(test :redraw-manually nil :use-graphics-args t)   ; error in (round NIL 1)
(test :redraw-manually t   :use-graphics-args nil) ; no error
(test :redraw-manually t   :use-graphics-args t)   ; no error


Thanks in advance, //JT


Updated at: 2020-12-10 08:40 UTC