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

On Mon, Jul 09, 2007 at 11:00:02AM +0200, Gerd Hoffmann wrote:
> > So this patch adds two options.
> > 
> >   - A pointer grab flag - if this is set, then the pointer will always be
> >     grabbed upon first click, regardless of mouse mode
> > 
> >   - A keyboard grabb flag - if this is set, then the keyboard will always
> >     be grabbed upon mouse enter, an ungrabed on mouse leave.
> I wouldn't separate these two for usability reasons.  Input (both kbd
> and mouse) should either be grabbed or not grabbed (and the grab state
> should be clear to the user, but that isn't the job of the widget but
> the using apps I guess).

There is no reason to grab the mouse if the guest OS is operating in 
absolute pointer mode - eg if using a USB tablet, or if you have configured
the X server to use Xen's paravirt mouse with evdev.

You may still want to grab the keyboard whenever the mouse is over the
widget though, so that window manager short cuts get seen by the guest
instead of the host. I don't want to have my mouse constrained to the
window just so that keyboard shortcuts work.

> You probably want to allow different events trigger the input grab though.

Well keyboard grab is doe

> > this to add 'Press Ctrl+Alt to release pointer' to the title bar.
> 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

The first is applicable when the server / guest OS can only work with
relative mouse co-ords & thus needs a mouse grab. The second is applicable
when the server/guest works in absolute mouse mode & thus does not need 
any mouse grab

|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules:              -=|
|=-               Projects:               -=|
|=-  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]