mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 23:28:05 +02:00
Input: Use previous state in valuator events
Make valuator event state match other events by using the device state from before processing the event, not after. Also, we already check the number of valuators in UpdateDeviceState, so no need to do it again. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
18e51911f5
commit
ddb46c1421
1 changed files with 2 additions and 14 deletions
|
|
@ -952,20 +952,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count)
|
|||
|
||||
/* Valuator event handling */
|
||||
for (i = 1; i < count; i++) {
|
||||
if ((++xV)->type == DeviceValuator) {
|
||||
int first = xV->first_valuator;
|
||||
if (xV->num_valuators
|
||||
&& (!v
|
||||
|| (xV->num_valuators
|
||||
&& (first + xV->num_valuators > v->numAxes))))
|
||||
FatalError("Bad valuators reported for device %s\n",
|
||||
device->name);
|
||||
xV->device_state = 0;
|
||||
if (k)
|
||||
xV->device_state |= XkbStateFieldFromRec(&k->xkbInfo->state);
|
||||
if (b)
|
||||
xV->device_state |= b->state;
|
||||
}
|
||||
if ((++xV)->type == DeviceValuator)
|
||||
xV->device_state = state;
|
||||
}
|
||||
|
||||
if (xE->u.u.type == DeviceKeyPress) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue