summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-08 14:59:06 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-13 13:24:08 +1000
commitcd56bd7b3ee34a4b10eb3a57a6e94cac7512167a (patch)
treeac0416985e6dfae06440bb454cd474333487bd80 /Xi
parent47734b2ba2e1f9246fd1a3b7059ca60b0e15acb2 (diff)
Add GrabIsPointerGrab and GrabIsKeyboardGrab helpers
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c8
1 files changed, 2 insertions, 6 deletions
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;