summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-06-02 09:14:40 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-06-03 09:48:13 +1000
commitc51bb9182d1225def39b49ab57612a070e3a192e (patch)
tree109208a0f00f0926b0feac5f506ae6cafe2c5ce2
parentbdcb5b2a1b547059cf75b8337f854dbb136705f6 (diff)
Announce support for XI 2.0 to the server.
Technically, we're required to announce support for XI 2.0 through XIQueryVersion. The behaviour of XI2 for clients that have not done so is undefined, it just happens to work. With XI 2.1 on the horizon, this may change so make sure we're clamining our version correctly Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
-rw-r--r--src/xinput.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xinput.c b/src/xinput.c
index a20f856..64b4887 100644
--- a/src/xinput.c
+++ b/src/xinput.c
@@ -184,6 +184,16 @@ xinput_version(Display *display)
XFree(version);
}
+#if HAVE_XI2
+ /* Announce our supported version so the server treats us correctly. */
+ if (vers >= XI_2_Major)
+ {
+ int maj = 2,
+ min = 0;
+ XIQueryVersion(display, &maj, &min);
+ }
+#endif
+
return vers;
}