From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Fabian Lesniak <fabian@lesniak-it.de>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL v2 03/11] ui: add support for mice with extra/side buttons
Date: Tue, 31 Jan 2017 16:50:23 +0100 [thread overview]
Message-ID: <1485877831-28786-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1485877831-28786-1-git-send-email-kraxel@redhat.com>
From: Fabian Lesniak <fabian@lesniak-it.de>
Adds input event generation for BTN_SIDE and BTN_EXTRA events to gtk and
input-linux methods.
Signed-off-by: Fabian Lesniak <fabian@lesniak-it.de>
Message-id: 20161206190007.7539-4-fabian@lesniak-it.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk.c | 4 ++++
ui/input-linux.c | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index bdd831c..3f67a34 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -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;
}
diff --git a/ui/input-linux.c b/ui/input-linux.c
index f345317..ac31f47 100644
--- a/ui/input-linux.c
+++ b/ui/input-linux.c
@@ -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:
--
1.8.3.1
next prev parent reply other threads:[~2017-01-31 15:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 15:50 [Qemu-devel] [PULL v2 00/11] ui patch queue Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 01/11] qapi: add support for mice with extra/side buttons Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 02/11] ps2: " Gerd Hoffmann
2017-01-31 15:50 ` Gerd Hoffmann [this message]
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 04/11] vnc: track LED state separately Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 05/11] ui/gtk: Fix mouse wheel on 3.4.0 or later Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 06/11] ui: fix format specfier in vnc to avoid break in build Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 07/11] ui/gtk.c: add ctrl-alt-= support for zoom in acceleration Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 08/11] spice: wakeup QXL worker to pick up mouse changes Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 09/11] vnc: fix overflow in vnc_update_stats Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 10/11] gtk: Hardcode LC_CTYPE as C.utf-8 Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 11/11] console: fix console resize Gerd Hoffmann
2017-01-31 16:22 ` [Qemu-devel] [PULL v2 00/11] ui patch queue Peter Maydell
2017-01-31 16:34 ` Gerd Hoffmann
2017-02-02 9:49 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1485877831-28786-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=fabian@lesniak-it.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).