mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-30 21:53:25 +00:00
dix: store subpixel precision and send it down the wire to the client.
For the valuator data, not yet for root x/y and event x/y. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
9212948461
commit
4318075140
3 changed files with 12 additions and 5 deletions
|
|
@ -357,7 +357,7 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
|
|||
xXIDeviceEvent *xde;
|
||||
int i, btlen, vallen;
|
||||
char *ptr;
|
||||
int32_t *axisval;
|
||||
FP3232 *axisval;
|
||||
|
||||
/* FIXME: this should just send the buttons we have, not MAX_BUTTONs. Same
|
||||
* with MAX_VALUATORS below */
|
||||
|
|
@ -401,15 +401,15 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
|
|||
}
|
||||
|
||||
ptr += xde->buttons_len * 4;
|
||||
axisval = (int32_t*)(ptr + xde->valuators_len * 4);
|
||||
axisval = (FP3232*)(ptr + xde->valuators_len * 4);
|
||||
for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++)
|
||||
{
|
||||
if (BitIsOn(ev->valuators.mask, i))
|
||||
{
|
||||
SetBit(ptr, i);
|
||||
*axisval = ev->valuators.data[i];
|
||||
axisval->integral = ev->valuators.data[i];
|
||||
axisval->frac = ev->valuators.data_frac[i];
|
||||
axisval++;
|
||||
axisval++; /* FIXME: this should be the frac. part */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -451,9 +451,10 @@ eventToRawEvent(RawDeviceEvent *ev, xEvent **xi)
|
|||
{
|
||||
SetBit(ptr, i);
|
||||
axisval->integral = ev->valuators.data[i];
|
||||
axisval->frac = ev->valuators.data_frac[i];
|
||||
(axisval + nvals)->integral = ev->valuators.data_raw[i];
|
||||
(axisval + nvals)->frac = ev->valuators.data_raw_frac[i];
|
||||
axisval++;
|
||||
/* FIXME: frac part */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue