mshtml: Don't use fire_event to dispatch contextmenu event.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
62e76f1847
commit
6bf1250b82
|
@ -1486,8 +1486,9 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
|
|||
UINT32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode)
|
||||
{
|
||||
NSContainer *This = impl_from_nsIContextMenuListener(iface);
|
||||
nsIDOMMouseEvent *event;
|
||||
nsIDOMMouseEvent *mouse_event;
|
||||
HTMLDOMNode *node;
|
||||
DOMEvent *event;
|
||||
POINT pt;
|
||||
DWORD dwID = CONTEXT_MENU_DEFAULT;
|
||||
nsresult nsres;
|
||||
|
@ -1499,14 +1500,18 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
|
|||
if(FAILED(hres))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
fire_event(This->doc->basedoc.doc_node /* FIXME */, EVENTID_CONTEXTMENU, TRUE, &node->event_target, aEvent);
|
||||
hres = create_event_from_nsevent(aEvent, &event);
|
||||
if(SUCCEEDED(hres)) {
|
||||
fire_event_obj(&node->event_target, event);
|
||||
IDOMEvent_Release(&event->IDOMEvent_iface);
|
||||
}
|
||||
|
||||
nsres = nsIDOMEvent_QueryInterface(aEvent, &IID_nsIDOMMouseEvent, (void**)&event);
|
||||
nsres = nsIDOMEvent_QueryInterface(aEvent, &IID_nsIDOMMouseEvent, (void**)&mouse_event);
|
||||
assert(NS_SUCCEEDED(nsres));
|
||||
|
||||
nsIDOMMouseEvent_GetScreenX(event, &pt.x);
|
||||
nsIDOMMouseEvent_GetScreenY(event, &pt.y);
|
||||
nsIDOMMouseEvent_Release(event);
|
||||
nsIDOMMouseEvent_GetScreenX(mouse_event, &pt.x);
|
||||
nsIDOMMouseEvent_GetScreenY(mouse_event, &pt.y);
|
||||
nsIDOMMouseEvent_Release(mouse_event);
|
||||
|
||||
switch(aContextFlags) {
|
||||
case CONTEXT_NONE:
|
||||
|
|
Loading…
Reference in New Issue