From: Brad Jorsch <anomie@users.sourceforge.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/5] Add hwheel to monitor mouse_move
Date: Tue, 4 May 2010 12:56:38 -0400 [thread overview]
Message-ID: <1272992201-26911-3-git-send-email-anomie@users.sourceforge.net> (raw)
In-Reply-To: <1272992201-26911-1-git-send-email-anomie@users.sourceforge.net>
Adds a parameter to the monitor's mouse_move command to specify the
hwheel delta.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
---
monitor.c | 8 ++++++--
qemu-monitor.hx | 4 ++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/monitor.c b/monitor.c
index 520d48d..baff2cf 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1832,16 +1832,20 @@ static int mouse_button_state;
static void do_mouse_move(Monitor *mon, const QDict *qdict)
{
- int dx, dy, dz;
+ int dx, dy, dz, dw;
const char *dx_str = qdict_get_str(qdict, "dx_str");
const char *dy_str = qdict_get_str(qdict, "dy_str");
const char *dz_str = qdict_get_try_str(qdict, "dz_str");
+ const char *dw_str = qdict_get_try_str(qdict, "dw_str");
dx = strtol(dx_str, NULL, 0);
dy = strtol(dy_str, NULL, 0);
dz = 0;
+ dw = 0;
if (dz_str)
dz = strtol(dz_str, NULL, 0);
- kbd_mouse_event(dx, dy, dz, 0, mouse_button_state);
+ if (dw_str)
+ dw = strtol(dw_str, NULL, 0);
+ kbd_mouse_event(dx, dy, dz, dw, mouse_button_state);
}
static void do_mouse_button(Monitor *mon, const QDict *qdict)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 5ea5748..00067ba 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -616,8 +616,8 @@ ETEXI
{
.name = "mouse_move",
- .args_type = "dx_str:s,dy_str:s,dz_str:s?",
- .params = "dx dy [dz]",
+ .args_type = "dx_str:s,dy_str:s,dz_str:s?,dw_str:s?",
+ .params = "dx dy [dz [dw]]",
.help = "send mouse move events",
.mhandler.cmd = do_mouse_move,
},
--
1.7.1
next prev parent reply other threads:[~2010-05-04 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 16:56 [Qemu-devel] [RFC] [PATCH 0/5] Add horizontal wheel support to mice, where possible Brad Jorsch
2010-05-04 16:56 ` [Qemu-devel] [PATCH 1/5] Add function parameters for hwheel Brad Jorsch
2010-05-04 16:56 ` Brad Jorsch [this message]
2010-05-04 16:56 ` [Qemu-devel] [PATCH 3/5] Pass hwheel events from the front-ends Brad Jorsch
2010-05-04 16:56 ` [Qemu-devel] [PATCH 4/5] Add a horizontal wheel to the USB mouse and tablet Brad Jorsch
2010-05-04 16:56 ` [Qemu-devel] [PATCH 5/5] Add a horizontal wheel to the exps/2 mouse Brad Jorsch
2010-06-02 13:30 ` [Qemu-devel] [RFC] [PATCH 0/5] Add horizontal wheel support to mice, where possible Anthony Liguori
2010-06-02 16:14 ` Brad Jorsch
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=1272992201-26911-3-git-send-email-anomie@users.sourceforge.net \
--to=anomie@users.sourceforge.net \
--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).