From fb1018a034c50f535c49ed9393486048722810de Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 25 Feb 2014 22:13:56 +0000 Subject: [PATCH] Better GL context scale change detection. --- modules/juce_opengl/opengl/juce_OpenGLContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index da59187d88..916e6a6fb0 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -141,7 +141,7 @@ public: { ScopedPointer mmLock; - const Rectangle screenBounds (component.getTopLevelComponent()->getBounds()); + const Rectangle screenBounds (component.getTopLevelComponent()->getScreenBounds()); if (lastScreenBounds != screenBounds) updateViewportSize (false); @@ -195,7 +195,7 @@ public: { if (ComponentPeer* peer = component.getPeer()) { - lastScreenBounds = component.getTopLevelComponent()->getBounds(); + lastScreenBounds = component.getTopLevelComponent()->getScreenBounds(); const double newScale = Desktop::getInstance().getDisplays() .getDisplayContaining (lastScreenBounds.getCentre()).scale;