[PATCH 4/5] dix: check for the right device's xi2 mask

Peter Hutterer peter.hutterer at who-t.net
Thu Jan 3 22:24:32 PST 2013


events.c: In function 'DeactivatePointerGrab':
events.c:1524:51: warning: 'dev' may be used uninitialized in this function
[-Wuninitialized

dev is unset when we get here, the device to check is "mouse".
Introduced in ece8157a59751b3ed492fb2e1eb8d5f20221e195.

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

diff --git a/dix/events.c b/dix/events.c
index bea68cc..b742f67 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1522,7 +1522,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
                emulate a ButtonRelease here. So pretend the listener
                already has the end event */
             if (grab->grabtype == CORE || grab->grabtype == XI ||
-                    !xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))
+                    !xi2mask_isset(mouse->deviceGrab.grab->xi2mask, mouse, XI_TouchBegin))
                 ti->listeners[0].state = LISTENER_HAS_END;
             TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
         }
-- 
1.8.0.2



More information about the xorg-devel mailing list