summaryrefslogtreecommitdiffstats
path: root/input.c
Commit message (Collapse)AuthorAgeFilesLines
* input: send kbd+mouse events only to running guests.Gerd Hoffmann2012-02-171-0/+6
| | | | | | | | | | | | Trying to interact with a stopped guest will queue up the events, then send them all at once when the guest continues running, with a high chance to have them cause unwanted actions. Avoid that by only injecting the input events only when the guest is in running state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* notifier: switch to QLISTPaolo Bonzini2012-02-171-1/+1
| | | | | | | | Notifiers do not need to access both ends of the list, and using a QLIST also simplifies the API. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qapi: Convert query-miceLuiz Capitulino2011-10-271-48/+16
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-6/+6
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* notifier: Pass data argument to callbackJan Kiszka2011-07-231-1/+1
| | | | | | | | | | | This allows to pass additional information to the notifier callback which is useful if sender and receiver do not share any other distinct data structure. Will be used first for the clock reset notifier. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pxa2xx_lcd: add proper rotation supportVasily Khoruzhick2011-07-041-9/+25
| | | | | | | | Until now, pxa2xx_lcd only supported 90deg rotation, but some machines (for example Zipit Z2) needs 270deg rotation. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* event: trivial coding style fixesBrad Hards2011-04-091-7/+7
| | | | | Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* un-register kbd driver in case of USB kbd unplug.Jes Sorensen2010-06-141-0/+6
| | | | | | | | | If a USB keyboard is unplugged, the keyboard eventhandler is never removed, and events will continue to be passed through to the device, causing crashes or memory corruption. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Drop QMP documentation from codeLuiz Capitulino2010-06-011-18/+0
| | | | | | | | | | | | | Previous commit added QMP documentation to the qemu-monitor.hx file, it's is a copy of this information. While it's good to keep it near code, maintaining two copies of the same information is too hard and has little benefit as we don't expect client writers to consult the code to find how to use a QMP command. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Expose whether a mouse is an absolute device via QMP and the human monitor.Anthony Liguori2010-03-191-6/+12
| | | | | | | For QMP, we just add an attribute which is backwards compatible. For the human monitor, we add (absolute) to the end of the line. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add notifier for mouse mode changesAnthony Liguori2010-03-191-1/+36
| | | | | | | | Right now, DisplayState clients rely on polling the mouse mode to determine when the device is changed to an absolute device. Use a notification list to add an explicit notification. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add kbd_mouse_has_absolute()Anthony Liguori2010-03-191-0/+13
| | | | | | | | | | | kbd_mouse_is_absolute tells us whether the current mouse handler is an absolute device. kbd_mouse_has_absolute tells us whether we have any device that is capable of absolute input. This lets us tell a user that they have configured an absolute device but that the guest is not currently using it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Rewrite mouse handlers to use QTAILQ and to have an activation functionAnthony Liguori2010-03-191-66/+43
| | | | | | | | | | | | | | | | | | | | | 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>
* kbd leds: infrastructureGerd Hoffmann2010-03-091-0/+31
| | | | | | | Adds infrastructure for keyboard led status tracking to qemu. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* move kbd/mouse handling to input.cPaolo Bonzini2010-01-131-0/+238
Move 200 lines out of vl.c already into common code that only needs to be compiled once. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud