From 502c8db5b41bb3206ad136fa4baa753c186c9ebd Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 28 Nov 2013 11:31:09 +0100 Subject: input: mouse: add qemu_input_is_absolute() Same as kbd_mouse_is_absolute(), but using new input core. Signed-off-by: Gerd Hoffmann --- ui/input.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui') diff --git a/ui/input.c b/ui/input.c index fd2293b399..01991cb2c0 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) { -- cgit v1.2.1