summarylogtreecommitdiffstats
path: root/xinput.patch
blob: 67c8082cbb72a488f17e9b3822c65c05858f9852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 14f92b1479aa065edf3f0aa86b87d4c4ff1fe2ba Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Thu, 07 Feb 2013 04:14:22 +0000
Subject: Fix media-keys handling with GTK+ 3.7.8

GDK now requests XI 2.3 and if the X server supports that
version, subsequent requests for a lower version yield
a BadValue. Therefore, we need to change the code in
gsd-input-helper.c to request 2.3 as well.
---
diff --git a/plugins/common/gsd-input-helper.c b/plugins/common/gsd-input-helper.c
index 54427af..d5d2a2a 100644
--- a/plugins/common/gsd-input-helper.c
+++ b/plugins/common/gsd-input-helper.c
@@ -144,18 +144,11 @@ supports_xinput2_devices (int *opcode)
         gdk_error_trap_push ();
 
         major = 2;
-        minor = 0;
+        minor = 3;
 
         if (XIQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor) != Success) {
                 gdk_error_trap_pop_ignored ();
-                /* try for 2.2, maybe gtk has already announced 2.2 support */
-                gdk_error_trap_push ();
-                major = 2;
-                minor = 2;
-                if (XIQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor) != Success) {
-                    gdk_error_trap_pop_ignored ();
                     return FALSE;
-                }
         }
         gdk_error_trap_pop_ignored ();
 
--
cgit v0.9.1