1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Component: Improve the accuracy of the relative mouse position

This commit is contained in:
Anthony Nicholls 2023-10-30 18:01:34 +00:00
parent 66ad2d861a
commit c5fbeb859d

View file

@ -2871,7 +2871,7 @@ bool JUCE_CALLTYPE Component::isMouseButtonDownAnywhere() noexcept
Point<int> Component::getMouseXYRelative() const
{
return getLocalPoint (nullptr, Desktop::getMousePosition());
return getLocalPoint (nullptr, Desktop::getMousePositionFloat()).roundToInt();
}
//==============================================================================