mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-31 11:20:09 +01:00
Release all pressed keys and buttons when device is disabled.
This commit is contained in:
parent
0cfed6a2d7
commit
1df5903f9a
1 changed files with 9 additions and 1 deletions
|
|
@ -1780,13 +1780,21 @@ dmxInputEnable (DMXInputInfo *dmxInput)
|
|||
int
|
||||
dmxInputDisable (DMXInputInfo *dmxInput)
|
||||
{
|
||||
int i;
|
||||
char state[32];
|
||||
int i;
|
||||
|
||||
memset (state, 0, sizeof (state));
|
||||
|
||||
for (i = 0; i < dmxInput->numDevs; i++)
|
||||
{
|
||||
dmxLogInput (dmxInput, "Disable device id %d: %s\n",
|
||||
dmxInput->devs[i]->id, dmxInput->devs[i]->name);
|
||||
|
||||
if (dmxInput->devs[i]->key)
|
||||
dmxUpdateKeyState (dmxInput->devs[i], state);
|
||||
else if (dmxInput->devs[i]->button)
|
||||
dmxUpdateButtonState (dmxInput->devs[i], state);
|
||||
|
||||
DisableDevice (dmxInput->devs[i]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue