Fix for bug 157837 -- fix a problem with click-hold scrolling in scrollbars that caused the slightest mouse move to stop the scrolling; patch fixes a coordinate issue that made us think we'd left the widget. r=pinkerton, sr=bryner, a=asa.

This commit is contained in:
sfraser%netscape.com 2002-08-02 00:51:08 +00:00
Родитель d5f399f630
Коммит e1bcd5593e
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -1672,7 +1672,12 @@ PRBool nsMacEventHandler::HandleMouseMoveEvent( EventRecord& aOSEvent )
if (lastWidgetHit)
{
Point macPoint = aOSEvent.where;
::GlobalToLocal(&macPoint);
WindowRef wind = reinterpret_cast<WindowRef>(mTopLevelWidget->GetNativeData(NS_NATIVE_DISPLAY));
nsGraphicsUtils::SafeSetPortWindowPort(wind);
{
StOriginSetter originSetter(wind);
::GlobalToLocal(&macPoint);
}
PRBool inWidgetHit = lastWidgetHit->PointInWidget(macPoint);
if (sMouseInWidgetHit != inWidgetHit)
{