make sure the port is set correctly before we call ::SetOrigin on mouse events.

This commit is contained in:
pinkerton%netscape.com 1998-12-03 22:05:49 +00:00
parent f069217c85
commit 7c7b712223

View File

@ -380,6 +380,7 @@ void nsMacEventHandler::ConvertOSEventToMouseEvent(
// get the widget hit and its hit point
Point hitPoint = aOSEvent.where;
::SetPort(static_cast<GrafPort*>(mTopLevelWidget->GetNativeData(NS_NATIVE_DISPLAY)));
::SetOrigin(0, 0);
::GlobalToLocal(&hitPoint);
nsPoint widgetHitPoint(hitPoint.h, hitPoint.v);