summaryrefslogtreecommitdiff
path: root/Xi/chgdctl.c
diff options
context:
space:
mode:
authorZephaniah E. Hull <warp@agamemnon.b5>2006-10-21 04:26:14 -0400
committerZephaniah E. Hull <warp@agamemnon.b5>2006-10-21 04:26:14 -0400
commite26a494f417c3c700636ee68892c3015b2e0f27a (patch)
tree05c7c00ca9815a3b3125d406dfe8f912071fc09e /Xi/chgdctl.c
parent736b0d5078597abbda80444deef852879260af90 (diff)
parentaeba855b07832354f59678e20cc29a085e42bd99 (diff)
Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver
Diffstat (limited to 'Xi/chgdctl.c')
-rw-r--r--Xi/chgdctl.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 32533c496..597955c34 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -107,6 +107,7 @@ ProcXChangeDeviceControl(ClientPtr client)
xDeviceAbsCalibCtl *calib;
xDeviceAbsAreaCtl *area;
xDeviceCoreCtl *c;
+ xDeviceEnableCtl *e;
REQUEST(xChangeDeviceControlReq);
REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
@@ -246,6 +247,28 @@ ProcXChangeDeviceControl(ClientPtr client)
}
break;
+ case DEVICE_ENABLE:
+ e = (xDeviceEnableCtl *)&stuff[1];
+
+ status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e);
+
+ if (status == Success) {
+ if (e->enable)
+ EnableDevice(dev);
+ else
+ DisableDevice(dev);
+ } else if (status == DeviceBusy) {
+ rep.status = DeviceBusy;
+ WriteReplyToClient(client, sizeof(xChangeDeviceControlReply),
+ &rep);
+ return Success;
+ } else {
+ SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0,
+ BadMatch);
+ return Success;
+ }
+
+ break;
default:
SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, BadValue);
return Success;