summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hw/pckbd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/pckbd.c b/hw/pckbd.c
index ae2cf27f16..2328d209f1 100644
--- a/hw/pckbd.c
+++ b/hw/pckbd.c
@@ -445,6 +445,10 @@ void kbd_mouse_event(int dx, int dy, int dz, int buttons_state)
     s->mouse_dx += dx;
     s->mouse_dy -= dy;
     s->mouse_dz += dz;
+    /* XXX: SDL sometimes generates nul events: we delete them */
+    if (s->mouse_dx == 0 && s->mouse_dy == 0 && s->mouse_dz == 0 &&
+        s->mouse_buttons == buttons_state)
+	return;
     s->mouse_buttons = buttons_state;
     
     if (!(s->mouse_status & MOUSE_STATUS_REMOTE) &&