JUCE
JUCE copied to clipboard
[Bug]: mouseWheelMove called after mouseExit
Detailed steps on how to reproduce the bug
With the code below, when I rapidly scroll the mouse wheel and move the mouse into and out of the component's area, I am able to occasionally observe unexpected sequences like this:
enter
exit
move (isMouseOver=true)
There are two things about this that strike me as buggy:
- It seems that there would be an invariant that isMouseOver only returns true between mouse enter and exit events.
- It seems like mouseMove events should also only occur between mouse enter and exit events.
Am I wrong about how this should be expected to work? Or is this a bug?
void MyComponent::mouseWheelMove(
const juce::MouseEvent&,
const juce::MouseWheelDetails&) {
std::cout << "move isMouseOver=" << isMouseOver(true) << ")\n";
}
void MyComponent::mouseEnter(const juce::MouseEvent&) { std::cout << "enter\n"; }
void MyComponent::mouseExit(const juce::MouseEvent&) { std::cout << "exit\n"; }
What is the expected behaviour?
mouseMove events should only occur between mouseEnter and mouseExit events, and isMouseOver(true) should always return true during a mouseMove event.
(This is all provided that the component isn't subscribed to events for another component, etc. This happens with a very simple example with no bells and whistles. To reproduce, I am not touching any mouse buttons or anything, as I know that dragging has special isMouseOver / exit behavior for good reason.)
Operating systems
Windows
What versions of the operating systems?
11, recent patches
Architectures
x86_64
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
The bug is present on the develop branch
Code of Conduct
- [X] I agree to follow the Code of Conduct