qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] add command to position mouse pointer in absolu


From: Marcelo Tosatti
Subject: Re: [Qemu-devel] [PATCH] add command to position mouse pointer in absolute mode
Date: Tue, 10 Jun 2014 08:53:12 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jun 10, 2014 at 08:48:23AM -0300, Marcelo Tosatti wrote:
> 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
> > > address@hidden mouse_move_abs @var{dx} @var{dy} address@hidden
> > 
> > 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.
> 

You want console parameter to be console index? Is that visible via
monitor?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]