mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 14:53:03 +00:00
[XInput] Get XInput working again.
Check for distros shipping out of sync header vs libXi, call in g_type_init() in test-devices, fix ifdef so XInput events get correctly selected.
This commit is contained in:
parent
3035092edb
commit
1aa8c89f2c
@ -182,7 +182,7 @@ clutter_stage_glx_realize (ClutterActor *actor)
|
|||||||
KeyPressMask | KeyReleaseMask |
|
KeyPressMask | KeyReleaseMask |
|
||||||
EnterWindowMask | LeaveWindowMask |
|
EnterWindowMask | LeaveWindowMask |
|
||||||
PropertyChangeMask);
|
PropertyChangeMask);
|
||||||
#ifdef USE_XINPUT
|
#ifdef HAVE_XINPUT
|
||||||
_clutter_x11_select_events (stage_x11->xwin);
|
_clutter_x11_select_events (stage_x11->xwin);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
13
configure.ac
13
configure.ac
@ -503,7 +503,6 @@ AS_IF([test "x$clutterbackend" = "xglx" || test "x$clutterbackend" = "xeglx"],
|
|||||||
|
|
||||||
# XINPUT (optional) - FIXME this is wrong
|
# XINPUT (optional) - FIXME this is wrong
|
||||||
xinput=no
|
xinput=no
|
||||||
AC_MSG_CHECKING([for XINPUT extension])
|
|
||||||
AC_ARG_ENABLE([xinput],
|
AC_ARG_ENABLE([xinput],
|
||||||
[AS_HELP_STRING([--enable-xinput], [Use the XINPUT X extension])],
|
[AS_HELP_STRING([--enable-xinput], [Use the XINPUT X extension])],
|
||||||
[
|
[
|
||||||
@ -543,7 +542,16 @@ AS_IF([test "x$clutterbackend" = "xglx" || test "x$clutterbackend" = "xeglx"],
|
|||||||
[Define to 1 if we have XGetExtensionVersion])
|
[Define to 1 if we have XGetExtensionVersion])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
#Seems some distros ship with the header but not the symbol
|
||||||
|
really_have_xinput_query_version=no
|
||||||
AS_IF([test "x$have_xquery_input_version" = "xyes"],
|
AS_IF([test "x$have_xquery_input_version" = "xyes"],
|
||||||
|
[
|
||||||
|
AC_CHECK_LIB(Xi, [XQueryInputVersion],
|
||||||
|
[really_have_xinput_query_version=yes],
|
||||||
|
[])
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test "x$really_have_xquery_input_version" = "xyes"],
|
||||||
[
|
[
|
||||||
AC_DEFINE([HAVE_XQUERY_INPUT_VERSION],
|
AC_DEFINE([HAVE_XQUERY_INPUT_VERSION],
|
||||||
[1],
|
[1],
|
||||||
@ -553,11 +561,10 @@ AS_IF([test "x$clutterbackend" = "xglx" || test "x$clutterbackend" = "xeglx"],
|
|||||||
X11_LIBS="$X11_LIBS -lXi"
|
X11_LIBS="$X11_LIBS -lXi"
|
||||||
X11_PC_FILES="$X11_PC_FILES xi"
|
X11_PC_FILES="$X11_PC_FILES xi"
|
||||||
|
|
||||||
AC_MSG_RESULT([found])
|
|
||||||
],
|
],
|
||||||
|
|
||||||
[no],
|
[no],
|
||||||
[AC_MSG_RESULT([not found or disabled])],
|
[],
|
||||||
)
|
)
|
||||||
|
|
||||||
# X11-specific tests are enabled conditionally
|
# X11-specific tests are enabled conditionally
|
||||||
|
@ -33,6 +33,8 @@ test_devices_main (int argc, char **argv)
|
|||||||
TestDevicesApp *app = NULL;
|
TestDevicesApp *app = NULL;
|
||||||
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
||||||
|
|
||||||
|
g_type_init();
|
||||||
|
|
||||||
clutter_x11_enable_xinput ();
|
clutter_x11_enable_xinput ();
|
||||||
clutter_init (&argc, &argv);
|
clutter_init (&argc, &argv);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user