diff options
author | Zephaniah E. Hull <warp@agamemnon.b5> | 2006-10-21 04:01:46 -0400 |
---|---|---|
committer | Zephaniah E. Hull <warp@agamemnon.b5> | 2006-10-21 04:01:46 -0400 |
commit | 50c88082ba2ee4785f4beaa351f2b772f1a381ad (patch) | |
tree | 065fa07905657f3516e7367a7b979e9358ecbb7d /src/XChgDCtl.c | |
parent | 2a3f042241bb63601f5745f397bb1b66ecc5a592 (diff) |
Comment out DEVICE_ENABLE, and use of iscore in the DEVICE_CORE control.input-hotplug
(We now compile again.)
Track the DEVICE_TOUCHSCREEN -> DEVICE_ABS_CALIB and new DEVICE_ABS_AREA
changes to the input protocol.
Diffstat (limited to 'src/XChgDCtl.c')
-rw-r--r-- | src/XChgDCtl.c | 59 |
1 files changed, 45 insertions, 14 deletions
diff --git a/src/XChgDCtl.c b/src/XChgDCtl.c index 49e3a52..e70db73 100644 --- a/src/XChgDCtl.c +++ b/src/XChgDCtl.c @@ -107,21 +107,50 @@ XChangeDeviceControl(dpy, dev, control, d) } else return (rep.status); } - case DEVICE_TOUCHSCREEN: + case DEVICE_ABS_CALIB: { - XDeviceTSControl *T = (XDeviceTSControl *) d; - xDeviceTSCtl t; - - t.control = DEVICE_TOUCHSCREEN; - t.length = sizeof(t); - t.min_x = T->min_x; - t.max_x = T->max_x; - t.min_y = T->min_y; - t.max_y = T->max_y; - t.button_threshold = T->button_threshold; - - req->length += (sizeof(t) + 3) >> 2; - Data(dpy, (char *) &t, sizeof(t)); + XDeviceAbsCalibControl *C = (XDeviceAbsCalibControl *) d; + xDeviceAbsCalibCtl c; + + c.control = DEVICE_ABS_CALIB; + c.length = sizeof(c); + c.min_x = C->min_x; + c.max_x = C->max_x; + c.min_y = C->min_y; + c.max_y = C->max_y; + c.flip_x = C->flip_x; + c.flip_y = C->flip_y; + c.rotation = C->rotation; + c.button_threshold = C->button_threshold; + + req->length += (sizeof(c) + 3) >> 2; + Data(dpy, (char *) &c, sizeof(c)); + + if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay(dpy); + SyncHandle(); + return NoSuchExtension; + } + else { + return rep.status; + } + } + case DEVICE_ABS_AREA: + { + XDeviceAbsAreaControl *A = (XDeviceAbsAreaControl *) d; + xDeviceAbsAreaCtl a; + + a.control = DEVICE_ABS_AREA; + a.length = sizeof(a); + a.offset_x = A->offset_x; + a.offset_y = A->offset_y; + a.width = A->width; + a.height = A->height; + a.screen = A->screen; + a.following = A->following; + + req->length += (sizeof(a) + 3) >> 2; + Data(dpy, (char *) &a, sizeof(a)); if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) { UnlockDisplay(dpy); @@ -153,6 +182,7 @@ XChangeDeviceControl(dpy, dev, control, d) return rep.status; } } +#if 0 case DEVICE_ENABLE: { XDeviceEnableControl *E = (XDeviceEnableControl *) d; @@ -174,6 +204,7 @@ XChangeDeviceControl(dpy, dev, control, d) return rep.status; } } +#endif default: { xDeviceCtl u; |