mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
when passing drag event into gecko, correctly compute offset to child widget. r=damn bug 43405
This commit is contained in:
parent
5cf9105b70
commit
d6f1f104b5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user