Re: [gtk-vnc-devel] PATCH: make keyboard & pointer grabs configurable



On Mon, Jul 09, 2007 at 09:08:22AM -0500, Anthony Liguori wrote:
> Daniel P. Berrange wrote:
> >>One of the obvious reasons for that is that there is one "release grab"
> >>hotkey only.
> >>    
> >
> >Two primary scenarios I have
> >
> >  - Grab both  keyboard & mouse at same time - upon first click - in this
> >    case there's  only a single ungrab hotkey needed
> >  - Grab keyboard only when mouse is over the VNC widget - there's no
> >    ungrab hotkey needed at all - simply move the mouse outside the
> >    widget
> >  
> 
> So this should be an option within gtk-vnc instead of being something 
> implemented externally to it.  I agree that you really don't want 
> keyboard grab exposed as a separate option except for this one very 
> special case.

The trouble is there's no way for the VNC widget to determine which grab
mode it needs to operate in. Although you added support for QEMU to run
in relative vs  absolute mode, that is not in any currently supported
releases of any virt product. So all VNC servers are running in absolute
mode on the wire, and may or may not be converting into relative mode
before passing data off to the guest. 

Virt-manager can (partially) tell whether the remote server is at least
capable of passing absolute pointer co-ords to the guest (eg looking at
the guest config to see if a USB tablet is configured, or seeing if the
paravirt framebuffer is in use). Even then it can't tell whether the
guest is actually configured to use the device in absolute mode - the
X server may be accessing the tablet via /dev/input/mice & thus still get
the relative co-ords. It all really rather sucks, so I don't see any
way to reliably determine whether to grab keyboard only, or mouse+keyboard
from within the widget.

Dan.

-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




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