From 21635e121ae0f0ab7874152a7c2f96e9d8cd642f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 9 Aug 2011 12:35:57 +0200 Subject: usb/hid: add hid_pointer_activate, use it HID reorganziation broke the usb tablet in windows xp. The reason is that xp activates idle before it starts polling, which creates a chicken-and-egg issue: We don't call hid_pointer_poll because there are no pending events. We don't get any events because the activation code in hid_pointer_poll is never executed and thus all pointer events are routed to the PS/2 mouse by qemu. Fix this by creating a hid_pointer_activate function and call it from usb-hid when the guest sets the idle state. Signed-off-by: Gerd Hoffmann --- hw/hid.h | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/hid.h') diff --git a/hw/hid.h b/hw/hid.h index 4a8fa5b63..9ce03b118 100644 --- a/hw/hid.h +++ b/hw/hid.h @@ -51,6 +51,7 @@ void hid_free(HIDState *hs); bool hid_has_events(HIDState *hs); void hid_set_next_idle(HIDState *hs, int64_t curtime); +void hid_pointer_activate(HIDState *hs); int hid_pointer_poll(HIDState *hs, uint8_t *buf, int len); int hid_keyboard_poll(HIDState *hs, uint8_t *buf, int len); int hid_keyboard_write(HIDState *hs, uint8_t *buf, int len); -- cgit v1.2.3