From 463e0fe35bec3c91b19be9aacf34babb146a88c9 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 20 Jul 2006 16:45:15 -0400 Subject: [PATCH] update KDrive to new input API Update KDrive to fit the new API (mieqInit and InitPointerDeviceStruct), and include InitTouchscreenDeviceStruct in the DIX. --- dix/devices.c | 21 +++++++++++++++++++++ hw/kdrive/src/kinput.c | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index a3ce17826..52a0a0ac2 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -837,6 +837,27 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, return TRUE; } +_X_EXPORT Bool +InitTouchscreenClassDeviceStruct(DeviceIntPtr dev) +{ + register TouchscreenClassPtr tsc; + + tsc = (TouchscreenClassPtr)xalloc(sizeof(TouchscreenClassRec)); + if (!tsc) + return FALSE; + + /* we don't do anything sensible with these, but should */ + tsc->min_x = -1; + tsc->min_y = -1; + tsc->max_x = -1; + tsc->max_y = -1; + + tsc->button_threshold = 0; + dev->touchscreen = tsc; + + return TRUE; +} + _X_EXPORT Bool InitFocusClassDeviceStruct(DeviceIntPtr dev) { diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 94c3abd28..13869c91b 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -441,7 +441,7 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) InitPointerDeviceStruct(pDev, pi->map, pi->nButtons, miPointerGetMotionEvents, (PtrCtrlProcPtr)NoopDDA, - miPointerGetMotionBufferSize()); + miPointerGetMotionBufferSize(), pi->nAxes); #ifdef XINPUT if (pi->inputClass == KD_TOUCHSCREEN) { @@ -1280,7 +1280,7 @@ KdInitInput (void) ErrorF("Failed to add keyboard!\n"); } - mieqInit(NULL, NULL); + mieqInit(); } /*