[gnome-bluetooth] input: Remove X11 dependency



commit 50ea3be6dc46fe6ec84ce4a7709cf4b3da9df9d0
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Oct 30 14:22:41 2013 +0100

    input: Remove X11 dependency

 configure.ac             |    5 +----
 wizard/bluetooth-input.c |   21 ---------------------
 2 files changed, 1 insertions(+), 25 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 67cb0dc..8d04e1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,10 +90,7 @@ AC_CHECK_LIBM
 AC_SUBST(LIBM)
 
 dnl Requires for the input helper
-PKG_CHECK_MODULES(INPUT,
-                 xi
-                 x11
-                 gtk+-3.0)
+PKG_CHECK_MODULES(INPUT, gdk-3.0 gtk+-3.0)
 
 dnl Requires for the public library
 PKG_CHECK_MODULES(LIBGNOMEBT, gmodule-2.0 gio-unix-2.0 gtk+-3.0)
diff --git a/wizard/bluetooth-input.c b/wizard/bluetooth-input.c
index 6042ad1..08856c3 100644
--- a/wizard/bluetooth-input.c
+++ b/wizard/bluetooth-input.c
@@ -26,10 +26,6 @@
 #include <string.h>
 #include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/XIproto.h>
 
 #include "bluetooth-input.h"
 
@@ -55,18 +51,6 @@ struct _BluetoothInputPrivate {
 G_DEFINE_TYPE(BluetoothInput, bluetooth_input, G_TYPE_OBJECT)
 
 static gboolean
-supports_xinput_devices (void)
-{
-       gint op_code, event, error;
-
-       return XQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
-                               "XInputExtension",
-                               &op_code,
-                               &event,
-                               &error);
-}
-
-static gboolean
 bluetooth_input_ignore_device (const char *name)
 {
        guint i;
@@ -219,11 +203,6 @@ bluetooth_input_new (void)
        if (bluetooth_input != NULL)
                return g_object_ref (bluetooth_input);
 
-       if (supports_xinput_devices () == FALSE) {
-               g_warning ("XInput not supported, input device helper disabled");
-               return NULL;
-       }
-
        bluetooth_input = BLUETOOTH_INPUT (g_object_new (BLUETOOTH_TYPE_INPUT, NULL));
        g_object_add_weak_pointer (G_OBJECT (bluetooth_input),
                                   (gpointer) &bluetooth_input);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]