mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 02:40:14 +01:00
dix: set the device transformation matrix
The property handler is registered after setting the property, so dev->transform remains as all-zeros. That causes pixman_f_transform_invert() to fail (in transformAbsolute()) and invert remains as garbage. This may then cause a cursor jump to 0,0. Since the axes are not yet initialized here and we need to allow for drivers changing the matrix, we cannot use the property handler for matrix initialization, essentially duplicating the code. Triggered by the fix to (#49347) in749a593e49https://bugzilla.redhat.com/show_bug.cgi?id=852841 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit3d1051aecb)
This commit is contained in:
parent
f0bad69edd
commit
e31e272f4f
1 changed files with 3 additions and 0 deletions
|
|
@ -306,6 +306,9 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
|
|||
/* unity matrix */
|
||||
memset(transform, 0, sizeof(transform));
|
||||
transform[0] = transform[4] = transform[8] = 1.0f;
|
||||
dev->transform.m[0][0] = 1.0;
|
||||
dev->transform.m[1][1] = 1.0;
|
||||
dev->transform.m[2][2] = 1.0;
|
||||
|
||||
XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM),
|
||||
XIGetKnownProperty(XATOM_FLOAT), 32,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue