browser-plugin: Set windowless mode and don't claim to need XEmbed

NPAPI plugins are windowed by default, so we need to set
NPPVpluginWindowBool value to FALSE on startup. This way the browser
will not create a GtkSocket for a GtkPlug that we are not going to
create. It doesn't make sense to claim that we need XEmbed either.

https://bugzilla.gnome.org/show_bug.cgi?id=757940
This commit is contained in:
Carlos Garcia Campos 2015-11-11 12:30:24 +01:00 committed by Carlos Garcia Campos
parent 9a7b47c23f
commit a52c91e9e5

View File

@ -218,6 +218,9 @@ NPP_New(NPMIMEType mimetype,
data = g_slice_new (PluginData); data = g_slice_new (PluginData);
instance->pdata = data; instance->pdata = data;
/* set windowless mode */
funcs.setvalue(instance, NPPVpluginWindowBool, NULL);
data->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, data->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE, G_DBUS_PROXY_FLAGS_NONE,
NULL, /* interface info */ NULL, /* interface info */
@ -1034,10 +1037,6 @@ NPP_GetValue(NPP instance,
*(NPObject**)value = funcs.createobject (instance, &plugin_class); *(NPObject**)value = funcs.createobject (instance, &plugin_class);
break; break;
case NPPVpluginNeedsXEmbed:
*(bool *)value = TRUE;
break;
default: default:
; ;
} }