зеркало из https://github.com/mozilla/gecko-dev.git
correctly trigger the sending of mouse_exit events when the mouse moves into the growBox. fixes a bug with gfx scrollbars in bookmarks when the window was resized. (r=sfraser, no explicit bug number).
This commit is contained in:
Родитель
4580cd61fd
Коммит
ee816c9ef0
|
@ -1195,18 +1195,23 @@ void nsMacEventHandler::ConvertOSEventToMouseEvent(
|
|||
}
|
||||
}
|
||||
|
||||
if (! widgetHit)
|
||||
widgetHit = mTopLevelWidget->FindWidgetHit(hitPoint);
|
||||
|
||||
if (widgetHit)
|
||||
{
|
||||
nsRect bounds;
|
||||
widgetHit->GetBounds(bounds);
|
||||
nsPoint widgetOrigin(bounds.x, bounds.y);
|
||||
widgetHit->LocalToWindowCoordinate(widgetOrigin);
|
||||
widgetHitPoint.MoveBy(-widgetOrigin.x, -widgetOrigin.y);
|
||||
// if the mouse is in the grow box, pretend like it has left the window
|
||||
WindowPtr ignored = nsnull;
|
||||
short partCode = ::FindWindow ( aOSEvent.where, &ignored );
|
||||
if ( partCode != inGrow ) {
|
||||
if (! widgetHit)
|
||||
widgetHit = mTopLevelWidget->FindWidgetHit(hitPoint);
|
||||
|
||||
if (widgetHit)
|
||||
{
|
||||
nsRect bounds;
|
||||
widgetHit->GetBounds(bounds);
|
||||
nsPoint widgetOrigin(bounds.x, bounds.y);
|
||||
widgetHit->LocalToWindowCoordinate(widgetOrigin);
|
||||
widgetHitPoint.MoveBy(-widgetOrigin.x, -widgetOrigin.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// nsEvent
|
||||
aMouseEvent.eventStructType = NS_MOUSE_EVENT;
|
||||
aMouseEvent.message = aMessage;
|
||||
|
|
Загрузка…
Ссылка в новой задаче