mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 16:51:46 +00:00
Make the context menu event fire into Gecko successfully. NPOB.
This commit is contained in:
parent
742fee1d28
commit
cd813d1cd0
@ -1734,8 +1734,18 @@ nsChildView::GetQuickDrawPort()
|
||||
|
||||
-(NSMenu*)menuForEvent:(NSEvent*)theEvent
|
||||
{
|
||||
// XXX Fire the context menu event into Gecko.
|
||||
// Fire the context menu event into Gecko.
|
||||
nsMouseEvent geckoEvent;
|
||||
geckoEvent.eventStructType = NS_MOUSE_EVENT;
|
||||
[self convert:theEvent message:NS_CONTEXTMENU toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.clickCount = 0;
|
||||
|
||||
// send event into Gecko by going directly to the
|
||||
// the widget.
|
||||
PRBool result = mGeckoChild->DispatchMouseEvent(geckoEvent);
|
||||
|
||||
printf("The result is: %d\n");
|
||||
|
||||
// XXX If we don't get an ignore status, then we now need to go up our
|
||||
// view chain and ask for a menu to return.
|
||||
return nil;
|
||||
|
Loading…
x
Reference in New Issue
Block a user