diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib index bf682d70f..86c2853db 100644 --- a/macosx/English.lproj/MainMenu.nib/info.nib +++ b/macosx/English.lproj/MainMenu.nib/info.nib @@ -31,8 +31,8 @@ 3 IBOpenObjects - 21 29 + 21 IBSystem Version 8J135 diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib index 424b071c7..41fc85e5d 100644 Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/macosx/MenuButton.m b/macosx/MenuButton.m index f8b4b63ca..9e94044e4 100644 --- a/macosx/MenuButton.m +++ b/macosx/MenuButton.m @@ -31,15 +31,21 @@ NSImage * image = [self image]; [self setImage: [self alternateImage]]; + //approximate height of menu...alright for now + /*float menuHeight = ((float)[[self menu] numberOfItems] + 2.0) * [NSMenuView menuBarHeight]; + BOOL moveToTop = menuHeight > [[self window] frame].origin.y;*/ + + NSPoint point = NSMakePoint(3.0, /*moveToTop ? [self frame].size.height + menuHeight :*/ -2.0); + NSEvent * newEvent= [NSEvent mouseEventWithType: [event type] - location: NSMakePoint(3, -2) - modifierFlags: [event modifierFlags] - timestamp: [event timestamp] - windowNumber: [event windowNumber] - context: [event context] - eventNumber: [event eventNumber] - clickCount: [event clickCount] - pressure: [event pressure]]; + location: point + modifierFlags: [event modifierFlags] + timestamp: [event timestamp] + windowNumber: [event windowNumber] + context: [event context] + eventNumber: [event eventNumber] + clickCount: [event clickCount] + pressure: [event pressure]]; [NSMenu popUpContextMenu: [self menu] withEvent: newEvent forView: self];