summaryrefslogtreecommitdiff
path: root/Xi/chgdctl.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-03-04 18:11:10 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-03-04 18:11:10 +1030
commit4f2cd0ed96d3b10c78774c721c2ffbfb0556dddd (patch)
tree9f477ddd4af2162152057bded1426102b475e67c /Xi/chgdctl.c
parent23ae68a4c74a2ec90b4130c37b0d0aec3f4082ce (diff)
parent453661a9e193a511cf5e54e6d330454163817316 (diff)
Merge branch 'master' into mpx
This merge reverts Magnus' device coorindate scaling changes. MPX core event generation is very different, so we can't scale in GetPointerEvents. Conflicts: Xi/opendev.c dix/devices.c dix/dixfonts.c dix/getevents.c dix/resource.c dix/window.c hw/xfree86/common/xf86Xinput.c mi/mipointer.c xkb/ddxBeep.c xkb/ddxCtrls.c xkb/ddxKeyClick.c xkb/ddxList.c xkb/ddxLoad.c xkb/xkb.c xkb/xkbAccessX.c xkb/xkbEvents.c xkb/xkbInit.c xkb/xkbPrKeyEv.c xkb/xkbUtils.c
Diffstat (limited to 'Xi/chgdctl.c')
-rw-r--r--Xi/chgdctl.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 937bb38e4..26b79f6dc 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -77,11 +77,46 @@ int
SProcXChangeDeviceControl(ClientPtr client)
{
char n;
+ xDeviceCtl *ctl;
+ xDeviceAbsCalibCtl *calib;
+ xDeviceAbsAreaCtl *area;
REQUEST(xChangeDeviceControlReq);
swaps(&stuff->length, n);
REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
swaps(&stuff->control, n);
+ ctl = (xDeviceCtl*)&stuff[1];
+ swaps(&ctl->control, n);
+ swaps(&ctl->length, n);
+ switch(stuff->control) {
+ case DEVICE_ABS_CALIB:
+ calib = (xDeviceAbsCalibCtl*)ctl;
+ swaps(&calib->length, n);
+ swapl(&calib->min_x, n);
+ swapl(&calib->max_x, n);
+ swapl(&calib->min_y, n);
+ swapl(&calib->max_y, n);
+ swapl(&calib->flip_x, n);
+ swapl(&calib->flip_y, n);
+ swapl(&calib->rotation, n);
+ swapl(&calib->button_threshold, n);
+ break;
+ case DEVICE_ABS_AREA:
+ area = (xDeviceAbsAreaCtl*)ctl;
+ swapl(&area->offset_x, n);
+ swapl(&area->offset_y, n);
+ swapl(&area->width, n);
+ swapl(&area->height, n);
+ swapl(&area->screen, n);
+ swapl(&area->following, n);
+ break;
+ case DEVICE_CORE:
+ case DEVICE_ENABLE:
+ case DEVICE_RESOLUTION:
+ /* hmm. beer. *drool* */
+ break;
+
+ }
return (ProcXChangeDeviceControl(client));
}
@@ -111,7 +146,7 @@ ProcXChangeDeviceControl(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
len = stuff->length - (sizeof(xChangeDeviceControlReq) >> 2);
- ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
+ ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
if (ret != Success)
goto out;