mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 06:30:38 +00:00
Fixed the behaviour of menu in window when hide the app
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31859 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
90687109f7
commit
bf270ebcfb
3 changed files with 23 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2011-01-09 German Arias <german@xelalug.org>
|
||||
|
||||
* Source/NSApplication.m (-activateIgnoringOtherApps:):
|
||||
If we have menu in window, set a main window when unhide.
|
||||
* Source/NSWindow.m (-resignMainWindow): Close the menu
|
||||
in window if resign main window.
|
||||
|
||||
2011-01-08 German Arias <german@xelalug.org>
|
||||
|
||||
* Source/NSMenuView.m (-trackWithEvent:):
|
||||
|
|
|
@ -1297,6 +1297,14 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
if ([self keyWindow] != nil)
|
||||
{
|
||||
[[self keyWindow] orderFront: self];
|
||||
|
||||
/* If menu is in window, we need a main window, in other way
|
||||
the menu can't respond */
|
||||
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", self) ==
|
||||
NSWindows95InterfaceStyle && [[self keyWindow] canBecomeMainWindow])
|
||||
{
|
||||
[[self keyWindow] becomeMainWindow];
|
||||
}
|
||||
}
|
||||
else if ([self mainWindow] != nil)
|
||||
{
|
||||
|
|
|
@ -1818,6 +1818,14 @@ many times.
|
|||
if (_f.is_main == YES)
|
||||
{
|
||||
_f.is_main = NO;
|
||||
|
||||
//We close the menu if the app will be hide
|
||||
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", self) ==
|
||||
NSWindows95InterfaceStyle)
|
||||
{
|
||||
[[[self menu] attachedMenu] close];
|
||||
}
|
||||
|
||||
if (_f.is_key == YES)
|
||||
{
|
||||
[_wv setInputState: GSTitleBarKey];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue