From 2e474e64542a36ad129f3b87df7cf2f7e5173337 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Sat, 22 May 2004 19:55:01 +0000 Subject: [PATCH] Bug 243757. Handle cases where this view manager's root view is not an ancestor of the view grabbing the mouse. r+sr=bzbarsky --- view/src/nsViewManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index 2e2d650da64..a818c7d03ff 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -1917,18 +1917,17 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS nsView *parent; parent = baseView; - while (mRootView != parent) { + while (parent) { parent->ConvertToParentCoords(&offset.x, &offset.y); parent = parent->GetParent(); } //Subtract back offset from root of view parent = view; - while (mRootView != parent) { + while (parent) { parent->ConvertFromParentCoords(&offset.x, &offset.y); parent = parent->GetParent(); } - } //Dispatch the event