diff --git a/Xi/exevents.c b/Xi/exevents.c index f3f9d390b..6bf9e5689 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1118,7 +1118,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) xE->u.u.detail = key; return; } - if (!b->state && device->deviceGrab.fromPassiveGrab) + if (!b->buttonsDown && device->deviceGrab.fromPassiveGrab) deactivateDeviceGrab = TRUE; } diff --git a/dix/events.c b/dix/events.c index a042089ab..e23cf8f19 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3929,7 +3929,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) if (xE->u.u.detail == 0) return; filters[mouse->id][Motion_Filter(butc)] = MotionNotify; - if (!butc->state && mouse->deviceGrab.fromPassiveGrab) + if (!butc->buttonsDown && mouse->deviceGrab.fromPassiveGrab) deactivateGrab = TRUE; break; default: