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
parent 9ee98f355e
commit ca494f80d1

View File

@ -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)
{