diff options
-rw-r--r-- | src/evbp.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -43,6 +43,7 @@ typedef struct evbp_priv { NPP npp; GtkWidget *plug; GtkWidget *viewer; + gboolean in_process; } evbp_priv_t; static char *evbp_mime_string = NULL; @@ -213,6 +214,13 @@ evbp_set_window(NPP instance, NPWindow *window) window->height); gtk_container_add(GTK_CONTAINER(priv->plug), priv->viewer); gtk_widget_show(priv->plug); + + /* Figure out whether the plugin is in the same process or not. If the + * plug is a toplevel widget, then it's out of process. + */ + priv->in_process = !gtk_widget_is_toplevel(priv->plug); + g_debug("the plugin is %s-process", + priv->in_process ? "in" : "out-of"); } return NPERR_NO_ERROR; |