From 8534b8ba337e55031592144ea524f7bcaf144113 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 30 Jul 2011 07:18:41 +0200 Subject: usb-hid: Fix 0/0 position for Windows in tablet mode For unknown reasons, Windows drivers (tested with XP and Win7) ignore usb-tablet events that move the pointer to 0/0. So always report 0/0 as 1/0. Signed-off-by: Jan Kiszka Signed-off-by: Andrzej Zaborowski --- hw/usb-hid.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/usb-hid.c b/hw/usb-hid.c index b812da2a6a..9008320c86 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -459,6 +459,11 @@ static void usb_pointer_event_combine(USBPointerEvent *e, int xyrel, } else { e->xdx = x1; e->ydy = y1; + /* Windows drivers do not like the 0/0 position and ignore such + * events. */ + if (!(x1 | y1)) { + x1 = 1; + } } e->dz += z1; } -- cgit v1.2.1