mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 23:28:05 +02:00
Xi: fix up button count.
Some leftover code from the previously used alloc/free device classes left us with a incorrect button count. So a button release didn't come through if a different pointer was moved after the button press.
This commit is contained in:
parent
1a9d7205cd
commit
4cf9c5909d
1 changed files with 3 additions and 0 deletions
|
|
@ -603,6 +603,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
|
|||
}
|
||||
}
|
||||
|
||||
to->button->buttonsDown = 0;
|
||||
memset(to->button->down, 0, MAP_LENGTH);
|
||||
/* merge button states from all attached devices */
|
||||
for (sd = inputInfo.devices; sd; sd = sd->next)
|
||||
{
|
||||
|
|
@ -612,6 +614,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
|
|||
for (i = 0; i < MAP_LENGTH; i++)
|
||||
{
|
||||
to->button->down[i] += sd->button->down[i];
|
||||
to->button->buttonsDown++;
|
||||
}
|
||||
}
|
||||
#ifdef XKB
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue