Received: from eggs.gnu.org ([2001:4830:134:3::10]:36539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK7CG-0004xr-1O for qemu-devel@nongnu.org; Fri, 15 Jan 2016 11:26:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aK7CC-0001Dg-Na for qemu-devel@nongnu.org; Fri, 15 Jan 2016 11:25:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK7CC-0001Cz-Fh for qemu-devel@nongnu.org; Fri, 15 Jan 2016 11:25:52 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 1DD53263C for ; Fri, 15 Jan 2016 16:25:52 +0000 (UTC) From: Markus Armbruster References: <1452601779-5790-1-git-send-email-kraxel@redhat.com> <1452601779-5790-4-git-send-email-kraxel@redhat.com> Date: Fri, 15 Jan 2016 17:25:49 +0100 In-Reply-To: <1452601779-5790-4-git-send-email-kraxel@redhat.com> (Gerd Hoffmann's message of "Tue, 12 Jan 2016 13:29:36 +0100") Message-ID: <87y4bq4xo2.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 4/7] qapi: switch x-input-send-event from console to device+head List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Marcelo Tosatti , qemu-devel@nongnu.org Gerd Hoffmann writes: > Use display device qdev id and head number instead of console index to > specify the QemuConsole. This makes things consistent with input > devices (for input routing) and vnc server configuration, which both use > display and head too. > > Signed-off-by: Gerd Hoffmann > --- > qapi-schema.json | 32 +++++++++++++++++--------------- > qmp-commands.hx | 15 ++++++++------- > ui/input.c | 15 ++++++++++----- > 3 files changed, 35 insertions(+), 27 deletions(-) > > diff --git a/qapi-schema.json b/qapi-schema.json > index 2e31733..3884479 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -3748,24 +3748,24 @@ > # > # Send input event(s) to guest. > # > -# @console: #optional console to send event(s) to. > -# This parameter can be used to send the input event to > -# specific input devices in case (a) multiple input devices > -# of the same kind are added to the virtual machine and (b) > -# you have configured input routing (see docs/multiseat.txt) > -# for those input devices. If input routing is not > -# configured this parameter has no effect. > -# If @console is missing, only devices that aren't associated > -# with a console are admissible. > -# If @console is specified, it must exist, and both devices > -# associated with that console and devices not associated with a > -# console are admissible, but the former take precedence. > - > -# > +# @device: #optional display device to send event(s) to. > +# @head: #optional head to send event(s) to, in case the > +# display device supports multiple scanouts. > # @events: List of InputEvent union. > # > # Returns: Nothing on success. > # > +# The @display and @head parameters can be used to send the input > +# event to specific input devices in case (a) multiple input devices > +# of the same kind are added to the virtual machine and (b) you have > +# configured input routing (see docs/multiseat.txt) for those input > +# devices. The parameters work exactly like the device and head > +# properties of input devices. If @device is missing, only devices > +# that have no input routing config are admissible. If @device is > +# specified, both input devices with and without input routing config > +# are admissible, but devices with input routing config take > +# precedence. > + > # Since: 2.2 > # > # Note: this command is experimental, and not a stable API. Things that > @@ -3775,7 +3775,9 @@ > # > ## > { 'command': 'x-input-send-event', > - 'data': { '*console':'int', 'events': [ 'InputEvent' ] } } > + 'data': { '*device': 'str', > + '*head' : 'int', > + 'events' : [ 'InputEvent' ] } } > > ## > # @NumaOptions > diff --git a/qmp-commands.hx b/qmp-commands.hx > index db072a6..bda1fa6 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -4614,7 +4614,8 @@ Send input event to guest. > > Arguments: > > -- "console": console index. (json-int, optional) > +- "device": display device. (json-str, optional) > +- "head": display head. (json-int, optional) > - "events": list of input events. Suggest to drop the periods. [...]