dix: support the transformation matrix for relative devices.
The transformation matrix we previously stored was a scaled matrix based on the axis ranges of the device. For relative movements, the scaling is not required (or desired). Store two separate matrices, one as requested by the client, one as the product of [scale . matrix . inv_scale]. Depending on the type of movement, apply the respective matrix. For relative movements, also drop the translation component since it doesn't really make sense to use that bit. Input ABI 19 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
committed by
Keith Packard
parent
b173eb2ae3
commit
b58221f9da
@@ -588,8 +588,12 @@ typedef struct _DeviceIntRec {
|
||||
XIPropertyHandlerPtr handlers; /* NULL-terminated */
|
||||
} properties;
|
||||
|
||||
/* coordinate transformation matrix for absolute input devices */
|
||||
struct pixman_f_transform transform;
|
||||
/* coordinate transformation matrix for relative movement. Matrix with
|
||||
* the translation component dropped */
|
||||
struct pixman_f_transform relative_transform;
|
||||
/* scale matrix for absolute devices, this is the combined matrix of
|
||||
[1/scale] . [transform] . [scale]. See DeviceSetTransform */
|
||||
struct pixman_f_transform scale_and_transform;
|
||||
|
||||
/* XTest related master device id */
|
||||
int xtest_master_id;
|
||||
|
||||
Reference in New Issue
Block a user