From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa7Li-0003un-Nu for qemu-devel@nongnu.org; Fri, 24 Jun 2011 10:27:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qa7Lh-0002yB-4x for qemu-devel@nongnu.org; Fri, 24 Jun 2011 10:27:10 -0400 Received: from goliath.siemens.de ([192.35.17.28]:25749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa7Lg-0002xG-GL for qemu-devel@nongnu.org; Fri, 24 Jun 2011 10:27:08 -0400 Message-ID: <4E049EB7.4010309@siemens.com> Date: Fri, 24 Jun 2011 16:27:03 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] usb-hid: Fix 0/0 position for Windows in tablet mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , Gerd Hoffmann For unknown reasons, Windows drivers (tested with XP and Win7) ignore usb-tablet events that move the pointer to 0/0. So always set bit 0 of the coordinates. Signed-off-by: Jan Kiszka --- hw/usb-hid.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/usb-hid.c b/hw/usb-hid.c index d711b5c..2b9a451 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -457,8 +457,10 @@ static void usb_pointer_event_combine(USBPointerEvent *e, int xyrel, e->xdx += x1; e->ydy += y1; } else { - e->xdx = x1; - e->ydy = y1; + /* Windows drivers do not like the 0/0 position and ignore such + * events. */ + e->xdx = x1 | 1; + e->ydy = y1 | 1; } e->dz += z1; }