* Source/NSMenuView.m (-attachSubmenuForItemAtIndex:): We should

not use [NSMenu display] for NSWindows95InterfaceStyle as there we
	have two NSMenuViews for the NSMenu.
This commit is contained in:
fredkiefer 2017-07-28 19:24:45 +02:00
parent 47c09aaedb
commit e85a1a0664
2 changed files with 20 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2017-07-28 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSMenuView.m (-attachSubmenuForItemAtIndex:): We should
not use [NSMenu display] for NSWindows95InterfaceStyle as there we
have two NSMenuViews for the NSMenu.
2017-07-28 Riccardo Mottola <rm@gnu.org>
* Headers/AppKit/NSRunningApplication.h: We can actually use retain

View file

@ -616,7 +616,20 @@ static float menuBarHeight = 0.0;
else
{
NSDebugLLog (@"NSMenu", @"Will open normal: %@", attachableMenu);
[attachableMenu display];
// Check for the main menu of NSWindows95InterfaceStyle case.
// There we have a separate NSMenuView embedded in the window.
if ([_attachedMenu menuRepresentation] == self)
{
[attachableMenu display];
}
else
{
[attachableMenu update];
[attachableMenu sizeToFit];
[[attachableMenu window] setFrameOrigin: [self locationForSubmenu: attachableMenu]];
[_attachedMenu _attachMenu: attachableMenu];
[[attachableMenu window] orderFrontRegardless];
}
}
}