From 479ea0bcb4900ea5bc3400a6be6824dda3f6b97f Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Fri, 11 Jun 2004 07:47:03 +0000 Subject: [PATCH] Port Bug #241187 --> [gtk2]combo box shows up unexpectly due to nsWindow::IsVisible() does not return the right value git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@157760 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/gtk2/nsWindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/widget/src/gtk2/nsWindow.cpp b/mozilla/widget/src/gtk2/nsWindow.cpp index e2d645823e0..40aa65dea2e 100644 --- a/mozilla/widget/src/gtk2/nsWindow.cpp +++ b/mozilla/widget/src/gtk2/nsWindow.cpp @@ -435,6 +435,11 @@ NS_IMETHODIMP nsWindow::IsVisible(PRBool & aState) { aState = mIsVisible; + if(mIsTopLevel && mShell && !GTK_WIDGET_MAPPED(mShell)) { + /* we do not change mIsVisible to PR_FALSE here so we don't bother to + to change it back to PR_TRUE when the mShell is mapped again. */ + aState = PR_FALSE; + } return NS_OK; }