1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-07 04:10:08 +00:00

ScopedThreadDPIAwarenessSetter: Allow null constructor argument

This commit is contained in:
reuk 2026-01-28 18:54:56 +00:00
parent c2ba24b4d0
commit 40368666db
No known key found for this signature in database

View file

@ -501,7 +501,7 @@ private:
ScopedThreadDPIAwarenessSetter::ScopedThreadDPIAwarenessSetter (void* nativeWindow)
{
pimpl = std::make_unique<NativeImpl> ((HWND) nativeWindow);
pimpl = nativeWindow != nullptr ? std::make_unique<NativeImpl> ((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()