diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2020-10-27 20:57:55 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2020-10-27 21:05:22 +0100 |
commit | 3eb0a8257758dfc07d5c16c11972cbe43c6022d2 (patch) | |
tree | f7ef98fdf11511807b1770d82098067eb21bdf58 | |
parent | 083e6de029753c73a9c3b6cbd4685d6815cedddb (diff) | |
download | xfwm4-3eb0a8257758dfc07d5c16c11972cbe43c6022d2.tar.gz |
input: Disable XI2 by default
Make Xi2 support selectable at configure time and disable it by default.
Xi2 in the window manager causes some very subtile bugs with legacy
applications using the core X11 protocol.
Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
https://gitlab.xfce.org/xfce/xfwm4/-/issues/445
https://gitlab.xfce.org/xfce/xfwm4/-/issues/427
-rw-r--r-- | configure.ac.in | 20 | ||||
-rw-r--r-- | src/main.c | 8 |
2 files changed, 25 insertions, 3 deletions
diff --git a/configure.ac.in b/configure.ac.in index 9f831c6bc..3671de131 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -91,14 +91,27 @@ AC_CHECK_LIB([Xext], [XShapeCombineShape], fi ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS]) -dnl Check for Xi library -AC_CHECK_LIB([Xi], [XISelectEvents], + +AC_ARG_ENABLE([xi2], + AC_HELP_STRING([--enable-xi2], [enable support for the X Input 2 extension]) + AC_HELP_STRING([--disable-xi2], [don't enable the X Input 2 extension (default)]), + [enable_xi2=yes], []) +have_xi2="no" +if test x"$enable_xi2" = x"yes"; then +dnl Check for Xi2 library + AC_CHECK_LIB([Xi], [XISelectEvents], [ if ! echo $LIBX11_LIBS | grep -q -- '-lXi'; then + have_xi2="yes" LIBX11_LIBS="$LIBX11_LIBS -lXi" AC_DEFINE([HAVE_XI2], [1], [Define to enable XI2]) fi - ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS]) + ], + [ + AC_MSG_ERROR([X Input 2 extension support requested but not available]) + ], + [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS]) +fi dnl Check for XRes library AC_CHECK_LIB([XRes], [XResQueryClients], @@ -327,6 +340,7 @@ echo " XSync support: $have_xsync" echo " Render support: $have_render" echo " Xrandr support: $have_xrandr" echo " Xpresent support: $have_xpresent" +echo " Xi2 support: $have_xi2" echo " Embedded compositor: $compositor" echo " Epoxy support: $EPOXY_FOUND" echo " KDE systray protocol proxy: $kde_systray" diff --git a/src/main.c b/src/main.c index d362e063a..32a691819 100644 --- a/src/main.c +++ b/src/main.c @@ -382,6 +382,14 @@ print_version (void) #else g_print ("No\n"); #endif + + g_print ("\t- X Input 2 support: "); +#ifdef HAVE_XI2 + g_print ("Yes\n"); +#else + g_print ("No\n"); +#endif + g_print ("\t- Embedded compositor: "); #ifdef HAVE_COMPOSITOR g_print ("Yes\n"); |