1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

Fixed a few windowing issues when using global scale factors.

This commit is contained in:
jules 2014-08-08 09:23:01 +01:00
parent 27646a8db0
commit 4af1478dfb
3 changed files with 6 additions and 6 deletions

View file

@ -1045,7 +1045,7 @@ public:
r = Desktop::getInstance().getDisplays().getMainDisplay().userArea;
if (! r.isEmpty())
setBounds (r, shouldBeFullScreen);
setBounds (ScalingHelpers::scaledScreenPosToUnscaled (component, r), shouldBeFullScreen);
component.repaint();
}
@ -1115,9 +1115,9 @@ public:
if (c == &component)
break;
// TODO: needs scaling correctly
if (c->contains (localPos + bounds.getPosition() - c->getScreenPosition()))
return false;
if (ComponentPeer* peer = c->getPeer())
if (peer->contains (localPos + bounds.getPosition() - peer->getBounds().getPosition(), true))
return false;
}
if (trueIfInAChildWindow)

View file

@ -369,7 +369,7 @@ public:
// (can't call the component's setBounds method because that'll reset our fullscreen flag)
if (r != component.getBounds() && ! r.isEmpty())
setBounds (r, shouldBeFullScreen);
setBounds (ScalingHelpers::scaledScreenPosToUnscaled (component, r), shouldBeFullScreen);
}
}
}

View file

@ -763,7 +763,7 @@ public:
ShowWindow (hwnd, SW_SHOWNORMAL);
if (! boundsCopy.isEmpty())
setBounds (boundsCopy, false);
setBounds (ScalingHelpers::scaledScreenPosToUnscaled (component, boundsCopy), false);
}
else
{