cocoa: avoid another 10.6-only method
Closes PR 11440
This commit is contained in:
parent
7b24eaf58e
commit
584287483b
|
@ -74,7 +74,9 @@
|
|||
;; all other eventspaces and threads. It would be nice to improve
|
||||
;; on this, but it's good enough.
|
||||
(atomically
|
||||
(let ([front (get-front)])
|
||||
(let ([front (get-front)]
|
||||
[parent (and (version-10.6-or-later?)
|
||||
parent)])
|
||||
(when parent
|
||||
(tellv ns beginSheetModalForWindow: (send parent get-cocoa-window)
|
||||
completionHandler: #f))
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
(create-menu "menu")
|
||||
(let ([b (box #f)])
|
||||
(set! popup-box b)
|
||||
(if #t ;; use the 10.5 code, for now
|
||||
(if (not (version-10.6-or-later?))
|
||||
;; For 10.5 and earlier:
|
||||
(let ([p (tell #:type _NSPoint v
|
||||
convertPoint: #:type _NSPoint (make-NSPoint x y)
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
clean-menu-label
|
||||
->wxb
|
||||
->wx
|
||||
old-cocoa?)
|
||||
old-cocoa?
|
||||
version-10.6-or-later?)
|
||||
define-mz)
|
||||
|
||||
(define cocoa-lib (ffi-lib (format "/System/Library/Frameworks/Cocoa.framework/Cocoa")))
|
||||
|
@ -79,6 +80,10 @@
|
|||
(and wxb
|
||||
(weak-box-value wxb)))
|
||||
|
||||
;; FIXME: need a better test:
|
||||
(define old-cocoa? (equal? (path->string (system-library-subpath #f))
|
||||
"ppc-macosx"))
|
||||
(define-appkit NSAppKitVersionNumber _double)
|
||||
|
||||
(define old-cocoa?
|
||||
; earlier than 10.5?
|
||||
(NSAppKitVersionNumber . < . 949))
|
||||
(define (version-10.6-or-later?)
|
||||
(NSAppKitVersionNumber . >= . 1038))
|
||||
|
|
Loading…
Reference in New Issue
Block a user