ui: Support non-zero minimum values for absolute input axes

This patch refactors ui/input.c to support absolute axis
minimum values other than 0. All dependent calls to qemu_input_queue_abs
have been updated to explicitly supply 0 as the axis minimum value.

Signed-off-by: Philippe Voinov <philippevoinov@gmail.com>
Message-id: 20170505133952.29885-1-philippevoinov@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Philippe Voinov 2017-05-05 15:39:52 +02:00 committed by Gerd Hoffmann
parent 76d20ea0f1
commit 9cfa7ab939
9 changed files with 45 additions and 27 deletions

View file

@ -172,8 +172,8 @@ static void tablet_position(SpiceTabletInstance* sin, int x, int y,
QemuSpicePointer *pointer = container_of(sin, QemuSpicePointer, tablet);
spice_update_buttons(pointer, 0, buttons_state);
qemu_input_queue_abs(NULL, INPUT_AXIS_X, x, pointer->width);
qemu_input_queue_abs(NULL, INPUT_AXIS_Y, y, pointer->height);
qemu_input_queue_abs(NULL, INPUT_AXIS_X, x, 0, pointer->width);
qemu_input_queue_abs(NULL, INPUT_AXIS_Y, y, 0, pointer->height);
qemu_input_event_sync();
}