From 299aa1c6df1a308cc4d49666e7eb75655c0d40ce Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 23 Feb 2012 15:24:24 +0100 Subject: 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 --- hw/usb-hid.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw') diff --git a/hw/usb-hid.c b/hw/usb-hid.c index 7fc0bd81a..37bca78ec 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; -- cgit v1.2.3