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

Re: Mouse grabs



On Mar  5, Robby Findler wrote:
> Matthew writes:
> > Perhaps the solution is to be able to queue an event for the
> > window at a particular (global) location. Then, to implement
> > drag-and-drop, you can queue an event for the window at the
> > location where the mouse button is released.
> 
> This only seems like one of the pieces of drag and drop. I think
> that you would also need some way to take a global x,y coordinate
> and map that to a window (which might not be in the frontmost
> frame). Also, you'd need a way to draw over arbitrary stuff on the
> screen, so you can see the thing dragging along over various
> controls and menus and the background (you could cheat and just make
> a different cursor icon for the that, like Outlook Express under
> Windows does, but more is possible, at least on the mac).

This is sort of what I thought should work - something like getting
whatever object (canvas) would get an event if the mouse wasn't
grabbed, and that should be enough since you could do whatever you
want with it like changing cursors.  -- Event simulating a non-grab by
just sending any events after a click to the appropriate container,
so, if the're is no [mred] window under the cursor, the original
grabber have to deal with a release event.

[By "thought should work" I mean that I actually tried doing this, but
it looks like event messages is something that cannot be sent in a
normal way.]

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
         http://www.cs.cornell.edu/eli/meaning.html        Maze is Life!