From 5b6c58688b047935e57db8397ece940f3ab69228 Mon Sep 17 00:00:00 2001 From: "peterlubczynski%netscape.com" Date: Sat, 14 Jul 2001 01:01:34 +0000 Subject: [PATCH] Fixing key and context menu events for full-page plugins on Mac bug 84681 r=bnesse sr=blizzard --- modules/plugin/base/src/nsPluginViewer.cpp | 4 +++- modules/plugin/nglsrc/nsPluginViewer.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/plugin/base/src/nsPluginViewer.cpp b/modules/plugin/base/src/nsPluginViewer.cpp index dc0bece0ca1c..b667c3be9a7e 100644 --- a/modules/plugin/base/src/nsPluginViewer.cpp +++ b/modules/plugin/base/src/nsPluginViewer.cpp @@ -1154,7 +1154,9 @@ nsEventStatus pluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent) #ifdef XP_MAC //if (mWidget != NULL) { // check for null mWidget EventRecord* event = (EventRecord*)anEvent.nativeMsg; - if (event == NULL || event->what == nullEvent) { + if (event == NULL || event->what == nullEvent || + anEvent.message == NS_KEY_PRESS || + anEvent.message == NS_CONTEXTMENU_MESSAGE_START) { EventRecord macEvent; GUItoMacEvent(anEvent, macEvent); event = &macEvent; diff --git a/modules/plugin/nglsrc/nsPluginViewer.cpp b/modules/plugin/nglsrc/nsPluginViewer.cpp index dc0bece0ca1c..b667c3be9a7e 100644 --- a/modules/plugin/nglsrc/nsPluginViewer.cpp +++ b/modules/plugin/nglsrc/nsPluginViewer.cpp @@ -1154,7 +1154,9 @@ nsEventStatus pluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent) #ifdef XP_MAC //if (mWidget != NULL) { // check for null mWidget EventRecord* event = (EventRecord*)anEvent.nativeMsg; - if (event == NULL || event->what == nullEvent) { + if (event == NULL || event->what == nullEvent || + anEvent.message == NS_KEY_PRESS || + anEvent.message == NS_CONTEXTMENU_MESSAGE_START) { EventRecord macEvent; GUItoMacEvent(anEvent, macEvent); event = &macEvent;