diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 1de44a1bd..6eb00e212 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -1677,7 +1677,7 @@ - (NSModalSession) beginModalSessionForWindow: (NSWindow*)theWindow [theWindow center]; [theWindow setLevel: NSModalPanelWindowLevel]; } - [theWindow orderFrontRegardless]; + if ([self isActive] == YES) { if ([theWindow canBecomeKeyWindow] == YES) @@ -1689,6 +1689,7 @@ - (NSModalSession) beginModalSessionForWindow: (NSWindow*)theWindow [theWindow makeMainWindow]; } } + [theWindow orderFrontRegardless]; return theSession; }