mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Avoid hitting an assertion when keeping windows onscreen
This commit is contained in:
parent
80d819ccf2
commit
664e08f796
1 changed files with 2 additions and 2 deletions
|
|
@ -809,8 +809,8 @@ void MainWindowList::checkWindowBounds (MainWindow& windowToCheck)
|
|||
if (auto* peer = windowToCheck.getPeer())
|
||||
peer->getFrameSize().subtractFrom (screenLimits);
|
||||
|
||||
auto constrainedX = jlimit (screenLimits.getX(), screenLimits.getRight() - windowBounds.getWidth(), windowBounds.getX());
|
||||
auto constrainedY = jlimit (screenLimits.getY(), screenLimits.getBottom() - windowBounds.getHeight(), windowBounds.getY());
|
||||
auto constrainedX = jlimit (screenLimits.getX(), jmax (screenLimits.getX(), screenLimits.getRight() - windowBounds.getWidth()), windowBounds.getX());
|
||||
auto constrainedY = jlimit (screenLimits.getY(), jmax (screenLimits.getY(), screenLimits.getBottom() - windowBounds.getHeight()), windowBounds.getY());
|
||||
|
||||
Point<int> constrainedTopLeft (constrainedX, constrainedY);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue