diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index a40a95ae7b..79f091e4f6 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -200,7 +200,7 @@ public: void setBounds (const Rectangle& userRect, bool isNowFullScreen) override { - Rectangle r = userRect * scale; + Rectangle r = (userRect.toFloat() * scale).toNearestInt(); if (MessageManager::getInstance()->isThisTheMessageThread()) { @@ -232,10 +232,10 @@ public: Rectangle getBounds() const override { - return Rectangle (view.callIntMethod (ComponentPeerView.getLeft), - view.callIntMethod (ComponentPeerView.getTop), - view.callIntMethod (ComponentPeerView.getWidth), - view.callIntMethod (ComponentPeerView.getHeight)) / scale; + return (Rectangle (view.callIntMethod (ComponentPeerView.getLeft), + view.callIntMethod (ComponentPeerView.getTop), + view.callIntMethod (ComponentPeerView.getWidth), + view.callIntMethod (ComponentPeerView.getHeight)) / scale).toNearestInt(); } void handleScreenSizeChange() override