Camino only - Bug 495729: Handle minimized windows + Spaces correctly. sr=pink

git-svn-id: svn://10.0.0.236/trunk@257345 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
stuart.morgan%alumni.case.edu 2009-06-02 03:33:59 +00:00
parent 9b0ae3f535
commit c54d25ed9e

View File

@ -994,8 +994,18 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
NSWindow* frontBrowser = [self frontmostBrowserWindow];
if (!frontBrowser)
[self newWindow:self];
else if ([frontBrowser isMiniaturized])
else if ([frontBrowser isMiniaturized]) {
// If the only unminimized windows are in other spaces, Spaces will
// sometimes tell us that the minimized window is frontmost, so make sure
// we aren't in that case (since unminimizing is the wrong behavior).
NSEnumerator* windowEnumerator = [[self browserWindows] objectEnumerator];
NSWindow* window;
while ((window = [windowEnumerator nextObject])) {
if (![window isMiniaturized])
return NO;
}
[frontBrowser deminiaturize:self];
}
return NO;
}