From a5961a8459614fcaa801a47cda07d3ee8246b16f Mon Sep 17 00:00:00 2001 From: Philipp Reh Date: Mon, 10 Jan 2011 17:35:57 +0100 Subject: Fix passive grabs. _XIPassiveGrabDevice, which is called by alle the passive grab functions, wrongly returns an error when it shouldn't. The attached patch adds the missing "not" to properly test the error condition of _XReply. Signed-off-by: Philipp Reh Reviewed-by: Daniel Stone Reviewed-by: Peter Hutterer --- src/XIPassiveGrab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c index 8953013..98eb806 100644 --- a/src/XIPassiveGrab.c +++ b/src/XIPassiveGrab.c @@ -73,7 +73,7 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int grabtype, int detail, free(buff); - if (_XReply(dpy, (xReply *)&reply, 0, xTrue)) + if (!_XReply(dpy, (xReply *)&reply, 0, xTrue)) { UnlockDisplay(dpy); SyncHandle(); -- cgit v1.2.3