Origin of mouse wheel move


#1

Hi,

I have various Components that do receive mouse wheel move notifications.

At least Apples MightyMouse under OSX sends a continous stream of notifications after a fast virtual mouse wheel move. Thats OK and works as expected.

But when the mouse wheel moves are initiated in one Component and the mouse itself is moved into another Component before the stream of notifications has been finished the second Component receives the rest of the notifications.

I would consider this as a bug - but maybe I don't see the use case for this.

Anyway,  how can I detect that mouse wheel move started over a different Component? Or would it be possible to reset the mouse wheel move stream when the mouse enters and/or leaves a Component. Or what would be the right approach?

(The MouseEvent.eventComponent and the MouseEvent.originalComponent don't give any hints about the mouse wheel move originating Component.)

Thanks for any hints or thoughts, cheers,

raketa


#2

grep getMouseWheelMoveCounter in juce_TooltipWindow.cpp

Rail


#3

I see what you mean... I've no idea how we could change that behaviour though, since AFAIK OSX just keeps delivering those wheel messages with the current mouse position, so there's no way to know that they should be sent to the original component (?)


#4

Maybe you could detect that the wheel event are fake inertial events and send them to the last component that has received a "true" (not inertial) wheel event . Those events have the momentumPhase property != 0


#5

Ah - ok, if there's a flag then it might well be possible..


#6

FYI I've added a flag to MouseWheelEvent now that says whether it's an inertial event.