diff --git a/ChangeLog b/ChangeLog index a43068275..4392fa2ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-04-10 01:15-EDT Gregory John Casamento + + * Source/NSMenuView.m: In the method + - (void) setWindowFrameForAttachingToRect:... test if the view + is flipped and make the adjustment. + 2009-04-10 00:53-EDT Gregory John Casamento * Source/NSMenuView.m: In the method diff --git a/Source/NSMenuView.m b/Source/NSMenuView.m index 0233c6946..94702d6f1 100644 --- a/Source/NSMenuView.m +++ b/Source/NSMenuView.m @@ -1154,28 +1154,31 @@ static NSMapTable *viewInfo = 0; } // Update position, if needed, using the preferredEdge - if([_attachedMenu _ownedByPopUp]) + if ([_attachedMenu _ownedByPopUp]) { // Per Cocoa documentation, the selected cell should always show up // over the button for popups. For pull down menus, the preferred // edge is relevant. This is also apparent from testing under Cocoa. - if([[_attachedMenu _owningPopUp] pullsDown]) + if ([[_attachedMenu _owningPopUp] pullsDown]) { - if (edge == NSMinYEdge) + // Handle the Y edge... + if ([[[_attachedMenu _owningPopUp] controlView] isFlipped]) { - /* - if ([_attachedMenu _ownedByPopUp] && - ([[_attachedMenu _owningPopUp] pullsDown])) + if (edge == NSMaxYEdge) { - screenFrame.origin.y -= screenRect.size.height; + screenFrame.origin.y += screenRect.size.height; } - */ } - else if (edge == NSMaxYEdge) + else { - screenFrame.origin.y += screenRect.size.height; + if (edge == NSMinYEdge) + { + screenFrame.origin.y += screenRect.size.height; + } } - else if (edge == NSMaxXEdge) + + // Handle the X edge... + if (edge == NSMaxXEdge) { screenFrame.origin.x += screenRect.size.width; }