diff options
author | Zephaniah E. Hull <warp@agamemnon.b5> | 2006-10-21 04:26:14 -0400 |
---|---|---|
committer | Zephaniah E. Hull <warp@agamemnon.b5> | 2006-10-21 04:26:14 -0400 |
commit | e26a494f417c3c700636ee68892c3015b2e0f27a (patch) | |
tree | 05c7c00ca9815a3b3125d406dfe8f912071fc09e /Xi/getdctl.c | |
parent | 736b0d5078597abbda80444deef852879260af90 (diff) | |
parent | aeba855b07832354f59678e20cc29a085e42bd99 (diff) |
Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver
Diffstat (limited to 'Xi/getdctl.c')
-rw-r--r-- | Xi/getdctl.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Xi/getdctl.c b/Xi/getdctl.c index 61798f274..d738ef83b 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -145,6 +145,9 @@ ProcXGetDeviceControl(ClientPtr client) case DEVICE_CORE: total_length = sizeof(xDeviceCoreCtl); break; + case DEVICE_ENABLE: + total_length = sizeof(xDeviceEnableCtl); + break; default: SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadValue); return Success; @@ -169,6 +172,10 @@ ProcXGetDeviceControl(ClientPtr client) break; case DEVICE_CORE: CopySwapDeviceCore(client, dev, buf); + break; + case DEVICE_ENABLE: + CopySwapDeviceEnable(client, dev, buf); + break; default: break; } @@ -284,6 +291,7 @@ void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf) c->control = DEVICE_CORE; c->length = sizeof(c); c->status = dev->coreEvents; + c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer); if (client->swapped) { swaps(&c->control, n); @@ -292,6 +300,22 @@ void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf) } } +void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf) +{ + register char n; + xDeviceEnableState *e = (xDeviceEnableState *) buf; + + e->control = DEVICE_ENABLE; + e->length = sizeof(e); + e->enable = dev->enabled; + + if (client->swapped) { + swaps(&e->control, n); + swaps(&e->length, n); + swaps(&e->enable, n); + } +} + /*********************************************************************** * |