summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-01-03 05:28:17 -0800
committerDan Nicholson <dbn.lists@gmail.com>2013-01-19 16:02:27 -0800
commitefe57f92a26b165e96a7acb8f6d32ff4418b7e87 (patch)
treec656e5264089cb619cb3072eeb43b494e2173448
parentef8ade371a764d4fd1c7a5c0bbc7959387acd1fd (diff)
Destroy the GtkPlug when the plugin is destroyed
Previously the GtkPlug was being implicitly destroyed when the EvbpViewer object was destroyed. This worked fine under firefox where the plugin code jumped through hoops to make sure the GtkPlug was disconnected before destroying its GtkSocket, but other browsers may not perform this trick for us.
-rw-r--r--src/evbp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evbp.c b/src/evbp.c
index 3682e9a..d72dfac 100644
--- a/src/evbp.c
+++ b/src/evbp.c
@@ -158,8 +158,12 @@ evbp_new(NPMIMEType pluginType, NPP instance, uint16_t mode,
static NPError
evbp_destroy(NPP instance, NPSavedData **save)
{
+ evbp_priv_t *priv = instance->pdata;
+
g_debug("%s", __func__);
+ if (priv->plug)
+ gtk_widget_destroy(priv->plug);
npn_funcs->memfree(instance->pdata);
instance->pdata = NULL;