[PATCH] Fix passive grabs.

Philipp Reh sefi at s-e-f-i.de
Mon Jan 10 08:35:57 PST 2011

_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 <sefi at s-e-f-i.de>
 src/XIPassiveGrab.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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,
-    if (_XReply(dpy, (xReply *)&reply, 0, xTrue))
+    if (!_XReply(dpy, (xReply *)&reply, 0, xTrue))

More information about the xorg-devel mailing list