aboutsummaryrefslogtreecommitdiff
path: root/ui/input.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-11-28 11:31:09 +0100
committerGerd Hoffmann <kraxel@redhat.com>2014-03-05 09:52:02 +0100
commit502c8db5b41bb3206ad136fa4baa753c186c9ebd (patch)
tree30efe9e0baa81a8a00490c57ee2d37e472d32a7f /ui/input.c
parentd3535431e8006e8bf71229f306ea9c62d9e737e8 (diff)
downloadqemu-502c8db5b41bb3206ad136fa4baa753c186c9ebd.zip
qemu-502c8db5b41bb3206ad136fa4baa753c186c9ebd.tar.gz
qemu-502c8db5b41bb3206ad136fa4baa753c186c9ebd.tar.bz2
input: mouse: add qemu_input_is_absolute()
Same as kbd_mouse_is_absolute(), but using new input core. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/input.c')
-rw-r--r--ui/input.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/input.c b/ui/input.c
index fd2293b..01991cb 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -181,6 +181,14 @@ void qemu_input_update_buttons(QemuConsole *src, uint32_t *button_map,
}
}
+bool qemu_input_is_absolute(void)
+{
+ QemuInputHandlerState *s;
+
+ s = qemu_input_find_handler(INPUT_EVENT_MASK_REL | INPUT_EVENT_MASK_ABS);
+ return (s != NULL) && (s->handler->mask & INPUT_EVENT_MASK_ABS);
+}
+
int qemu_input_scale_axis(int value, int size_in, int size_out)
{
if (size_in < 2) {