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; }