From d53207efd511b7994c08f669d5a97ccebf6942ce Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sun, 26 Jul 2009 12:52:24 -0700 Subject: [PATCH] Furhter platform window support. Reviewed by me. --- AppKit/CPWindow/CPWindow.j | 3 +++ AppKit/Platform/CPPlatformWindow.j | 8 ++++++++ 2 files changed, 11 insertions(+) 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)