Re: gvncviewer improvement - input grab problems



On Fri, Aug 21, 2009 at 06:51:15PM +0200, Michal Suchanek wrote:
> 2009/8/21 Daniel P. Berrange <dan berrange com>:
> > On Tue, Aug 18, 2009 at 11:04:02PM +0200, Michal Suchanek wrote:
> >> 2009/8/17 Michal Suchanek <hramrach centrum cz>:
> >> > 2009/8/17 Daniel P. Berrange <dan berrange com>:
> >> >> On Sat, Aug 08, 2009 at 04:02:11PM +0200, Michal Suchanek wrote:
> >> >>> Debian package installs the gvncviewer example as an application so I
> >> >>> was trying to use it as a vnc viewer instead of the xvncviewer and
> >> >>> found that it has some advantages and problems.
> >> >>>
> >> >>> The major advantage over xvncviewer version in Debian is support for
> >> >>> resizing the remote desktop.
> >> >>>
> >> >>> The drawback which is easily resolved is that with gvncviewer one
> >> >>> cannot specify local vnc server by display number only.
> >> >>>
> >> >>> There is also another issue that the vnc viewer reports "disconnected
> >> >>> from server" when it in fact did not manage to connect at all.
> >> >>>
> >> >>> The problem I did not manage to resolve is that the viewer grabs the
> >> >>> input on some occasions and I did not manage to turn off this feature
> >> >>> completely.
> >> >>>
> >> >>> The grab comes in two flavours - one is grabbing the keyboard while
> >> >>> the mouse is over the remote display area which prevents using window
> >> >>> manager shortcuts.
> >> >>>
> >> >>> The other is grabbing both keyboard and pointer when Ctrl+Alt is pressed.
> >> >
> >> > Is it also possible to turn off this feature?
> >> >
> >>
> >> It's possible with this patch (applies on top of the previous three -
> >> specifically the menu item is required).
> >>
> >> It works for me at least for booting grub.
> >
> > I still don't think this is a good approach. Toggling the key grab is fine,
> > but not the mouse grab. If operating in relative mouse mode we should always
> > honour the mouse grab key sequence.
> >
> > I'm assuming you want to disable this because Ctrl-Alt clashes with a
> > sequence you use on the host. In which case we'd be better off making
> > the grab sequence configuration in some way. eg, allow the app to provide
> > a pair, or triple of GDK keysyms to be used for grabs.
> 
> It's not as simple as that.
> 
> Firstly I only use absolute mouse or no mouse at all, and I do not see
> mouse grabbed except by this key combination. It clearly gets in my
> way and provides no benefit for my configuration. The key combination
> clashes in the sense that I might want to press Ctrl+Alt+some other
> key (most often Delete) which toggles the grab and locks me inside the
> viewer.

If you only use absolute mouse, then we should provide a way to turn
off the relative mouse mode extension - that would implicitly then
disable the grab sequence.

> Secondly providing two keysyms would not suffice to detect the
> combination in the way it is done currently. It is checked by reading
> the modifier mask and comparing the keysym. If the modifier mask
> contains one of the keys and the pressed keysym is the other the
> feature is activated.

We could easily change it to not use the modifier mask, since we already
explicitly keep track of all pressed keys, in order that we can send a
forced release to the server if we loose input focus (to avoid the issue
of stuck Alt/Shift/Ctrl keys)


Daniel
-- 
|: http://berrange.com/     -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://freshmeat.net/~danielpb/    -o-   http://gtk-vnc.sourceforge.net :|


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