mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 08:18:13 +02:00
Xi: Fix master button update when slave buttons are mapped. #24887
It is currently assumed that an event button delieved to a master device
corresponds to the slave button states. However, the event button is a
logical (mapped) slave button and slave button states correspond to
physical (unmapped) slave buttons. This leads to incorrect update of the
master button state and incorrect events devlivered to clients. Fix the
situation by taking the slave button map into account when querying a
slave button state.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24887
Signed-off-by: Eoghan Sherry <ejsherry@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 36b614dedf)
This commit is contained in:
parent
faecab3b13
commit
97f40a17af
1 changed files with 4 additions and 2 deletions
|
|
@ -878,8 +878,10 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
|
|||
continue;
|
||||
if (!sd->button)
|
||||
continue;
|
||||
if (button_is_down(sd, key, BUTTON_PROCESSED))
|
||||
return DONT_PROCESS;
|
||||
for (i = 1; i <= sd->button->numButtons; i++)
|
||||
if (sd->button->map[i] == key &&
|
||||
button_is_down(sd, i, BUTTON_PROCESSED))
|
||||
return DONT_PROCESS;
|
||||
}
|
||||
}
|
||||
set_button_up(device, key, BUTTON_PROCESSED);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue