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>
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;
}