qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] input-linux: Delay grab toggle if keys are pressed


From: Gerd Hoffmann
Subject: Re: [PATCH 1/2] input-linux: Delay grab toggle if keys are pressed
Date: Mon, 10 May 2021 09:30:25 +0200

On Sun, May 09, 2021 at 01:43:38PM +0200, Rainer Müller wrote:
> On 04/05/2021 11.14, Gerd Hoffmann wrote:
> > On Sat, May 01, 2021 at 09:06:21PM +0200, Rainer Müller wrote:
> >> When multiple keyboards are passed to the guest with input-linux, there
> >> could still be keys pressed on the other keyboard when toggling grab.
> >> Delay toggling grab on the other keyboard until all keys are released,
> >> otherwise keys could be stuck on host without a key up event.
> > 
> > Hmm, if you have two keyboards plugged into your machine, why would you
> > assign both to a virtual machine?  Instead of simply using one for the
> > host and one for the guest?
> 
> Fair enough. I only noticed the possibility during testing. I plugged in
> a second keyboard for development to avoid locking myself out and passed
> only one. Then I became confident to pass them both, but mostly because
> I already had them connected. I agree it does not seem like a typical
> setup...
> 
> This was the only code path that did not check !il->keycount before
> calling input_linux_toggle_grab(), so I added it here as well. Maybe it
> would make sense to move the condition into the function?

Should work, yes.  I think with that in place patch 2/2 can be
simplified a bit too.

take care,
  Gerd




reply via email to

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