diff options
author | culler <culler> | 2020-07-17 22:14:27 (GMT) |
---|---|---|
committer | culler <culler> | 2020-07-17 22:14:27 (GMT) |
commit | 132c939d5ab36c6a55d7bc9e1692fd981c9a88ca (patch) | |
tree | ce3860873345fb03d1731d8ada0aa848ac2778c1 /macosx | |
parent | f6c1908879a22fd92cbcd008c9b05bcae14aab7c (diff) | |
download | tk-132c939d5ab36c6a55d7bc9e1692fd981c9a88ca.zip tk-132c939d5ab36c6a55d7bc9e1692fd981c9a88ca.tar.gz tk-132c939d5ab36c6a55d7bc9e1692fd981c9a88ca.tar.bz2 |
Fix the display artifacts in the (unneeded) withdraw-configure-deiconify cycle.
Diffstat (limited to 'macosx')
-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); |