diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index fe695e54e4..f27ca20b1c 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -241320,7 +241320,7 @@ const Point UIViewComponentPeer::relativePositionToGlobal (const Point const Point UIViewComponentPeer::globalPositionToRelative (const Point& screenPosition) { - return screenPosition + getScreenPosition(); + return screenPosition - getScreenPosition(); } CGRect UIViewComponentPeer::constrainRect (CGRect r) diff --git a/src/native/mac/juce_iphone_UIViewComponentPeer.mm b/src/native/mac/juce_iphone_UIViewComponentPeer.mm index 51cc88f2f8..9ecce2a17e 100644 --- a/src/native/mac/juce_iphone_UIViewComponentPeer.mm +++ b/src/native/mac/juce_iphone_UIViewComponentPeer.mm @@ -490,7 +490,7 @@ const Point UIViewComponentPeer::relativePositionToGlobal (const Point const Point UIViewComponentPeer::globalPositionToRelative (const Point& screenPosition) { - return screenPosition + getScreenPosition(); + return screenPosition - getScreenPosition(); } CGRect UIViewComponentPeer::constrainRect (CGRect r)