winex11: Don't enable XInput for devices reporting absolute coordinates.
This commit is contained in:
parent
dc16a01fdf
commit
b3946a0a59
|
@ -258,7 +258,7 @@ static void enable_xinput2(void)
|
||||||
XIDeviceInfo *devices;
|
XIDeviceInfo *devices;
|
||||||
XIEventMask mask;
|
XIEventMask mask;
|
||||||
unsigned char mask_bits[XIMaskLen(XI_LASTEVENT)];
|
unsigned char mask_bits[XIMaskLen(XI_LASTEVENT)];
|
||||||
int i, count;
|
int i, j, count;
|
||||||
|
|
||||||
if (!xinput2_available) return;
|
if (!xinput2_available) return;
|
||||||
|
|
||||||
|
@ -281,6 +281,20 @@ static void enable_xinput2(void)
|
||||||
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
if (devices[i].use != XIMasterPointer) continue;
|
if (devices[i].use != XIMasterPointer) continue;
|
||||||
|
for (j = 0; j < devices[i].num_classes; j++)
|
||||||
|
{
|
||||||
|
XIValuatorClassInfo *class = (XIValuatorClassInfo *)devices[i].classes[j];
|
||||||
|
|
||||||
|
if (devices[i].classes[j]->type != XIValuatorClass) continue;
|
||||||
|
if (class->number != 0 && class->number != 1) continue;
|
||||||
|
if (class->mode == XIModeAbsolute)
|
||||||
|
{
|
||||||
|
TRACE( "Device %u (%s) class %u num %u %f,%f res %u is absolute, not enabling XInput2\n",
|
||||||
|
devices[i].deviceid, debugstr_a(devices[i].name),
|
||||||
|
j, class->number, class->min, class->max, class->resolution );
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
TRACE( "Using %u (%s) as core pointer\n",
|
TRACE( "Using %u (%s) as core pointer\n",
|
||||||
devices[i].deviceid, debugstr_a(devices[i].name) );
|
devices[i].deviceid, debugstr_a(devices[i].name) );
|
||||||
xinput2_core_pointer = devices[i].deviceid;
|
xinput2_core_pointer = devices[i].deviceid;
|
||||||
|
@ -304,6 +318,7 @@ static void enable_xinput2(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
pXIFreeDeviceInfo( devices );
|
pXIFreeDeviceInfo( devices );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue