diff --git a/ChangeLog b/ChangeLog index d21441996..1ba54ecef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-01-09 German Arias + + * 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 * Source/NSMenuView.m (-trackWithEvent:): diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 3d2d4eb1b..893a48fb6 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -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) { diff --git a/Source/NSWindow.m b/Source/NSWindow.m index ed26219b3..960f356d0 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -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];