diff --git a/modules/plugin/base/src/ns4xPlugin.cpp b/modules/plugin/base/src/ns4xPlugin.cpp index 182fef1d397..b30e1a1b044 100644 --- a/modules/plugin/base/src/ns4xPlugin.cpp +++ b/modules/plugin/base/src/ns4xPlugin.cpp @@ -2188,9 +2188,13 @@ _getvalue(NPP npp, NPNVariable variable, void *result) #ifdef MOZ_WIDGET_GTK2 if (npp) { ns4xPluginInstance *inst = (ns4xPluginInstance *) npp->ndata; - NPBool rtv = PR_FALSE; - inst->GetValue((nsPluginInstanceVariable)NPPVpluginNeedsXEmbed, &rtv); - if (rtv) { + PRBool windowless = PR_FALSE; + inst->GetValue(nsPluginInstanceVariable_WindowlessBool, &windowless); + NPBool needXEmbed = PR_FALSE; + if (!windowless) { + inst->GetValue((nsPluginInstanceVariable)NPPVpluginNeedsXEmbed, &needXEmbed); + } + if (windowless || needXEmbed) { (*(Display **)result) = GDK_DISPLAY(); return NPERR_NO_ERROR; }