summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2011-02-15 11:27:57 +0000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-02-17 09:10:10 +1000
commitda39d57a20d4281fc4099e356645fef980290030 (patch)
treeaa2b526891a7135136055e67cd111cfc0398d5d6 /Xi
parent0f9c6f2f822ff53b9d12ff4fa0b26cbeb7394ba5 (diff)
Input: Store passive-activating key in CheckDeviceGrabs
CheckDeviceGrabs will activate a passive grab for KeyPress and ButtonPress events. GrabInfoRec::activatingKey contains the keycode which activated the passive grab, so we can deactivate it later in ProcessOtherEvents. Previously, CheckDeviceGrabs relied on its callers to set activatingKey, which not all callers were doing (I'm looking at you, ComputeFreezes). Just set it in CheckDeviceGrabs instead. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 327873e29..513116782 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1047,10 +1047,8 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
switch(event->type)
{
case ET_KeyPress:
- if (!grab && CheckDeviceGrabs(device, event, 0)) {
- device->deviceGrab.activatingKey = key;
+ if (!grab && CheckDeviceGrabs(device, event, 0))
return;
- }
break;
case ET_KeyRelease:
if (grab && device->deviceGrab.fromPassiveGrab &&