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>
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 @@
}
}
+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) {