File U_Fix-version-check-in-_XIAllowEvents.patch of Package libXi.3538

From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Tue Feb 24 07:49:34 2015 +1000
Subject: [PATCH]Fix version check in _XIAllowEvents
Patch-mainline: Upstream
Git-commit: 05c86e53c0bae30e58b32b94e191c8720990918a
Git-repo: git://anongit.freedesktop.org/git/xorg/lib/libXi
References: bnc#940529
Signed-off-by: Egbert Eich <eich@suse.com>

Commit 5810d0797160a97012664ffe719a59e1b288a525 changed _XIAllowEvents() to
use _XiCheckVersion() instead of _XiCheckExtInit() to avoid a double display
unlock, but it failed to correctly check for the version, since we should set
have_XI22 to True for every version greater or equal to 2.2.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
 src/XIAllowEvents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/XIAllowEvents.c b/src/XIAllowEvents.c
index 52c17ab..e7be099 100644
--- a/src/XIAllowEvents.c
+++ b/src/XIAllowEvents.c
@@ -50,7 +50,7 @@ _XIAllowEvents(Display *dpy, int deviceid, int event_mode, Time time,
     if (_XiCheckExtInit(dpy, XInput_2_0, extinfo) == -1)
 	return (NoSuchExtension);
 
-    if (_XiCheckVersion(extinfo, XInput_2_2) == 0)
+    if (_XiCheckVersion(extinfo, XInput_2_2) >= 0)
         have_XI22 = True;
 
     if (have_XI22)
openSUSE Build Service is sponsored by