From: Katharine Chui <[email protected]>

Having mouse buttons on the multitouch devices causes ui mouse
button events to get routed to the multitouch device, despite
having better options such as a single point tablet or a mouse.

This change fixes Android guests behavior when having both a mouse
and a multitouch device present.

Signed-off-by: Katharine Chui [email protected]
---
 hw/input/virtio-input-hid.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index d986c3c16e3..5fe91fe498c 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -540,7 +540,7 @@ static const TypeInfo virtio_tablet_info = {
 
 static const QemuInputHandler virtio_multitouch_handler = {
     .name  = VIRTIO_ID_NAME_MULTITOUCH,
-    .mask  = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_MTT,
+    .mask  = INPUT_EVENT_MASK_MTT,
     .event = virtio_input_handle_event,
     .sync  = virtio_input_handle_sync,
 };
@@ -603,9 +603,6 @@ static void virtio_multitouch_init(Object *obj)
 
     vhid->handler = &virtio_multitouch_handler;
     virtio_input_init_config(vinput, virtio_multitouch_config);
-    virtio_input_extend_config(vinput, keymap_button,
-                               ARRAY_SIZE(keymap_button),
-                               VIRTIO_INPUT_CFG_EV_BITS, EV_KEY);
     virtio_input_extend_config(vinput, abs_props,
                                ARRAY_SIZE(abs_props),
                                VIRTIO_INPUT_CFG_PROP_BITS, 0);
-- 
2.49.1

Reply via email to