diff --git a/mozilla/modules/plugin/samples/default/mac/NullPlugin.cpp b/mozilla/modules/plugin/samples/default/mac/NullPlugin.cpp index acba1cd4805..925ab35e094 100644 --- a/mozilla/modules/plugin/samples/default/mac/NullPlugin.cpp +++ b/mozilla/modules/plugin/samples/default/mac/NullPlugin.cpp @@ -1211,6 +1211,8 @@ void CPlugin::AskAndLoadURL() // is arbitrary since it has nothing to do with the actual // window title shown to the user (itŐs only used internally). // + NPN_PushPopupsEnabledState(fInstance, true); + if (fFileURL != NULL) { (void) NPN_GetURL(fInstance, fFileURL, "_current"); } else if (fPageURL != NULL) { @@ -1225,6 +1227,8 @@ void CPlugin::AskAndLoadURL() NPN_MemFree(pTheURL); } + NPN_PopPopupsEnabledState(fInstance); + fUserInstalledPlugin = true; if (FocusDraw()) { Draw(kUnhilited); diff --git a/mozilla/modules/plugin/samples/default/mac/npmac.cpp b/mozilla/modules/plugin/samples/default/mac/npmac.cpp index a3ea6f22930..f10d0a17b3c 100644 --- a/mozilla/modules/plugin/samples/default/mac/npmac.cpp +++ b/mozilla/modules/plugin/samples/default/mac/npmac.cpp @@ -85,7 +85,7 @@ #if PLUGIN_TRACE #define PLUGINDEBUGSTR(msg) ::DebugStr(msg) #else -#define PLUGINDEBUGSTR +#define PLUGINDEBUGSTR(msg) ((void) 0) #endif @@ -150,6 +150,8 @@ struct { TTVtoFPGlue invalidaterect; TTVtoFPGlue invalidateregion; TTVtoFPGlue forceredraw; + TTVtoFPGlue pushpopupsenabledstate; + TTVtoFPGlue poppopupsenabledstate; } gNetscapeFuncsGlueTable; static void* SetupTVtoFPGlue(TTVtoFPGlue* functionGlue, void* tvp) @@ -369,6 +371,16 @@ void NPN_ForceRedraw(NPP instance) CallNPN_ForceRedrawProc( gNetscapeFuncs.forceredraw, instance); } +void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled) +{ + CallNPN_PushPopupsEnabledStateProc( gNetscapeFuncs.pushpopupsenabledstate, instance, enabled); +} + +void NPN_PopPopupsEnabledState(NPP instance) +{ + CallNPN_PopPopupsEnabledStateProc( gNetscapeFuncs.poppopupsenabledstate, instance); +} + #pragma mark - //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -728,6 +740,8 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, gNetscapeFuncs.invalidaterect = (NPN_InvalidateRectUPP)HOST_TO_PLUGIN_GLUE(invalidaterect, nsTable->invalidaterect); gNetscapeFuncs.invalidateregion = (NPN_InvalidateRegionUPP)HOST_TO_PLUGIN_GLUE(invalidateregion, nsTable->invalidateregion); gNetscapeFuncs.forceredraw = (NPN_ForceRedrawUPP)HOST_TO_PLUGIN_GLUE(forceredraw, nsTable->forceredraw); + gNetscapeFuncs.pushpopupsenabledstate = (NPN_PushPopupsEnabledStateUPP)HOST_TO_PLUGIN_GLUE(pushpopupsenabledstate, nsTable->pushpopupsenabledstate); + gNetscapeFuncs.poppopupsenabledstate = (NPN_PopPopupsEnabledStateUPP)HOST_TO_PLUGIN_GLUE(poppopupsenabledstate, nsTable->poppopupsenabledstate); // // Set up the plugin function table that Netscape will use to