cocoa: fix frame coordinate system by using initial menu-bar height

original commit: 2e93e0ec14f4a174ca0025b436fd5a07008375a3
This commit is contained in:
Matthew Flatt 2011-05-09 17:27:19 -06:00
parent fd228acf90
commit f55661067a

View File

@ -83,8 +83,11 @@
(and (<= x (NSPoint-x p) (+ x w)) (and (<= x (NSPoint-x p) (+ x w))
(<= (- y h) (NSPoint-y p) y))))))) (<= (- y h) (NSPoint-y p) y)))))))
(define (get-menu-bar-height)
(define initial-menubar-height
(inexact->exact (floor (tell #:type _CGFloat cocoa-mb menuBarHeight)))) (inexact->exact (floor (tell #:type _CGFloat cocoa-mb menuBarHeight))))
(define (get-menu-bar-height)
initial-menubar-height)
(set-menu-bar-hooks! in-menu-bar-range) (set-menu-bar-hooks! in-menu-bar-range)