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:
pinkerton%netscape.com 1999-10-13 00:06:00 +00:00
Родитель 4580cd61fd
Коммит ee816c9ef0
1 изменённых файлов: 16 добавлений и 11 удалений

Просмотреть файл

@ -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;