2017-04-01 Fred Kiefer <FredKiefer@gmx.de>

* Source/NSMenu.m (-displayTransient): Update menu before displaying.
	* Source/NSMenuView.m (-attachSubmenuForItemAtIndex:): Use NSMenu
	display method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@40431 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2017-03-31 22:14:50 +00:00
parent 34bbb5e95d
commit 753415895b
3 changed files with 8 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2017-04-01 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSMenu.m (-displayTransient): Update menu before displaying.
* Source/NSMenuView.m (-attachSubmenuForItemAtIndex:): Use NSMenu
display method.
2017-03-31 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSAttributedString.m: Check for surrogate UTF16

View file

@ -1913,6 +1913,7 @@ static BOOL menuBarVisible = YES;
return;
}
[self update];
if (_menu.needsSizing)
{
[self sizeToFit];

View file

@ -616,11 +616,7 @@ static float menuBarHeight = 0.0;
else
{
NSDebugLLog (@"NSMenu", @"Will open normal: %@", attachableMenu);
// FIXME: Only resize when needed
[attachableMenu sizeToFit];
[[attachableMenu window] setFrameOrigin: [self locationForSubmenu: attachableMenu]];
[_attachedMenu _attachMenu: attachableMenu];
[[attachableMenu window] orderFrontRegardless];
[attachableMenu display];
}
}