diff --git a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp index 5df9d27788..759de12eeb 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp @@ -501,7 +501,7 @@ private: ScopedThreadDPIAwarenessSetter::ScopedThreadDPIAwarenessSetter (void* nativeWindow) { - pimpl = std::make_unique ((HWND) nativeWindow); + pimpl = nativeWindow != nullptr ? std::make_unique ((HWND) nativeWindow) : nullptr; } ScopedThreadDPIAwarenessSetter::~ScopedThreadDPIAwarenessSetter() = default; @@ -4315,6 +4315,7 @@ private: if (! hasMoved) flags |= SWP_NOMOVE; if (! hasResized) flags |= SWP_NOSIZE; + ScopedThreadDPIAwarenessSetter setter { hwnd }; SetWindowPos (hwnd, nullptr, newBounds.getX(), @@ -4324,9 +4325,7 @@ private: flags); if (hasResized && isValidPeer (this)) - { repaintNowIfTransparent(); - } } bool sendInputAttemptWhenModalMessage()