Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman

MozReview-Commit-ID: 3v8D600g8St
This commit is contained in:
Sylvestre Ledru
2018-01-10 08:52:04 +01:00
parent ee2a7f050d
commit aeb1902651
30 changed files with 3 additions and 948 deletions

View File

@@ -57,9 +57,6 @@
#if (MOZ_WIDGET_GTK)
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#if (MOZ_WIDGET_GTK == 2)
#include "gtk2xtbin.h"
#endif
#endif
#include "nsJSUtils.h"
@@ -1341,19 +1338,6 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
return NPERR_NO_ERROR;
}
}
#if (MOZ_WIDGET_GTK == 2)
// adobe nppdf calls XtGetApplicationNameAndClass(display,
// &instance, &class) we have to init Xt toolkit before get
// XtDisplay just call gtk_xtbin_new(w,0) once
static GtkWidget *gtkXtBinHolder = 0;
if (!gtkXtBinHolder) {
gtkXtBinHolder = gtk_xtbin_new(gdk_get_default_root_window(),0);
// it crashes on destroy, let it leak
// gtk_widget_destroy(gtkXtBinHolder);
}
(*(Display **)result) = GTK_XTBIN(gtkXtBinHolder)->xtdisplay;
return NPERR_NO_ERROR;
#endif
#endif
return NPERR_GENERIC_ERROR;
}