From 3081203245d1bea21cab477daa9812f6c3e0618e Mon Sep 17 00:00:00 2001 From: "blizzard%redhat.com" Date: Tue, 24 Sep 2002 01:17:19 +0000 Subject: [PATCH] Bug #169094. Regression: " In Composer(edit html),Insert image,link and table not work." Patch from robin.lu@sun.com. Not part of the default build. --- widget/src/gtk2/nsWindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp index 936c3e6b2cd6..0d5c12281971 100644 --- a/widget/src/gtk2/nsWindow.cpp +++ b/widget/src/gtk2/nsWindow.cpp @@ -1216,8 +1216,10 @@ nsWindow::OnButtonPressEvent(GtkWidget *aWidget, GdkEventButton *aEvent) nsEventStatus status; // check to see if we should rollup - gJustGotActivate = PR_TRUE; - SetFocus(PR_FALSE); + if (gJustGotActivate) { + gJustGotActivate = PR_FALSE; + DispatchActivateEvent(); + } if (check_for_rollup(aEvent->window, aEvent->x_root, aEvent->y_root, PR_FALSE)) return; @@ -1299,6 +1301,7 @@ nsWindow::OnContainerFocusOutEvent(GtkWidget *aWidget, GdkEventFocus *aEvent) mFocusChild->LoseFocus(); mFocusChild->DispatchDeactivateEvent(); mFocusChild = nsnull; + gJustGotActivate = PR_TRUE; } }