mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
* 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:
parent
640612f030
commit
9e50ac657d
2 changed files with 14 additions and 23 deletions
|
@ -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:):
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue