Disable wxUIActionSimulator if XTest not found when using GTK+ 3

The implementation using XSendEvent() with classic input events can't work
with GTK+ 3 anyhow because it uses XInput2 which is incompatible with them, so
warn the user about this and don't compile useless code into the library.
This commit is contained in:
Vadim Zeitlin
2016-05-23 01:52:56 +02:00
parent ec4a41f3b7
commit 54a6c44a77
2 changed files with 30 additions and 12 deletions

27
configure vendored
View File

@@ -33566,9 +33566,6 @@ if test "$wxUSE_MOUSEWHEEL" = "yes" ; then
fi
if test "$wxUSE_UIACTIONSIMULATOR" = "yes" ; then
$as_echo "#define wxUSE_UIACTIONSIMULATOR 1" >>confdefs.h
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS uiaction"
if test "$wxUSE_GTK" = 1 -o "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1; then
if test "$wxUSE_XTEST" = "yes" ; then
@@ -33631,16 +33628,22 @@ fi
echo "$XTST_PKG_ERRORS" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: XTest extension not found" >&5
$as_echo "$as_me: WARNING: XTest extension not found" >&2;}
wxUSE_XTEST="no"
if test "$WXGTK3" = 1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: XTest not found, disabling wxUIActionSimulator" >&5
$as_echo "$as_me: WARNING: XTest not found, disabling wxUIActionSimulator" >&2;}
wxUSE_UIACTIONSIMULATOR=no
fi
wxUSE_XTEST="no"
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: XTest extension not found" >&5
$as_echo "$as_me: WARNING: XTest extension not found" >&2;}
wxUSE_XTEST="no"
if test "$WXGTK3" = 1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: XTest not found, disabling wxUIActionSimulator" >&5
$as_echo "$as_me: WARNING: XTest not found, disabling wxUIActionSimulator" >&2;}
wxUSE_UIACTIONSIMULATOR=no
fi
wxUSE_XTEST="no"
else
@@ -33658,6 +33661,12 @@ $as_echo "yes" >&6; }
fi
fi
fi
if test "$wxUSE_UIACTIONSIMULATOR" = "yes" ; then
$as_echo "#define wxUSE_UIACTIONSIMULATOR 1" >>confdefs.h
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS uiaction"
fi
fi
if test "$wxUSE_DC_TRANSFORM_MATRIX" = "yes" ; then

View File

@@ -6359,8 +6359,6 @@ if test "$wxUSE_MOUSEWHEEL" = "yes" ; then
fi
if test "$wxUSE_UIACTIONSIMULATOR" = "yes" ; then
AC_DEFINE(wxUSE_UIACTIONSIMULATOR)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS uiaction"
if test "$wxUSE_GTK" = 1 -o "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1; then
if test "$wxUSE_XTEST" = "yes" ; then
PKG_CHECK_MODULES(XTST, xtst,
@@ -6371,12 +6369,23 @@ if test "$wxUSE_UIACTIONSIMULATOR" = "yes" ; then
AC_DEFINE(wxUSE_XTEST)
],
[
AC_MSG_WARN([XTest extension not found])
if test "$WXGTK3" = 1; then
dnl This class can't work without XTest with GTK+ 3
dnl which uses XInput2 and so ignores XSendEvent().
AC_MSG_WARN([XTest not found, disabling wxUIActionSimulator])
wxUSE_UIACTIONSIMULATOR=no
fi
dnl The other ports can use XSendEvent(), so don't warn
wxUSE_XTEST="no"
]
)
fi
fi
if test "$wxUSE_UIACTIONSIMULATOR" = "yes" ; then
AC_DEFINE(wxUSE_UIACTIONSIMULATOR)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS uiaction"
fi
fi
if test "$wxUSE_DC_TRANSFORM_MATRIX" = "yes" ; then