[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Drag & Drop Cursor Fix
- To: info-mcl-digest@cambridge.apple.com
- Subject: Drag & Drop Cursor Fix
- From: Shannon V Spires <svspire@somnet.sandia.gov>
- Date: Mon, 9 May 1994 11:50:12 -0600 (MDT)
- Cc: svspire@somnet.sandia.gov (Shannon V Spires)
- In-reply-to: <9405090800.AA02700@cambridge.apple.com> from "info-mcl-digest-request@cambridge.apple.com" at May 9, 94 04:00:03 am
Oliver Steele's drag-&-drop cursor, from the MCL 2.0 CD, is very
handy but it breaks cosmetically in MCL 2.0.1, for the same reason that
cursors break on the AV without the AV cursor patch: with-cursor now won't
work if it's passed a pointer which isn't a handle.
However, the AV patch doesn't fix this particular cursor
problem. Again, this is a problem from the 2.0 CD. I don't know if it's
been fixed on the later CD.
Here's the fix:
[replace the commented section of code in the original source with
the uncommented code]
#| THIS VERSION WON'T WORK WITH MCL 2.0.1 BECAUSE WITH-CURSOR REQUIRES A
HANDLE NOW. -SVS
(advise (:method view-click-event-handler :around (fred-mixin t))
(destructuring-bind (v where) arglist
(if (drag&drop-p v where)
(with-dereferenced-handles ((cursor-ptr *drag&drop-cursor*))
(with-cursor cursor-ptr
(drag&drop-loop v where (option-key-p))))
(:do-it)))
:when :around :name drag&drop)
|#
(advise (:method view-click-event-handler :around (fred-mixin t))
(destructuring-bind (v where) arglist
(if (drag&drop-p v where)
;(with-dereferenced-handles ((cursor-ptr *drag&drop-cursor*))
(with-cursor *drag&drop-cursor* ; CHANGED
(drag&drop-loop v where (option-key-p)))
(:do-it)))
:when :around :name drag&drop)
; End of drag & drop cursor fix.