From db57a69eba8cf4c7d79975994acaf88c0c0b6c0b Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Tue, 19 Feb 2008 01:51:51 +0000 Subject: [PATCH] backing out 417124, unit test failure. git-svn-id: svn://10.0.0.236/trunk@245938 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/cocoa/nsCocoaWindow.mm | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/mozilla/widget/src/cocoa/nsCocoaWindow.mm b/mozilla/widget/src/cocoa/nsCocoaWindow.mm index 7531bc04743..ebbee8db47e 100644 --- a/mozilla/widget/src/cocoa/nsCocoaWindow.mm +++ b/mozilla/widget/src/cocoa/nsCocoaWindow.mm @@ -413,7 +413,7 @@ nsresult nsCocoaWindow::StandardCreate(nsIWidget *aParent, } else { mWindow = (NSWindow*)aNativeWindow; - mVisible = [mWindow isVisible]; + mVisible = PR_TRUE; } return NS_OK; @@ -509,9 +509,6 @@ NS_IMETHODIMP nsCocoaWindow::SetModal(PRBool aState) // Hide or show this window NS_IMETHODIMP nsCocoaWindow::Show(PRBool bState) { - if (mVisible == bState) - return NS_OK; - nsIWidget* parentWidget = mParent; nsCOMPtr piParentWidget(do_QueryInterface(parentWidget)); NSWindow* nativeParentWindow = (parentWidget) ? @@ -681,22 +678,8 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool bState) // the NSApplication class (in header files generated using class-dump). // This workaround was "borrowed" from the Java Embedding Plugin (which // uses it for a different purpose). - if (mWindowType == eWindowType_popup) { + if (mWindowType == eWindowType_popup) [NSApp _removeWindowFromCache:mWindow]; - // Apple's focus ring APIs sometimes clip themselves when they draw under - // other windows. Redraw the window that was likely under the popup to - // get focus rings to draw correctly. Sometimes the window is not properly - // the parent of the popup, so we can't just tell the parent to redraw. - // We only have this problem on 10.4. See bug 417124. - if (!nsToolkit::OnLeopardOrLater()) { - NSWindow* keyWindow = [NSApp keyWindow]; - if (keyWindow) - [keyWindow display]; - NSWindow* mainWindow = [NSApp mainWindow]; - if (mainWindow && mainWindow != keyWindow) - [mainWindow display]; - } - } // it's very important to turn off mouse moved events when hiding a window, otherwise // the windows' tracking rects will interfere with each other. (bug 356528)