From d3902fa480f3b9ffc6bfce782a3310df002241c0 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Fri, 10 Nov 2006 00:48:02 +0000 Subject: [PATCH] Only call gtk_window_present on top-level windows. b=330006 r+sr=roc --- widget/src/gtk2/nsWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp index cba89041818..117e8dc5ed7 100644 --- a/widget/src/gtk2/nsWindow.cpp +++ b/widget/src/gtk2/nsWindow.cpp @@ -728,6 +728,9 @@ nsWindow::SetFocus(PRBool aRaise) // Set focus to the window if (gRaiseWindows && aRaise && toplevelWidget && !GTK_WIDGET_HAS_FOCUS(toplevelWidget) && + // If we're really a child of owningWindow + gdk_window_get_parent(mDrawingarea->clip_window) == + owningWindow->mDrawingarea->inner_window && owningWindow->mIsShown && GTK_IS_WINDOW(owningWindow->mShell)) gtk_window_present(GTK_WINDOW(owningWindow->mShell));