i386/vmmouse: Properly reset state

nb_queue was not zeroed so that we no longer delivered events if a
previous guest left the device in an overflow state.

The state of absolute does not matter as the next vmmouse_update_handler
call will align it again.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Message-Id: <f056c7e5-fa74-469c-87f8-0f0925301b2d@web.de>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Jan Kiszka 2019-07-21 10:58:56 +02:00 committed by Eduardo Habkost
parent 7faae95ebc
commit f685f45157
1 changed files with 1 additions and 0 deletions

View File

@ -258,6 +258,7 @@ static void vmmouse_reset(DeviceState *d)
VMMouseState *s = VMMOUSE(d); VMMouseState *s = VMMOUSE(d);
s->queue_size = VMMOUSE_QUEUE_SIZE; s->queue_size = VMMOUSE_QUEUE_SIZE;
s->nb_queue = 0;
vmmouse_disable(s); vmmouse_disable(s);
} }