1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Component: Ensure component position does not change when removed and re-added to desktop

This commit is contained in:
reuk 2021-05-12 11:49:24 +01:00
parent 47c7751750
commit 668f16f0ec
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -634,7 +634,8 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo)
jmax (1, getHeight()));
#endif
auto topLeft = getScreenPosition();
const auto unscaledPosition = ScalingHelpers::scaledScreenPosToUnscaled (getScreenPosition());
const auto topLeft = ScalingHelpers::unscaledScreenPosToScaled (*this, unscaledPosition);
bool wasFullscreen = false;
bool wasMinimised = false;