* Source/NSWindowController.m (_windowDidLoad:): Pass an NSZeroPoint to

cascadeTopLeftFromPoint: on the first call.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24157 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Matt Rice 2006-11-24 13:58:37 +00:00
parent 640612f030
commit 9e50ac657d
2 changed files with 14 additions and 23 deletions

View file

@ -1,3 +1,8 @@
2006-11-24 Matt Rice <ratmice@gmail.com>
* Source/NSWindowController.m (_windowDidLoad:): Pass an NSZeroPoint to
cascadeTopLeftFromPoint: on the first call.
2006-11-23 Matt Rice <ratmice@gmail.com>
* Source/NSTableView.m (_trackCellAtColumn:row:withEvent:):

View file

@ -401,30 +401,16 @@
if ([self shouldCascadeWindows])
{
static NSPoint nextWindowLocation = { 0.0, 0.0 };
static BOOL firstWindow = YES;
if (firstWindow)
{
NSRect windowFrame = [_window frame];
/* Start with the frame as set */
nextWindowLocation = NSMakePoint (NSMinX (windowFrame),
NSMaxY (windowFrame));
firstWindow = NO;
}
else
{
/*
* cascadeTopLeftFromPoint will "wrap" the point back to the
* top left if the normal cascading will cause the window to go
* off the screen. In Apple's implementation, this wraps to the
* extreme top of the screen, and offset only a small amount
* from the left.
*/
nextWindowLocation
static NSPoint nextWindowLocation = { 0.0, 0.0 };
/*
* cascadeTopLeftFromPoint will "wrap" the point back to the
* top left if the normal cascading will cause the window to go
* off the screen. In Apple's implementation, this wraps to the
* extreme top of the screen, and offset only a small amount
* from the left.
*/
nextWindowLocation
= [_window cascadeTopLeftFromPoint: nextWindowLocation];
}
}
[self windowDidLoad];