From af868ff566a900fe42d08c6f87be4c010c28e1b8 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Wed, 5 Jul 2000 23:14:14 +0000 Subject: [PATCH] when passing drag event into gecko, correctly compute offset to child widget. r=damn bug 43405 git-svn-id: svn://10.0.0.236/trunk@73705 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/mac/nsMacEventHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/widget/src/mac/nsMacEventHandler.cpp b/mozilla/widget/src/mac/nsMacEventHandler.cpp index ec19e6010b2..b46d953b6ad 100644 --- a/mozilla/widget/src/mac/nsMacEventHandler.cpp +++ b/mozilla/widget/src/mac/nsMacEventHandler.cpp @@ -507,10 +507,10 @@ PRBool nsMacEventHandler::DragEvent ( unsigned int aMessage, Point aMouseGlobal, nsWindow* widgetHit = mTopLevelWidget->FindWidgetHit(hitPointLocal); if ( widgetHit ) { - // adjust from local coordinates to window coordinates in case the top level widget + // adjust from local coordinates to window coordinates in case the hit widget // isn't at 0, 0 nsRect bounds; - mTopLevelWidget->GetBounds(bounds); + widgetHit->GetBounds(bounds); nsPoint widgetOrigin(bounds.x, bounds.y); widgetHit->LocalToWindowCoordinate(widgetOrigin); widgetHitPoint.MoveBy(-widgetOrigin.x, -widgetOrigin.y);