From c5fbeb859dd174384261889ee0e79d911eaa81c7 Mon Sep 17 00:00:00 2001 From: Anthony Nicholls Date: Mon, 30 Oct 2023 18:01:34 +0000 Subject: [PATCH] Component: Improve the accuracy of the relative mouse position --- modules/juce_gui_basics/components/juce_Component.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 865d6408f2..def4007d27 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -2871,7 +2871,7 @@ bool JUCE_CALLTYPE Component::isMouseButtonDownAnywhere() noexcept Point Component::getMouseXYRelative() const { - return getLocalPoint (nullptr, Desktop::getMousePosition()); + return getLocalPoint (nullptr, Desktop::getMousePositionFloat()).roundToInt(); } //==============================================================================