diff options
-rw-r--r-- | macosx/tkMacOSXWm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 9501c85..dca8686 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -3805,10 +3805,6 @@ WmWithdrawCmd( TkpWmSetState(winPtr, WithdrawnState); - NSWindow *win = TkMacOSXDrawableWindow(winPtr->window); - [win orderOut:NSApp]; - [win setExcludedFromWindowsMenu:YES]; - /* * If this window has a transient, the transient must also be withdrawn. */ @@ -6413,6 +6409,7 @@ TkpWmSetState( if (state == WithdrawnState) { Tk_UnmapWindow((Tk_Window) winPtr); } else if (state == IconicState) { + /* * The window always gets unmapped. If we can show the icon version of * the window we also collapse it. @@ -6425,9 +6422,13 @@ TkpWmSetState( Tk_UnmapWindow((Tk_Window) winPtr); } else if (state == NormalState || state == ZoomState) { Tk_MapWindow((Tk_Window) winPtr); - if (macWin && ([macWin styleMask] & NSMiniaturizableWindowMask) && - [macWin isMiniaturized]) { - [macWin deminiaturize:NSApp]; + if (macWin && ([macWin styleMask] & NSMiniaturizableWindowMask)) { + if ([macWin isMiniaturized]) { + [macWin deminiaturize:NSApp]; + } + else { + [macWin orderFront:nil]; + } } TkMacOSXZoomToplevel(macWin, state == NormalState ? inZoomIn : inZoomOut); |