This is intentional. The extra events are sent to help facilitate
situations where you want to scroll the window while dragging. For
example, if you want to drag an item in a tree to another location in
the tree that is not visible yet.
--
Robin Dunn
Software Craftsman
http://wxPython.org
This is the only problem here. See below.
> furthermore, I get events fired even
> when the mouse is stationary:
This is the way it is supposed to work. Doing it this way means that
you don't need to jiggle the mouse to make the drop target scroll some more.
> I understand the utility of CaptureMouse firing events to allow
> scrolling, but this escapes me. I've looked in scrlwing.cpp and
> see where wxAutoScrollTimer::Notify finds the top-most parent:
> while ( parentTop->GetParent() )
> parentTop = parentTop->GetParent();
>
> I would comment out those lines and also add a check that mouse
> has moved since the last call.
The problem that code is trying to solve (incorrectly IMO) is that the
mouse position used for the generated motion event is relative to the
screen, so it is trying to convert it to be relative to the window.
However it appears to be doing it incorrectly, simply adjusting by the
TLW's position. I thing that it instead should be using
m_win->ScreenToClient and not bother using the TLW parent at all...
Please create a trac ticket about this and we'll see what other wx-devs
think.