mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-31 21:21:08 +00:00
make sure the port is set correctly before we call ::SetOrigin on mouse events.
This commit is contained in:
parent
f069217c85
commit
7c7b712223
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user