diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 3c0134cb5..b83b7446e 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -626,6 +626,9 @@ CPTexturedBackgroundWindowMask */ - (void)orderFront:(id)aSender { + if (![_platformWindow isVisible]) + [_platformWindow orderFront:self]; + [_platformWindow order:CPWindowAbove window:self relativeTo:nil]; } diff --git a/AppKit/Platform/CPPlatformWindow.j b/AppKit/Platform/CPPlatformWindow.j index 74fecdb4d..d9beb54e6 100644 --- a/AppKit/Platform/CPPlatformWindow.j +++ b/AppKit/Platform/CPPlatformWindow.j @@ -118,6 +118,14 @@ var PlatformWindowClass = NULL; [self setContentRect:[self nativeContentRect]]; } +- (BOOL)isVisible +{ +#if PLATFORM(DOM) + return _DOMWindow !== NULL; +#endif + return NO; +} + @end #if PLATFORM(BROWSER)