Fix for regression with menus showing up too low in menubar.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-08-12 17:46:44 -07:00
1 parent 55a8084b39
commit 7db40a6b0d
1 file changed
+2 -3
+2 -3
View File
@@ -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)
{