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;