From c5488e2f097291abfdbf88357255712c0894235e Mon Sep 17 00:00:00 2001 From: Timur Doumler Date: Tue, 2 Feb 2016 14:39:48 +0000 Subject: [PATCH] Fixed a bug on Android where dragging a window around would erroneously increase its size. --- .../juce_gui_basics/native/juce_android_Windowing.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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