Re: [DIGImend-users] Bizarre Tablet Issues Return
Brought to you by:
spb_nick
|
From: Favux ... <fav...@gm...> - 2012-10-11 18:48:44
|
Sorry, should have shown details:
$ patch -p2 < 0001-dix-undo-transformation-for-missing-valuators-49347.patch
patching file getevents.c
Hunk #1 succeeded at 1146 (offset -21 lines).
And now the function looks like (other than the indents):
/**
* Apply the device's transformation matrix to the valuator mask and replace
* the scaled values in mask. This transformation only applies to valuators
* 0 and 1, others will be untouched.
*
* @param dev The device the valuators came from
* @param[in,out] mask The valuator mask.
*/
static void
transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
{
double x, y, ox, oy;
if (!valuator_mask_isset(mask, 0) || !valuator_mask_isset(mask, 1)) {
struct pixman_f_transform invert;
/* undo transformation from last event */
ox = dev->last.valuators[0];
oy = dev->last.valuators[1];
pixman_f_transform_invert(&invert, &dev->transform);
transform(&invert, &ox, &oy);
x = ox;
y = oy;
}
if (valuator_mask_isset(mask, 0))
ox = x = valuator_mask_get_double(mask, 0);
if (valuator_mask_isset(mask, 1))
oy = y = valuator_mask_get_double(mask, 1);
transform(&dev->transform, &x, &y);
if (valuator_mask_isset(mask, 0) || ox != x)
valuator_mask_set_double(mask, 0, x);
if (valuator_mask_isset(mask, 1) || oy != y)
valuator_mask_set_double(mask, 1, y);
}
|