On 09/14/2011 09:40 AM, TeLeMan wrote:
>>
>>  The commit "usb/hid: add hid_pointer_activate, use it" used
>>  HIDMouseState.mouse_grabbed in hid_pointer_activate(), so
>>  mouse_grabbed should be added into vmstat.
>
>  Does this fix a bug?  qemu_activate_mouse_event_handler is meant to be
>  called once per execution of the VM, it is not guest state.
Yes, this patch fixes the usb mouse not be working after loadvm in the
guest windows.

I'm wondering if, with your patch, Windows is actually using the PS/2 mouse after loadvm... If that is the case, perhaps instead you can move

        if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) {
            hid_pointer_activate(hs);
        }

from hw/usb-hid.c to hid_set_next_idle, which is called at post-load time.

Paolo

Reply via email to