Issue #3132 Follow-up: only include gtk2xtbin.h on GTK targets.

PR #3133 caused build breakage on non-gtk platforms by unconditionally
including the header (because the def defaults to true in configure)

This also reorganizes the configure script to add a check for
MOZ_WIDGET_GTK (hoisted up a little) so the new configure entry is
simply ignored on non-GTK targets.
This commit is contained in:
Moonchild committed 2026-07-03 09:19:54 +02:00
1 parent b2594a4ace
commit 0eae777fd0
3 files changed
+28 -23

No files matched your search

+1 -1
View File
@@ -4679,7 +4679,7 @@ PluginInstanceChild::Destroy()
mPendingAsyncCalls.Clear();
#ifdef MOZ_ENABLE_NPAPI_GTK2
#if defined(MOZ_WIDGET_GTK) && defined (MOZ_ENABLE_NPAPI_GTK2)
if (mWindow.type == NPWindowTypeWindow && !mXEmbed) {
xt_client_xloop_destroy();
}
+1 -1
View File
@@ -36,7 +36,7 @@
#include <map>
#ifdef MOZ_ENABLE_NPAPI_GTK2
#if defined(MOZ_WIDGET_GTK) && defined(MOZ_ENABLE_NPAPI_GTK2)
#include "gtk2xtbin.h"
#endif
+26 -21
View File
@@ -2135,6 +2135,16 @@ if test -z "$XULRUNNER_STUB_NAME"; then
fi
AC_SUBST(XULRUNNER_STUB_NAME)
dnl ========================================================
dnl there are a lot of tests on MOZ_ENABLE_GTK below, that are more convenient
dnl to keep that way than testing against MOZ_WIDGET_TOOLKIT
case "$MOZ_WIDGET_TOOLKIT" in
gtk*)
MOZ_ENABLE_GTK=1
;;
esac
dnl ========================================================
dnl = NPAPI support
dnl ========================================================
@@ -2146,25 +2156,28 @@ MOZ_ARG_DISABLE_BOOL(npapi,
MOZ_ENABLE_NPAPI=,
MOZ_ENABLE_NPAPI=1)
MOZ_ENABLE_NPAPI_GTK2=1
MOZ_ARG_DISABLE_BOOL(npapi-gtk2,
[ --disable-npapi-gtk2 Disable GTK2 support for NPAPI plugins ],
MOZ_ENABLE_NPAPI_GTK2=,
MOZ_ENABLE_NPAPI_GTK2=1)
if test "$MOZ_ENABLE_NPAPI"
then
AC_DEFINE(MOZ_ENABLE_NPAPI)
fi
if test "$MOZ_ENABLE_NPAPI" -a "$MOZ_ENABLE_NPAPI_GTK2"
then
AC_DEFINE(MOZ_ENABLE_NPAPI_GTK2)
fi
AC_SUBST(MOZ_ENABLE_NPAPI)
AC_SUBST(MOZ_ENABLE_NPAPI_GTK2)
if test -n "$MOZ_ENABLE_GTK" ; then
MOZ_ENABLE_NPAPI_GTK2=1
MOZ_ARG_DISABLE_BOOL(npapi-gtk2,
[ --disable-npapi-gtk2 Disable GTK2 support for NPAPI plugins ],
MOZ_ENABLE_NPAPI_GTK2=,
MOZ_ENABLE_NPAPI_GTK2=1)
if test "$MOZ_ENABLE_NPAPI" -a "$MOZ_ENABLE_NPAPI_GTK2"
then
AC_DEFINE(MOZ_ENABLE_NPAPI_GTK2)
fi
AC_SUBST(MOZ_ENABLE_NPAPI_GTK2)
fi
dnl ========================================================
dnl =
@@ -2205,14 +2218,6 @@ cocoa)
esac
dnl there are a lot of tests on MOZ_ENABLE_GTK below, that are more convenient
dnl to keep that way than testing against MOZ_WIDGET_TOOLKIT
case "$MOZ_WIDGET_TOOLKIT" in
gtk*)
MOZ_ENABLE_GTK=1
;;
esac
if test "$MOZ_WIDGET_TOOLKIT" = gtk2 -a -z "$MOZ_ENABLE_NPAPI_GTK2"; then
AC_MSG_ERROR([--disable-npapi-gtk2 cannot be used with GTK2 browser builds.])
fi