Bug 542068 - Wrong coordinates set on synthesized plugin events. r=josh

This commit is contained in:
Steven Michaud
2010-03-02 10:59:01 -06:00
parent 80814b7927
commit d3b28f393c
3 changed files with 16 additions and 3 deletions

View File

@@ -4270,7 +4270,8 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
#ifndef NP_NO_CARBON
if (eventModel == NPEventModelCarbon) {
Point carbonPt = { ptPx.y + mPluginWindow->y, ptPx.x + mPluginWindow->x };
nsIntPoint geckoScreenCoords = mWidget->WidgetToScreenOffset();
Point carbonPt = { ptPx.y + geckoScreenCoords.y, ptPx.x + geckoScreenCoords.x };
event = &synthCarbonEvent;
InitializeEventRecord(&synthCarbonEvent, &carbonPt);