diff options
| author | Anthony Liguori | 2010-03-09 21:26:40 +0100 |
|---|---|---|
| committer | Anthony Liguori | 2010-03-19 21:27:38 +0100 |
| commit | eb2e259d95a67ef0cd8a61c0bd4974559e9bfa5d (patch) | |
| tree | 7fdf802c2a6078812dcf0146f32db700ec55b490 /input.c | |
| parent | Rewrite mouse handlers to use QTAILQ and to have an activation function (diff) | |
| download | qemu-eb2e259d95a67ef0cd8a61c0bd4974559e9bfa5d.tar.gz qemu-eb2e259d95a67ef0cd8a61c0bd4974559e9bfa5d.tar.xz qemu-eb2e259d95a67ef0cd8a61c0bd4974559e9bfa5d.zip | |
Add kbd_mouse_has_absolute()
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>
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -153,6 +153,19 @@ int kbd_mouse_is_absolute(void) return QTAILQ_FIRST(&mouse_handlers)->qemu_put_mouse_event_absolute; } +int kbd_mouse_has_absolute(void) +{ + QEMUPutMouseEntry *entry; + + QTAILQ_FOREACH(entry, &mouse_handlers, node) { + if (entry->qemu_put_mouse_event_absolute) { + return 1; + } + } + + return 0; +} + static void info_mice_iter(QObject *data, void *opaque) { QDict *mouse; |
