summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-09-26 20:24:15 -0700
committerKeith Packard <keithp@keithp.com>2011-09-26 20:24:15 -0700
commitafb1fe695d197187a301c19863a128a65389b15c (patch)
treed1ec3b11b8ca521cb77ff1d6821786d3dfc6a5e1 /Xi
parent7fb4bef0394a5d09680985d34bce8252b61493cb (diff)
parentc7163fdd302f706a3d67f0fdf93eeb3396bb3332 (diff)
Merge remote-tracking branch 'whot/next'
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c6
-rw-r--r--Xi/xipassivegrab.c13
2 files changed, 10 insertions, 9 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 3e3c67b63..38089a27c 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -716,7 +716,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
{
int i;
int key = 0,
- bit = 0,
last_valuator;
KeyClassPtr k = NULL;
@@ -750,7 +749,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
b = device->button;
key = event->detail.key;
- bit = 1 << (key & 7);
/* Update device axis */
/* Check valuators first */
@@ -888,8 +886,6 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
Bool deactivateDeviceGrab = FALSE;
int key = 0, rootX, rootY;
ButtonClassPtr b;
- KeyClassPtr k;
- ValuatorClassPtr v;
int ret = 0;
int state, i;
DeviceIntPtr mouse = NULL, kbd = NULL;
@@ -953,9 +949,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
if (ret == DONT_PROCESS)
return;
- v = device->valuator;
b = device->button;
- k = device->key;
if (IsMaster(device) || IsFloating(device))
CheckMotion(event, device);
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 6b4574854..6be27f3d1 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -256,9 +256,16 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
REQUEST(xXIPassiveUngrabDeviceReq);
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
- rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
- if (rc != Success)
- return rc;
+ if (stuff->deviceid == XIAllDevices)
+ dev = inputInfo.all_devices;
+ else if (stuff->deviceid == XIAllMasterDevices)
+ dev = inputInfo.all_master_devices;
+ else
+ {
+ rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
+ if (rc != Success)
+ return rc;
+ }
if (stuff->grab_type != XIGrabtypeButton &&
stuff->grab_type != XIGrabtypeKeycode &&