qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] ui/input: strictly check console in finding inp


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] ui/input: strictly check console in finding input handler
Date: Thu, 06 Nov 2014 10:00:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Gerd Hoffmann <address@hidden> writes:

> On Mi, 2014-11-05 at 00:49 +0800, Amos Kong wrote:
>> qemu_input_find_handler() prefers a handler associated with con.
>> But if none exists, it takes any. This patch added a parameter
>> to strictly check console, in case we want to input event to
>> special console.
>> 
>> 'input-send-event' has a parameter to assign special console,
>> so we should enable strict checking in finding handler.
>
> I don't think we want do that by default.  It only matters in case of a
> multiseat setup where you actually have multiple input devices of the
> same kind.  Which isn't a very typical use case.
>
> Options I see are:
>
>   (a) Turn console into an optional parameter, do strict checking in
>       case it is present.
>   (b) Add a optional 'strict' parameter.

Current behavior (please correct misunderstandings):

    The guest must be running.
    input-send-event parameter 'console' is mandatory.
    The console identified by its value must exist.
    If this console can accept the event, send it there.
    Else, a console that can accept the event must exist.  Send it to
    one of them.  Which one exactly isn't specified.

Behavior with (a):

    The guest must be running.
    input-send-event parameter 'console' is optional.
    If it's present, the console identified by its value must exist, and
    must be able to accept the event.  Send it there.
    Else, a console that can accept the event must exist.  Send it to
    one of them.  Which one exactly isn't specified.

"Must" means "or else command fails".

I think that's a clear improvement.  It's actually what I expected from
the command documentation, until I read the code.



reply via email to

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