From f91e549e592ab5d9ed1118e5c4d8369a76566a3b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 19 Aug 2015 12:05:47 -0600 Subject: [PATCH] Cocoa: no child-window workaround in 10.10 (to avoid different bug) A GC-icon display is implemented with a child window on OS X. In some OS X version prior to 10.10 (not sure which ones), screen reconfigurations did not move child windows properly relative to parent windows, so all child windows were reset after a screen change. In 10.10, meanwhile, Mission Control can cause screen-change notifications, and adding a child window to a Mission Control-minimized fullscreened window will goes terribly wrong. Fortunately, 10.10 seems to update child-window locations correctly on screen reconfigurations, in which case the old workaround that hits the new bug can be skipped. --- gui-lib/mred/private/wx/cocoa/queue.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui-lib/mred/private/wx/cocoa/queue.rkt b/gui-lib/mred/private/wx/cocoa/queue.rkt index ac45423f..7a8fdbae 100644 --- a/gui-lib/mred/private/wx/cocoa/queue.rkt +++ b/gui-lib/mred/private/wx/cocoa/queue.rkt @@ -93,8 +93,9 @@ (let ([priviledged-custodian ((get-ffi-obj 'scheme_make_custodian #f (_fun _pointer -> _scheme)) #f)]) (parameterize ([current-custodian priviledged-custodian]) (thread (lambda () (sleep 5.0))))) - ;; Also need to reset blit windows, since OS may move them incorrectly: - (fixup-window-locations)] + (unless (version-10.10-or-later?) + ;; Also need to reset blit windows, since OS may move them incorrectly: + (fixup-window-locations))] [-a _void (tryDockToFront: o) (try-dock-to-front)] [-a _void (retrySelfToFront: o)