diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2012-12-18 21:49:19 -0800 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2013-01-19 16:01:40 -0800 |
commit | ef8ade371a764d4fd1c7a5c0bbc7959387acd1fd (patch) | |
tree | a8609b44b21bf335edaf84c9eff51c6eda204382 /src | |
parent | 927a7422e65e4802a09f113ba95364f8d53a3a45 (diff) |
Keep track of the GtkPlug
This is our toplevel widget and we really need to keep tabs on its
interactions with the embedder.
Diffstat (limited to 'src')
-rw-r--r-- | src/evbp.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -43,6 +43,7 @@ typedef struct evbp_priv { NPP npp; NPWindow *window; + GtkWidget *plug; GtkWidget *viewer; } evbp_priv_t; @@ -149,6 +150,7 @@ evbp_new(NPMIMEType pluginType, NPP instance, uint16_t mode, /* create new viewer */ priv->viewer = evbp_viewer_new(); + gtk_widget_show(priv->viewer); return NPERR_NO_ERROR; } @@ -169,7 +171,6 @@ evbp_set_window(NPP instance, NPWindow *window) { evbp_priv_t *priv = instance->pdata; Window id; - GtkWidget *plug; g_debug("%s", __func__); @@ -184,9 +185,9 @@ evbp_set_window(NPP instance, NPWindow *window) /* Create a plug from the window id we were told about */ id = (Window)window->window; g_debug("plugging into window id %lu", (unsigned long)id); - plug = gtk_plug_new(id); - gtk_container_add(GTK_CONTAINER(plug), priv->viewer); - gtk_widget_show_all(plug); + priv->plug = gtk_plug_new(id); + gtk_container_add(GTK_CONTAINER(priv->plug), priv->viewer); + gtk_widget_show(priv->plug); return NPERR_NO_ERROR; } |