When the mouse cursor is dragged over the bottom edge of a component (in this case a
mouseEnter() is not called for that component as soon as the mouse cursor enters the component’s bounds, but rather when it overlaps by a few pixels.
This is illustrated below, where the left screenshot below shows the mouse entering the component, and the right component shows the position at which
mouseEnter() is called. This is on macOS 10.14.
What is the reason for this behaviour? Is the OS reporting the cursor x, y position as the first pixel within the black part of the cursor? …or is something off with JUCE’s screen position scaling?
In any case, how are people dealing with this? I guess in the case of
DrawableButton, the button can be given an e.g. 3px border to compensate, but this then makes sizing a pain and creates problems if you have adjacent buttons.