[gnome-settings-daemon] common: hardcode the supported XI2 version number



commit e57c56ec2f5d7e93d0e4f2fd23c703c1ab23909d
Author: Peter Hutterer <peter hutterer who-t net>
Date:   Fri Nov 4 08:46:31 2011 +1000

    common: hardcode the supported XI2 version number
    
    XI2_Major/XI2_Minor are the _current_ version of the protocol as exported by
    the inputproto header files. If gsd is compiled against new headers and runs
    against a 2.0 server it reports "no XInput2 supported" otherwise.

 plugins/common/gsd-input-helper.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/common/gsd-input-helper.c b/plugins/common/gsd-input-helper.c
index b0fc29d..2aa2b32 100644
--- a/plugins/common/gsd-input-helper.c
+++ b/plugins/common/gsd-input-helper.c
@@ -119,8 +119,8 @@ supports_xinput2_devices (int *opcode)
 
         gdk_error_trap_push ();
 
-        major = XI_2_Major;
-        minor = XI_2_Minor;
+        major = 2;
+        minor = 0;
 
         if (XIQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor) != Success) {
                 gdk_error_trap_pop_ignored ();
@@ -128,7 +128,7 @@ supports_xinput2_devices (int *opcode)
         }
         gdk_error_trap_pop_ignored ();
 
-        if ((major * 1000 + minor) < (XI_2_Major * 1000 + XI_2_Minor))
+        if ((major * 1000 + minor) < (2000))
                 return FALSE;
 
         return TRUE;



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