From 291b40c4ef83b06cb68da684ba3bbcbfea1a4f0d Mon Sep 17 00:00:00 2001
From: fredkiefer
See Also: -applicationIconImage
while ((win = [iter nextObject])) { - if ([win isVisible] == NO) + if ([win isVisible] == NO && ![win isMiniaturized]) { continue; /* Already invisible */ } @@ -2343,9 +2343,14 @@ image.See Also: -applicationIconImage
count = [_hidden count]; for (i = 0; i < count; i++) - { - [[_hidden objectAtIndex: i] orderFrontRegardless]; - } + { + NSWindow *win = [_hidden objectAtIndex: i]; + [win orderFrontRegardless]; + if ([win isMiniaturized]) + { + [GSServerForWindow(win) miniwindow: [win windowNumber]]; + } + } [_hidden removeAllObjects]; [[_app_icon_window contentView] setNeedsDisplay: YES]; diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 88ac81c55..a6e0d7a31 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -1543,6 +1543,12 @@ many times. - (void) makeKeyAndOrderFront: (id)sender { [self deminiaturize: self]; + /* + * If a window is ordered in, make sure that the application isn't hidden, + * and is active. + */ + if ([self canBecomeKeyWindow]) + [NSApp unhide: self]; [self orderFrontRegardless]; [self makeKeyWindow]; /*