From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0Zd9-0000cR-4F for qemu-devel@nongnu.org; Thu, 23 Feb 2012 09:26:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0Zd2-0003j8-1W for qemu-devel@nongnu.org; Thu, 23 Feb 2012 09:26:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0Zd1-0003if-Qp for qemu-devel@nongnu.org; Thu, 23 Feb 2012 09:26:40 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1NEQc7j007624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 Feb 2012 09:26:38 -0500 From: Gerd Hoffmann Date: Thu, 23 Feb 2012 15:26:36 +0100 Message-Id: <1330007196-14253-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] usb-hid: fix tablet activation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/usb-hid.c b/hw/usb-hid.c index 53353d3..36730ce 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; -- 1.7.1