aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-hid.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-02-23 15:24:24 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-02-27 11:13:26 +0100
commit299aa1c6df1a308cc4d49666e7eb75655c0d40ce (patch)
treebeb19b5dc3839871a8016cdd1429f43f4485f723 /hw/usb-hid.c
parentb4bd0b168e9f4898b98308f4a8a089f647a86d16 (diff)
usb-hid: fix tablet activation
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>
Diffstat (limited to 'hw/usb-hid.c')
-rw-r--r--hw/usb-hid.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb-hid.c b/hw/usb-hid.c
index 7fc0bd81aa..37bca78eca 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -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;