mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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 <kraxel@redhat.com>
This commit is contained in:
parent
b9c6cbff76
commit
21635e121a
3 changed files with 13 additions and 4 deletions
|
@ -454,6 +454,9 @@ static int usb_hid_handle_control(USBDevice *dev, USBPacket *p,
|
|||
case SET_IDLE:
|
||||
hs->idle = (uint8_t) (value >> 8);
|
||||
hid_set_next_idle(hs, qemu_get_clock_ns(vm_clock));
|
||||
if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) {
|
||||
hid_pointer_activate(hs);
|
||||
}
|
||||
ret = 0;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue