[C++/WIP] CRhinoMouseCallback - spurious MouseMove events

Our C++ plug-in has a complicated way of handling mouse interaction, enabling our users to quickly fair hull shapes without developing RSI/wrist strain. Unfortunately, with the new CRhinoMouseCallback, this needs to be re-implemented from scratch. (it’s probably too much to ask to revert to the old CRhinoMouseCallback, right?)

What I have noticed while trying to figure out the behavior of the new CRhinoMouseCallback is the following:

Click-down:

OnBeginMouseDown
OnMouseDown

Click-up:

OnBeginMouseUp
OnMouseUp
OnBeginMouseMove
OnMouseMove

I have a trackball, so I am certain that the mouse is not moving after the button goes up.

Also, in the first click-down after I change the mouse cursor to another viewport

Click-down:

OnBeginMouseDown
OnMouseDown
OnBeginMouseMove
OnMouseMove

Click-up:

OnBeginMouseUp
OnMouseUp
OnBeginMouseMove
OnMouseMove

The next click-down/click-up in the same viewport does not have extra mouse-move after mouse down, only after mouse-up.

So, more MouseMove events are fired than are actually happening: always after mouse up, and the first time after mouse down when the mouse has entered another viewport.

Yep; this was rewritten to solve problems that a lot of other developers ran into in V5. Are you seeing the same behavior with a mouse? The callbacks are supposed to be hooked up to respond to Windows messages, but there is an awful lot of code in there…

Yes, the same happens with a normal mouse.

I think the new method will also work for our purpose, I already made some progress after I wrote this message, and it seems to be working. Just need to bang away at it some more is all :wink: