From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Frediano Ziglio <freddy77@gmail.com>
Subject: [PULL 4/5] ui: Add more mouse buttons to SPICE
Date: Mon, 31 Aug 2020 13:04:15 +0200 [thread overview]
Message-ID: <20200831110416.15176-5-kraxel@redhat.com> (raw)
In-Reply-To: <20200831110416.15176-1-kraxel@redhat.com>
From: Frediano Ziglio <freddy77@gmail.com>
Add support for SIDE and EXTRA buttons.
The constants for buttons in both SPICE and QEMU are defined as
LEFT
MIDDLE
RIGHT
UP
DOWN
SIDE
EXTRA
(same order).
"button_mask" contains for each bit the state of a button. Qemu currently
uses bits 0, 1, 2 respectively as LEFT, RIGHT, MIDDLE; also add bits 4
and 5 as UP and DOWN (using wheel movements). SPICE protocol uses
a bitmask based on the order above where LEFT is bit 0, MIDDLE is
bit 1 and so on till EXTRA being bit 6. To avoid clash with Qemu usage
SPICE bitmask from SIDE are move a bit more resulting respectively
in 0x40 and 0x80 values.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Message-id: 20200820145851.50846-1-fziglio@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/spice-input.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ui/spice-input.c b/ui/spice-input.c
index cd4bb0043fd9..d5bba231c95c 100644
--- a/ui/spice-input.c
+++ b/ui/spice-input.c
@@ -123,6 +123,8 @@ static void spice_update_buttons(QemuSpicePointer *pointer,
[INPUT_BUTTON_RIGHT] = 0x02,
[INPUT_BUTTON_WHEEL_UP] = 0x10,
[INPUT_BUTTON_WHEEL_DOWN] = 0x20,
+ [INPUT_BUTTON_SIDE] = 0x40,
+ [INPUT_BUTTON_EXTRA] = 0x80,
};
if (wheel < 0) {
--
2.27.0
next prev parent reply other threads:[~2020-08-31 11:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 11:04 [PULL 0/5] Ui 20200831 patches Gerd Hoffmann
2020-08-31 11:04 ` [PULL 1/5] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context() Gerd Hoffmann
2020-08-31 11:04 ` [PULL 2/5] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string Gerd Hoffmann
2020-08-31 11:04 ` [PULL 3/5] meson: fix keymaps witout qemu-keymap Gerd Hoffmann
2020-08-31 11:04 ` Gerd Hoffmann [this message]
2020-08-31 11:04 ` [PULL 5/5] ui/gtk: Update refresh interval after widget is realized Gerd Hoffmann
2020-09-01 9:52 ` [PULL 0/5] Ui 20200831 patches Peter Maydell
2020-09-01 14:16 ` Gerd Hoffmann
2020-09-01 14:54 ` Peter Maydell
2020-09-02 9:42 ` Gerd Hoffmann
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=20200831110416.15176-5-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=freddy77@gmail.com \
--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).