From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2KAg-0006Tl-1n for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2KAc-0003z6-Ud for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2KAc-0003yU-Nn for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:34 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1SAKWsk026938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Feb 2012 05:20:33 -0500 From: Gerd Hoffmann Date: Tue, 28 Feb 2012 11:20:10 +0100 Message-Id: <1330424430-23015-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1330424430-23015-1-git-send-email-kraxel@redhat.com> References: <1330424430-23015-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 01/21] 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 7fc0bd8..37bca78 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