]> git.proxmox.com Git - qemu.git/commitdiff
usb-hid: fix tablet activation
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 23 Feb 2012 14:24:24 +0000 (15:24 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 27 Feb 2012 10:13:26 +0000 (11:13 +0100)
Activate usb hid pointer devices (mouse+tablet) unconditionally
on polls, even if we NAK the poll due to lack of new events.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-hid.c

index 7fc0bd81aac775fa39f4568723641afbfd6cde9d..37bca78ecaf3a03be9f3dc5d93cbc6362235c3fd 100644 (file)
@@ -466,6 +466,9 @@ static int usb_hid_handle_data(USBDevice *dev, USBPacket *p)
     case USB_TOKEN_IN:
         if (p->ep->nr == 1) {
             int64_t curtime = qemu_get_clock_ns(vm_clock);
+            if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) {
+                hid_pointer_activate(hs);
+            }
             if (!hid_has_events(hs) &&
                 (!hs->idle || hs->next_idle_clock - curtime > 0)) {
                 return USB_RET_NAK;