From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] add command to position mouse pointer in absolute mode
Date: Tue, 10 Jun 2014 08:48:23 -0300 [thread overview]
Message-ID: <20140610114823.GA23316@amt.cnet> (raw)
In-Reply-To: <1402388747.8739.41.camel@nilsson.home.kraxel.org>
On Tue, Jun 10, 2014 at 10:25:47AM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > + .name = "mouse_move_abs",
> > + .args_type = "dx_str:s,dy_str:s,dz_str:s?",
> > + .params = "dx dy [dz]",
> > + .help = "send mouse move events (absolute coordinates)",
> > + .mhandler.cmd = do_mouse_move_abs,
> > + },
> > +
> > +STEXI
> > +@item mouse_move_abs @var{dx} @var{dy} [@var{dz}]
>
> I think we should drop the dz parameter (you still can send mouse wheel
> events via mouse_move 0 0 dz), and add a optional console parameter
> instead ...
>
> > +static void do_mouse_move_abs(Monitor *mon, const QDict *qdict)
> > +{
> > + int dx, dy, dz, button;
> > + 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");
> > + int weight, height;
>
> ... then pick the console here (if specified):
>
> QemuConsole *con = NULL;
> if (qdict_get_try_str(qdict, "console")) {
> con = qemu_console_lookup_by_index(...)
>
> That's a new hmp-only command tough. IIRC there is (or was?) a policy
> that no new hmp-only commands are allowed. Luiz?
>
>
> A completely different approach would be a qmp command allowing to send
> any input event. Given that the new input layer already uses qapi-types
> internally this should be pretty straight forward to do (see InputEvent
> in qapi-schema.json).
I was just adding a new parameter to sendkey to allow "press"/"release"
behaviour, which is not accepted ATM.
Will go for a new QMP command, then, thanks.
next prev parent reply other threads:[~2014-06-10 11:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 23:25 [Qemu-devel] [PATCH] add command to position mouse pointer in absolute mode Marcelo Tosatti
2014-06-10 8:25 ` Gerd Hoffmann
2014-06-10 11:48 ` Marcelo Tosatti [this message]
2014-06-10 11:53 ` Marcelo Tosatti
2014-06-10 12:19 ` Gerd Hoffmann
2014-06-10 12:38 ` Eric Blake
2014-06-12 7:12 ` Markus Armbruster
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=20140610114823.GA23316@amt.cnet \
--to=mtosatti@redhat.com \
--cc=kraxel@redhat.com \
--cc=lcapitulino@redhat.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).