From 4afe35a3efacc6704286c7f8ec08df9f0cc34346 Mon Sep 17 00:00:00 2001 From: "serge%netscape.com" Date: Sat, 14 Apr 2001 21:07:43 +0000 Subject: [PATCH] #67879 eliminate unix default plugin crash; add puzzle pixmap to unix nullplugin; sr=blizzard r=av git-svn-id: svn://10.0.0.236/trunk@92308 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/plugin/default/unix/Makefile.in | 2 +- mozilla/modules/plugin/default/unix/npshell.c | 9 ++++----- mozilla/modules/plugin/samples/default/unix/Makefile.in | 2 +- mozilla/modules/plugin/samples/default/unix/npshell.c | 9 ++++----- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/mozilla/modules/plugin/default/unix/Makefile.in b/mozilla/modules/plugin/default/unix/Makefile.in index 470e6d86bfd..cfa521e05ae 100644 --- a/mozilla/modules/plugin/default/unix/Makefile.in +++ b/mozilla/modules/plugin/default/unix/Makefile.in @@ -48,7 +48,7 @@ DEFINES += -D_IMPL_NS_PLUGIN include $(topsrcdir)/config/rules.mk -EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \ +EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) -lXt -lXpm \ $(NULL) ifndef MOZ_MONOLITHIC_TOOLKIT diff --git a/mozilla/modules/plugin/default/unix/npshell.c b/mozilla/modules/plugin/default/unix/npshell.c index 0be4e6bd3e8..19b0fb5bda3 100644 --- a/mozilla/modules/plugin/default/unix/npshell.c +++ b/mozilla/modules/plugin/default/unix/npshell.c @@ -152,7 +152,6 @@ NPP_New(NPMIMEType pluginType, return NPERR_NO_ERROR; } - NPError NPP_Destroy(NPP instance, NPSavedData** save) { @@ -165,6 +164,8 @@ NPP_Destroy(NPP instance, NPSavedData** save) This = (PluginInstance*) instance->pdata; if (This != NULL) { + if (This->dialogBox) + destroyWidget(This); if (This->type) NPN_MemFree(This->type); if (This->pluginsPageUrl) @@ -221,10 +222,8 @@ NPP_SetWindow(NPP instance, NPWindow* window) This->visual = ws_info->visual; This->depth = ws_info->depth; This->colormap = ws_info->colormap; - if (This->exists != TRUE) { - This->exists = FALSE; - makeWidget(This); - } + makePixmap(This); + makeWidget(This); } return NPERR_NO_ERROR; } diff --git a/mozilla/modules/plugin/samples/default/unix/Makefile.in b/mozilla/modules/plugin/samples/default/unix/Makefile.in index 470e6d86bfd..cfa521e05ae 100644 --- a/mozilla/modules/plugin/samples/default/unix/Makefile.in +++ b/mozilla/modules/plugin/samples/default/unix/Makefile.in @@ -48,7 +48,7 @@ DEFINES += -D_IMPL_NS_PLUGIN include $(topsrcdir)/config/rules.mk -EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \ +EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) -lXt -lXpm \ $(NULL) ifndef MOZ_MONOLITHIC_TOOLKIT diff --git a/mozilla/modules/plugin/samples/default/unix/npshell.c b/mozilla/modules/plugin/samples/default/unix/npshell.c index 0be4e6bd3e8..19b0fb5bda3 100644 --- a/mozilla/modules/plugin/samples/default/unix/npshell.c +++ b/mozilla/modules/plugin/samples/default/unix/npshell.c @@ -152,7 +152,6 @@ NPP_New(NPMIMEType pluginType, return NPERR_NO_ERROR; } - NPError NPP_Destroy(NPP instance, NPSavedData** save) { @@ -165,6 +164,8 @@ NPP_Destroy(NPP instance, NPSavedData** save) This = (PluginInstance*) instance->pdata; if (This != NULL) { + if (This->dialogBox) + destroyWidget(This); if (This->type) NPN_MemFree(This->type); if (This->pluginsPageUrl) @@ -221,10 +222,8 @@ NPP_SetWindow(NPP instance, NPWindow* window) This->visual = ws_info->visual; This->depth = ws_info->depth; This->colormap = ws_info->colormap; - if (This->exists != TRUE) { - This->exists = FALSE; - makeWidget(This); - } + makePixmap(This); + makeWidget(This); } return NPERR_NO_ERROR; }