NPNVxDisplay for windowless plugins should not return the Display* of an XtBin. b=444252 r+sr=jst

This commit is contained in:
Karl Tomlinson 2008-07-17 13:19:54 +12:00
Родитель bfb1de4556
Коммит 2c4159eaf8
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -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;
}