From fc49fb2f4f3f1059e0bb63271ad7509275eba2d1 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 24 Mar 2011 12:04:43 -0400 Subject: [PATCH] Improve checks for XFixes pointer barriers Instead of checking on version (which doesn't work when protocol and libraries are out of sync), just check for the functions we need. https://bugzilla.gnome.org/show_bug.cgi?id=645630 --- configure.ac | 8 ++++---- src/shell-global.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 0c617875f..1b61101b6 100644 --- a/configure.ac +++ b/configure.ac @@ -52,8 +52,8 @@ AC_MSG_CHECKING([for GStreamer (needed for recording functionality)]) if $PKG_CONFIG --exists gstreamer-0.10 '>=' $GSTREAMER_MIN_VERSION ; then AC_MSG_RESULT(yes) build_recorder=true - recorder_modules="gstreamer-0.10 gstreamer-base-0.10 xfixes x11" - PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0) + recorder_modules="gstreamer-0.10 gstreamer-base-0.10 x11" + PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes) else AC_MSG_RESULT(no) fi @@ -89,7 +89,7 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION libcanberra telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION - polkit-agent-1 >= $POLKIT_MIN_VERSION) + polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes) PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0) @@ -112,7 +112,7 @@ saved_LIBS=$LIBS CFLAGS=$GNOME_SHELL_CFLAGS LIBS=$GNOME_SHELL_LIBS # sn_startup_sequence_get_application_id, we can replace with a version check later -AC_CHECK_FUNCS(JS_NewGlobalObject sn_startup_sequence_get_application_id) +AC_CHECK_FUNCS(JS_NewGlobalObject sn_startup_sequence_get_application_id XFixesCreatePointerBarrier) CFLAGS=$saved_CFLAGS LIBS=$saved_LIBS diff --git a/src/shell-global.c b/src/shell-global.c index dcedf43f2..2123e8aee 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -902,7 +902,7 @@ shell_global_create_pointer_barrier (ShellGlobal *global, int x1, int y1, int x2, int y2, int directions) { -#if XFIXES_MAJOR >= 5 +#if HAVE_XFIXESCREATEPOINTERBARRIER Display *xdpy; xdpy = meta_plugin_get_xdisplay (global->plugin); @@ -928,7 +928,7 @@ shell_global_create_pointer_barrier (ShellGlobal *global, void shell_global_destroy_pointer_barrier (ShellGlobal *global, guint32 barrier) { -#if XFIXES_MAJOR >= 5 +#if HAVE_XFIXESCREATEPOINTERBARRIER Display *xdpy; g_return_if_fail (barrier > 0);