2003-10-16 Adam Fedor * Source/NSApplication.m (-changeWindowsItem:title:filename:): Use deminiaturize to get the window back. * Source/NSWindow.m (-deminiaturize:): Don't order out the miniwindow since it should be ordered out automatically. Fixes PR #5849. Index: Source/NSApplication.m =================================================================== RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSApplication.m,v retrieving revision 1.251 diff -u -r1.251 NSApplication.m --- Source/NSApplication.m 21 Sep 2003 02:27:50 -0000 1.251 +++ Source/NSApplication.m 16 Oct 2003 21:38:08 -0000 @@ -2137,6 +2137,12 @@ } } +/** Changes the Window menu item associated with aWindow to aString. If no + associated window item exists, one is created. If isFilename is YES, then + aString is assumed to be a filename representation the way + [NSWindow-setTitleWithRepresentedFilename:] would format it, otherwise + the string is displayed literally in the menu item. + */ - (void) changeWindowsItem: (NSWindow*)aWindow title: (NSString*)aString filename: (BOOL)isFilename @@ -2237,7 +2243,7 @@ i++; } item = [_windows_menu insertItemWithTitle: aString - action: @selector(makeKeyAndOrderFront:) + action: @selector(deminiaturize:) keyEquivalent: @"" atIndex: i]; [item setTarget: aWindow]; Index: Source/NSWindow.m =================================================================== RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSWindow.m,v retrieving revision 1.291 diff -u -r1.291 NSWindow.m --- Source/NSWindow.m 7 Oct 2003 12:34:10 -0000 1.291 +++ Source/NSWindow.m 16 Oct 2003 21:38:12 -0000 @@ -2225,12 +2225,16 @@ if (!_f.is_miniaturized) return; +#if 0 + /* At least with X-Windows, the counterpart is tied to us, so it will + automatically be ordered out when we are deminiaturized */ if (_counterpart != 0) { NSWindow *mini = GSWindowWithNumber(_counterpart); [mini orderOut: self]; } +#endif _f.is_miniaturized = NO; [self makeKeyAndOrderFront: self]; [self _didDeminiaturize: sender];