mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-06 02:38:32 +02:00
Xi: fix length calculation for ValuatorState in QueryDeviceState reply.
The length field needs to include the bytes required for the valuators
(INT32) as well.
The reply length has the right value and since the valuator state is always
last, clients didn't notice the wrong offset.
Tested-by: Thomas Jaeger
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 6ee796e9bb)
This commit is contained in:
parent
a9e2f7ac15
commit
9e39491166
1 changed files with 1 additions and 1 deletions
|
|
@ -147,7 +147,7 @@ ProcXQueryDeviceState(ClientPtr client)
|
|||
if (v != NULL) {
|
||||
tv = (xValuatorState *) buf;
|
||||
tv->class = ValuatorClass;
|
||||
tv->length = sizeof(xValuatorState);
|
||||
tv->length = sizeof(xValuatorState) + v->numAxes * 4;
|
||||
tv->num_valuators = v->numAxes;
|
||||
tv->mode = v->mode;
|
||||
buf += sizeof(xValuatorState);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue