зеркало из https://github.com/mozilla/pjs.git
NPNVxDisplay for windowless plugins should not return the Display* of an XtBin. b=444252 r+sr=jst
This commit is contained in:
Родитель
41ce4e5234
Коммит
95f5670e72
|
@ -2188,9 +2188,13 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||||
#ifdef MOZ_WIDGET_GTK2
|
#ifdef MOZ_WIDGET_GTK2
|
||||||
if (npp) {
|
if (npp) {
|
||||||
ns4xPluginInstance *inst = (ns4xPluginInstance *) npp->ndata;
|
ns4xPluginInstance *inst = (ns4xPluginInstance *) npp->ndata;
|
||||||
NPBool rtv = PR_FALSE;
|
PRBool windowless = PR_FALSE;
|
||||||
inst->GetValue((nsPluginInstanceVariable)NPPVpluginNeedsXEmbed, &rtv);
|
inst->GetValue(nsPluginInstanceVariable_WindowlessBool, &windowless);
|
||||||
if (rtv) {
|
NPBool needXEmbed = PR_FALSE;
|
||||||
|
if (!windowless) {
|
||||||
|
inst->GetValue((nsPluginInstanceVariable)NPPVpluginNeedsXEmbed, &needXEmbed);
|
||||||
|
}
|
||||||
|
if (windowless || needXEmbed) {
|
||||||
(*(Display **)result) = GDK_DISPLAY();
|
(*(Display **)result) = GDK_DISPLAY();
|
||||||
return NPERR_NO_ERROR;
|
return NPERR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче