diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-07-22 13:43:07 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-07-25 12:57:41 +1000 |
commit | 3d8756631070c440cefa31b35fea3d407f187810 (patch) | |
tree | 785e3cd0726be68d563abb03b7b7ef68f4c72bd7 /dix/getevents.c | |
parent | 4fb686d6a6777950f0e0d55b848cd2af4cbad372 (diff) |
dix: set the valuator mask to ensure XI 1.x events have data
XI 1.x only allows for first + num valuators, so if a device sends data for
valuators 0 and 2+ only (i.e. valuator 1 is missing) we still need to get
the data for that from somewhere.
XI 1.x uses the hack of an unset valuator mask to get the right coordinates,
i.e. we set the value but don't set the mask for it so XI2 events have the
right mask.
For an absolute device in relative mode, this broke in b28a1af55cf, the
value was now always 0. This wasn't visible on the cursor, only in an XI 1.x
client. The GIMP e.g. sees jumps to x/0 every few events.
Drop the condition introduced in b28a1af55cf, data in valuators is always
absolute, regardless of the mode.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/getevents.c')
-rw-r--r-- | dix/getevents.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index f5ab8c458..14b65cabc 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -239,7 +239,7 @@ set_valuators(DeviceIntPtr dev, DeviceEvent *event, ValuatorMask *mask) SetBit(event->valuators.mode, i); event->valuators.data[i] = valuator_mask_get_double(mask, i); } - else if (valuator_get_mode(dev, i) == Absolute) + else event->valuators.data[i] = dev->valuator->axisVal[i]; } } |