aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/vmmouse.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2019-07-21 10:58:56 +0200
committerEduardo Habkost <ehabkost@redhat.com>2019-09-03 14:39:46 -0300
commitf685f451578e5231bc899c48911cf7b98cad47f6 (patch)
tree42b91294feef03395ba6a89322fe6f6dc80b4d90 /hw/i386/vmmouse.c
parent7faae95ebc966c2981b78cf7c25009dfa32d4b72 (diff)
downloadqemu-f685f451578e5231bc899c48911cf7b98cad47f6.zip
qemu-f685f451578e5231bc899c48911cf7b98cad47f6.tar.gz
qemu-f685f451578e5231bc899c48911cf7b98cad47f6.tar.bz2
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>
Diffstat (limited to 'hw/i386/vmmouse.c')
-rw-r--r--hw/i386/vmmouse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index 012ab90..41ad91a 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -258,6 +258,7 @@ static void vmmouse_reset(DeviceState *d)
VMMouseState *s = VMMOUSE(d);
s->queue_size = VMMOUSE_QUEUE_SIZE;
+ s->nb_queue = 0;
vmmouse_disable(s);
}