Rewrite mouse handlers to use QTAILQ and to have an activation function
authorAnthony Liguori <aliguori@us.ibm.com>
Wed, 10 Mar 2010 02:52:22 +0000 (20:52 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 19 Mar 2010 20:27:38 +0000 (15:27 -0500)
commit53cc17a044553a1fd1cf90a3cb3801be3853ddb4
tree44ca8b9340ab1b8de2fefa84706ebbdcfe262c8f
parent759f6c874a32ad7fc4821b061aa7f48dd72dbcfb
Rewrite mouse handlers to use QTAILQ and to have an activation function

And convert usb-hid to use it (to avoid regression with bisection)

Right now, when we do info mice and we've added a usb tablet, we don't see it
until the guest starts using the tablet.  We implement this behavior in order
to provide a means to delay registration of a mouse handler since we treat
the last registered handler as the current handler.

This is a usability problem though as we would like to give the user feedback
that they've either 1) not added an absolute device 2) there is an absolute
device but the guest isn't using it 3) we have an absolute device and it's
active.

By using QTAILQ and having an explicit activation function that moves the
handler to the front of the queue, we can implement the same semantics as
before with respect to automatically switching to usb tablet while providing
the user with a whole lot more information.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
console.h
hw/usb-hid.c
input.c