Bug in Component::ComponentHelpers::sendMouseEventToComponentsThatAreBlockedByModal?

Component::ComponentHelpers::sendMouseEventToComponentsThatAreBlockedByModal() is sending the global mouse coordinates to the passed-in function - note the “ms.getScreenPosition” call in the code:

static void sendMouseEventToComponentsThatAreBlockedByModal (Component& modal, Function&& function)
{
for (auto& ms : Desktop::getInstance().getMouseSources())
if (auto* c = ms.getComponentUnderMouse())
if (modalWouldBlockComponent (*c, &modal))
(c->*function) (ms, ms.getScreenPosition(), Time::getCurrentTime());
}

…but the only times it ever apears to get called are to generate calls to Component::internalMouseEnter and Component::internalMouseExit, both of which are expecting a point in relative, rather than global, coordinates. The subsequent calls to Component::mouseEnter and Component::mouseExit will have global coordinates in the passed-in MouseEvent object, in contradiction to the documentation for these functions.

Is this on purpose? I’ve edited this function to convert ms.getScreenPosition to local coordinates:

(c->*function) (ms, c->getLocalPoint(nullptr,ms.getScreenPosition()), Time::getCurrentTime());

… and haven’t detected any ill effects yet, but would hate to inadvertently break stuff.