Commit 9d23fac4 authored by Peter Hutterer's avatar Peter Hutterer Committed by Bastien Nocera
Browse files

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
parent f3e5a738
......@@ -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 ();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment