virtio-input: send rel-wheel events for wheel buttons
commitf4924974c7c72560f68ab298ac25a525a28a2124
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 26 Sep 2017 11:32:43 +0000 (26 13:32 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 29 Sep 2017 08:36:33 +0000 (29 10:36 +0200)
tree92829adac0943627d0b39a3ad4333800b9b0a000
parent74083f9c01910b1d36ddaca04db468eb326676ae
virtio-input: send rel-wheel events for wheel buttons

qemu uses wheel-up/down button events for mouse wheel input, however
linux applications typically want REL_WHEEL events.

This fixes wheel with linux guests. Tested with X11/wayland, and
windows virtio-input driver.

Based on a patch from Marc.
Added property to enable/disable wheel axis.

Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170926113243.26081-1-kraxel@redhat.com
hw/input/virtio-input-hid.c
include/hw/compat.h
include/hw/virtio/virtio-input.h