update KDrive to new input API
Update KDrive to fit the new API (mieqInit and InitPointerDeviceStruct), and include InitTouchscreenDeviceStruct in the DIX.
This commit is contained in:
parent
1987af8c49
commit
463e0fe35b
|
@ -837,6 +837,27 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
|
||||||
return TRUE;
|
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
|
_X_EXPORT Bool
|
||||||
InitFocusClassDeviceStruct(DeviceIntPtr dev)
|
InitFocusClassDeviceStruct(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -441,7 +441,7 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
|
||||||
InitPointerDeviceStruct(pDev, pi->map, pi->nButtons,
|
InitPointerDeviceStruct(pDev, pi->map, pi->nButtons,
|
||||||
miPointerGetMotionEvents,
|
miPointerGetMotionEvents,
|
||||||
(PtrCtrlProcPtr)NoopDDA,
|
(PtrCtrlProcPtr)NoopDDA,
|
||||||
miPointerGetMotionBufferSize());
|
miPointerGetMotionBufferSize(), pi->nAxes);
|
||||||
|
|
||||||
#ifdef XINPUT
|
#ifdef XINPUT
|
||||||
if (pi->inputClass == KD_TOUCHSCREEN) {
|
if (pi->inputClass == KD_TOUCHSCREEN) {
|
||||||
|
@ -1280,7 +1280,7 @@ KdInitInput (void)
|
||||||
ErrorF("Failed to add keyboard!\n");
|
ErrorF("Failed to add keyboard!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
mieqInit(NULL, NULL);
|
mieqInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user