[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

macivory color problem



hello,

  i'm having trouble usurping the mouse and having it track a blinker on the color-screen
for the macivory running genera 8.0.  Since the folks at graphics support are unable to 
reproduce the probelm, i was hoping that someone on the net could try the code below and 
report their success or failure to me.  

  The function demo-mouse is a simplified version of our application's basic mouse
handling.  It usurps the mouse, creates a blinker on the color screen, and tries
to have to blinker follow mouse input.  It works fine until it runs into an
imaginary boundary at tv:mouse-x equal to 639 which not coincidentally i think is
the last coordinate of tv:main-screen.  Try as i might, i cannot get tv:mouse-x to
meaningfully increment past that point.

(setf color:color-screen (color:make-color-screen
	   :controller :nuvista
	   :setup :nuvista-32-bit-ntsc*2
	   :width 1024 :height 1000
	   :bits-per-pixel 32
	   :right-margin-size 0
	   :adjust-mouse-offsets t
	   :expose-p t))

;the only tricks for creating the color screen are that :adjust-mouse-offsets must be t
;(according to dave dyer, having this as nil will cause the problems i'm having, but
;setting it to t does not appear to fix it), the width should probably be greater
;than 639.  The nuvista board is the only hardware constraint - the code below works
;fine on our 50's and 70's.

(defun demo-mouse (&optional bl &aux x y dx dy (but 0))
  (tv:with-mouse-usurped
    (unwind-protect			
	(progn
	  (if (not bl) (setf bl (tv:make-blinker color:color-screen
				    'tv:mouse-character-blinker
				    :char #\mouse:nw-arrow)))
	  (send bl :set-visibility t)
	  (loop until (= 2 but) do
	    (when (= 1 but) (break))
	    (multiple-value-setq (x y) (send bl :read-cursorpos))
	    (multiple-value-setq (dx dy but) (tv:wisp-mouse-input t))      
	    (send bl :set-cursorpos (+ x dx) (+ y dy))))
      (send bl :set-visibility nil))))

I would appreciate hearing from anyone who is able to try the demo-mouse function.
Perhaps if someone else can demonstrate this problem, i can get some help from
graphics-support and get this fixed, otherwise perhaps we can find out where i'm
going wrong.

thanks,
steve willis
bruno@u.washington.edu