blob: f2079dd81b8870723362928c5838f5dcad9fab7b (
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
37
38
39
40
41
42
43
44
|
From 9d23fac4ce927cd27964323aa4cf8138e5128ba0 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 12 Apr 2012 13:51:09 +1000
Subject: [PATCH] common: Try XI 2.2 if XI 2.0 fails
The media-keys plugin calls supports_xinput2_devices(). That again calls
XIQueryDevice with a major/minor of 2.0. The upstream server has a check
for this in place and responds BadValue if a client initiates XI2 twice
with two different versions (such both us and GTK+ checking for
different versions). This happens here, and thus the plugin fails
to load.
The X server was fixed, but this is still required for older versions
of the Xi code:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=ea51e9b2877df60135edaf2a8f88d0f2a2b41060
https://bugzilla.gnome.org/show_bug.cgi?id=673964
---
plugins/common/gsd-input-helper.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/plugins/common/gsd-input-helper.c b/plugins/common/gsd-input-helper.c
index cf9e83d..f06b507 100644
--- a/plugins/common/gsd-input-helper.c
+++ b/plugins/common/gsd-input-helper.c
@@ -129,7 +129,14 @@ supports_xinput2_devices (int *opcode)
if (XIQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor) != Success) {
gdk_error_trap_pop_ignored ();
- return FALSE;
+ /* 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 ();
--
1.7.8.6
|