diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index de1bbe5db2..00cb430432 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -625,13 +625,10 @@ public: } } - RECT r; - GetWindowRect (hwnd, &r); - const Rectangle oldBounds (rectangleFromRECT (r)); - - const bool hasMoved = (oldBounds.getPosition() != newBounds.getPosition()); - const bool hasResized = (oldBounds.getWidth() != newBounds.getWidth() - || oldBounds.getHeight() != newBounds.getHeight()); + const Rectangle oldBounds (getBounds()); + const bool hasMoved = (oldBounds.getPosition() != bounds.getPosition()); + const bool hasResized = (oldBounds.getWidth() != bounds.getWidth() + || oldBounds.getHeight() != bounds.getHeight()); DWORD flags = SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER; if (! hasMoved) flags |= SWP_NOMOVE;