@@ -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)
@@ -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,
},
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(-)