From 51e6f92feefa0bd66d6797b9cc995577709d2b6e Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Wed, 12 Aug 2009 17:46:44 -0700 Subject: [PATCH] Fix for regression with menus showing up too low in menubar. Reviewed by me. --- AppKit/CPMenu.j | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/AppKit/CPMenu.j b/AppKit/CPMenu.j index 8d6b8c467..70a6f39f9 100644 --- a/AppKit/CPMenu.j +++ b/AppKit/CPMenu.j @@ -1081,7 +1081,7 @@ var STICKY_TIME_INTERVAL = 500, _unconstrainedFrame = CGRectMakeCopy([self frame]); var isBrowser = [CPPlatform isBrowser], - visibleFrame = CGRectInset([isBrowser ? [self platformWindow] : [self screen] visibleFrame], 5.0, 5.0), + visibleFrame = CGRectInset(isBrowser ? [[self platformWindow] contentBounds] : [[self screen] visibleFrame], 5.0, 5.0), constrainedFrame = CGRectIntersection(_unconstrainedFrame, visibleFrame); // We don't want to simply intersect the visible frame and the unconstrained frame. @@ -1165,8 +1165,7 @@ var STICKY_TIME_INTERVAL = 500, if (type === CPPeriodic) { - var constraintContext = [CPPlatform isBrowser] ? [self platformWindow] : [self screen]; - constrainedBounds = CGRectInset([constraintContext visibleFrame], 5.0, 5.0); + var constrainedBounds = CGRectInset([CPPlatform isBrowser] ? [[self platformWindow] contentBounds] : [[self screen] visibleFrame], 5.0, 5.0); if (_scrollingState == _CPMenuWindowScrollingStateUp) {