[plt-scheme] MrEd: strange mouse-event% behavior

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jul 23 16:31:19 EDT 2004

At Fri, 23 Jul 2004 13:36:09 +0200 (MEST), Tord Svensson wrote:
> 1. A mouse motion event (with dragging = #t) is generated after every
> mouse down even if the mouse haven't been moved.
> Is there a rational behind this behavior or is it perhaps a bug?

Arguably a bug, but I'm going to leave it as-is for now. Generating
motion events is tricky in MrEd's current form for OS X, and a
application should be able to deal with redundant motion events.

> 2. If you change the origin of the dc object associated with the
> component generating the events, the coordinates of the mouse down event
> differs from the mouse-motion and mouse-up event (even if you haven't
> moved the mouse). If set-origin is called with say 50 50, you get the
> following behavior:
> down: 109, 93
> motion: 59, 43 dragging? #t
> up: 59, 43
> That is, the mouse motion and mouse up events take the change of origin
> into account but the mouse down doesn't. This also looks like a bug to me
> but perhaps there is more to it (or have I missed something)?

Definitely a bug, and now fixed in CVS (exp-tagged and v299-tagged). A
canvas event should never be affected by its dc's origin or scaling.


Posted on the users mailing list.