From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuKcP-0002Qa-2A for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:53:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuKcI-00070h-Tc for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:53:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuKcI-00070b-KQ for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:53:26 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5ABrPVl032118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 10 Jun 2014 07:53:26 -0400 Date: Tue, 10 Jun 2014 08:53:12 -0300 From: Marcelo Tosatti Message-ID: <20140610115312.GA23902@amt.cnet> References: <20140605232528.GA2566@amt.cnet> <1402388747.8739.41.camel@nilsson.home.kraxel.org> <20140610114823.GA23316@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140610114823.GA23316@amt.cnet> Subject: Re: [Qemu-devel] [PATCH] add command to position mouse pointer in absolute mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel , Luiz Capitulino 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 > > > +@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. > You want console parameter to be console index? Is that visible via monitor?