[et-mgmt-tools] [PATCH]: Make virt-viewer ungrab the mouse and keyboard on un-focus

Chris Lalancette clalance at redhat.com
Tue Apr 22 15:57:33 UTC 2008


Daniel P. Berrange wrote:
> I struggle to understand how/what you managed todo here. If the keyboard
> grab is active nothing should be able to steal keyboard input focus, since
> this is the whole point of keyboard grab. If something did manage to steal
> keyboard input while grab was active, then this is a bug in the window
> manager and not something we should hack in virt-viewer - inded if this
> is possible, then every single app which uses grabs needs your patch which
> is clearly non-scalable

This arguably is some sort of window manager bug, or possibly a bug in the way
keyboard grab is currently working.  In any case, it is very easy to reproduce.
 Just do something like:

# virt-viewer guest1 & sleep 10 ; virt-viewer guest2

And make sure to click inside the guest1 virt-viewer window right after it pops
up.  Assuming your keyboard is grabbed there, and that your window manager
placed the guest2 window on top of the guest1 window, you will be unable to
escape (with Ctrl-Alt) from the guest1 window.

Chris Lalancette




More information about the et-mgmt-tools mailing list