From 2e93e0ec14f4a174ca0025b436fd5a07008375a3 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 9 May 2011 17:27:19 -0600 Subject: [PATCH] cocoa: fix frame coordinate system by using initial menu-bar height --- collects/mred/private/wx/cocoa/menu-bar.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/collects/mred/private/wx/cocoa/menu-bar.rkt b/collects/mred/private/wx/cocoa/menu-bar.rkt index 3bf8f0f8dd..208be17b40 100644 --- a/collects/mred/private/wx/cocoa/menu-bar.rkt +++ b/collects/mred/private/wx/cocoa/menu-bar.rkt @@ -83,8 +83,11 @@ (and (<= x (NSPoint-x p) (+ x w)) (<= (- y h) (NSPoint-y p) y))))))) -(define (get-menu-bar-height) + +(define initial-menubar-height (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)