bugfix for window position constraint

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16546 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-04-26 07:17:24 +00:00
parent 15aab01ceb
commit f4d75d0ffb
2 changed files with 8 additions and 2 deletions

View file

@ -2,6 +2,8 @@
* Source/NSWindow.m: ([setFrameFromString:]) try to adjust sensibly
for changes to screen size.
([constrainFrameRect:toScreen:]) bugfix for positioning when the
window origin is negative.
2003-04-26 Fred Kiefer <FredKiefer@gmx.de>

View file

@ -1625,10 +1625,14 @@ static NSNotificationCenter *nc = nil;
if (difference > 0)
{
frameRect.size.height -= difference;
frameRect.origin.y += difference;
}
if (frameRect.size.height < _minimumSize.height)
/* Ensure that rewsizing doesn't makewindow smaller than minimum */
difference = _minimumSize.height - frameRect.size.height;
if (difference > 0)
{
frameRect.size.height = _minimumSize.height;
frameRect.size.height += difference;
frameRect.origin.y -= difference;
}
}