Skip to content
Snippets Groups Projects
Commit 1266b68c authored by Fabian Lesniak's avatar Fabian Lesniak Committed by Gerd Hoffmann
Browse files

ui: add support for mice with extra/side buttons


Adds input event generation for BTN_SIDE and BTN_EXTRA events to gtk and
input-linux methods.

Signed-off-by: default avatarFabian Lesniak <fabian@lesniak-it.de>
Message-id: 20161206190007.7539-4-fabian@lesniak-it.de
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 8b0caab0
No related branches found
No related tags found
No related merge requests found
......@@ -1007,6 +1007,10 @@ static gboolean gd_button_event(GtkWidget *widget, GdkEventButton *button,
btn = INPUT_BUTTON_MIDDLE;
} else if (button->button == 3) {
btn = INPUT_BUTTON_RIGHT;
} else if (button->button == 8) {
btn = INPUT_BUTTON_SIDE;
} else if (button->button == 9) {
btn = INPUT_BUTTON_EXTRA;
} else {
return TRUE;
}
......
......@@ -291,6 +291,12 @@ static void input_linux_handle_mouse(InputLinux *il, struct input_event *event)
qemu_input_queue_btn(NULL, INPUT_BUTTON_WHEEL_DOWN,
event->value);
break;
case BTN_SIDE:
qemu_input_queue_btn(NULL, INPUT_BUTTON_SIDE, event->value);
break;
case BTN_EXTRA:
qemu_input_queue_btn(NULL, INPUT_BUTTON_EXTRA, event->value);
break;
};
break;
case EV_REL:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment