From c51bb9182d1225def39b49ab57612a070e3a192e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 2 Jun 2011 09:14:40 +1000 Subject: 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 Reviewed-by: Julien Cristau --- src/xinput.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3