From bf3f09a3c18637b8ebf719f235813c2390ac331e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 8 Oct 2011 16:47:19 -0600 Subject: [PATCH] cocoa: fix `show #f' on already unshown frame shows it briefly Merge to 5.2 --- collects/mred/private/wx/cocoa/frame.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/mred/private/wx/cocoa/frame.rkt b/collects/mred/private/wx/cocoa/frame.rkt index ef26252a88..f16baaf030 100644 --- a/collects/mred/private/wx/cocoa/frame.rkt +++ b/collects/mred/private/wx/cocoa/frame.rkt @@ -324,8 +324,9 @@ (send p set-sheet #f) (tell (tell NSApplication sharedApplication) endSheet: cocoa)))) - (tellv cocoa deminiaturize: #f) - (tellv cocoa orderOut: #f) + (when (is-shown?) ; otherwise, `deminiaturize' can show the window + (tellv cocoa deminiaturize: #f) + (tellv cocoa orderOut: #f)) (force-window-focus))) (register-frame-shown this on?) (let ([num (tell #:type _NSInteger cocoa windowNumber)])