FakeMouseMoveGenerator resulting in wrong mouse enter/exit events

We’re opening two instances of one of our plugins on macOS.

Hovering the mouse over a component of the non-selected plugin results in a mouse enter and mouse exit for each tiny move, even if we’re not crossing any component borders. Since our plugin updates some components on entering or leaving, some component flickering occurs due to the extra mouse enter/exit events.

I guess juce::MouseInputSource::setComponentUnderMouse is called with different components since both plugin instances share one instance of juce::MouseInputSource.

Method setComponentUnderMouse is called for the actual selected component on each mouse move, even if the mouse is not hovering the actual selected plugin instance.

Also setComponentUnderMouse is called indirectly by the timer of juce::FakeMouseMoveGenerator for each mouse move with the mouse-hovered component of the non-selected plugin instance as parameter.

Since setComponentUnderMousegenerates mouse enter/exit events if the given component has changed, a large amount of extra mouse enter/exit events are sent to both plugin instances.

Is there anything we could do to avoid the unnecessary mouse enter/exit events?

Any idea on this one? Any more input needed, like a screen capture?