From cd56bd7b3ee34a4b10eb3a57a6e94cac7512167a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Dec 2011 14:59:06 +1000 Subject: Add GrabIsPointerGrab and GrabIsKeyboardGrab helpers No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas --- Xi/exevents.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Xi') diff --git a/Xi/exevents.c b/Xi/exevents.c index 874759959..405a8b1a0 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1001,9 +1001,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) case ET_KeyRelease: if (grab && device->deviceGrab.fromPassiveGrab && (key == device->deviceGrab.activatingKey) && - (device->deviceGrab.grab->type == KeyPress || - device->deviceGrab.grab->type == DeviceKeyPress || - device->deviceGrab.grab->type == XI_KeyPress)) + GrabIsKeyboardGrab(device->deviceGrab.grab)) deactivateDeviceGrab = TRUE; break; case ET_ButtonPress: @@ -1023,9 +1021,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) event->detail.button = b->map[key]; if (grab && !b->buttonsDown && device->deviceGrab.fromPassiveGrab && - (device->deviceGrab.grab->type == ButtonPress || - device->deviceGrab.grab->type == DeviceButtonPress || - device->deviceGrab.grab->type == XI_ButtonPress)) + GrabIsPointerGrab(device->deviceGrab.grab)) deactivateDeviceGrab = TRUE; default: break; -- cgit v1.2.3