Re: [Qemu-devel] [PATCH 2/2] gtk: disable the F10 menubar key

2018-05-15 Thread Peter Wu
On Tue, May 15, 2018 at 10:46:54AM +0200, Gerd Hoffmann wrote:
> On Tue, May 15, 2018 at 09:39:12AM +0100, Daniel P. Berrangé wrote:
> > On Tue, May 15, 2018 at 10:30:09AM +0200, Gerd Hoffmann wrote:
> > > On Fri, May 11, 2018 at 01:07:39AM +0200, Peter Wu wrote:
> > > > The F10 key is used in various applications, disable it unconditionally
> > > > (do not limit it to grab mode). Note that this property is deprecated
> > > > and might be removed in the future (GTK+ commit b082fb598d).
> > > 
> > > Any replacement provided by gtk?
> > 
> > It doesn't look like it

Would it still be possible to change the commit message? I asked Timm
(the author of that commit) about it, and it appears that the feature
was restored at some point again because gnome-terminal relied on it.

The new message (if possible):

The F10 key is used in various applications, disable it unconditionally
(do not limit it to grab mode). This property will still work with GTK3,
but as it is deprecated it might be removed in GTK4.
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl



Re: [Qemu-devel] [PATCH 2/2] gtk: disable the F10 menubar key

2018-05-15 Thread Gerd Hoffmann
On Tue, May 15, 2018 at 09:39:12AM +0100, Daniel P. Berrangé wrote:
> On Tue, May 15, 2018 at 10:30:09AM +0200, Gerd Hoffmann wrote:
> > On Fri, May 11, 2018 at 01:07:39AM +0200, Peter Wu wrote:
> > > The F10 key is used in various applications, disable it unconditionally
> > > (do not limit it to grab mode). Note that this property is deprecated
> > > and might be removed in the future (GTK+ commit b082fb598d).
> > 
> > Any replacement provided by gtk?
> 
> It doesn't look like it
> 
> > I don't feel like adding new code depending on already deprecated
> > features ...
> > 
> > Also note that there is the "grab-on-hover" option in the view menu,
> > which will make qemu grab the keyboard if the mouse pointer is inside
> > the qemu window.  Which is pretty convinient for hotkeys, they go to the
> > guest if you work in the qemu window and to the host otherwise.
> 
> IMHO the right thing todo long term is to kill the menu bar from the
> GTK UI entirely, and replace with the GTK HeaderBar. This allows the
> menu items to be provided via popups directly from the title bar of
> the windows, which is more vertically space efficient. This would
> probably have to wait for us to ditch GTK2, so I think this fix is
> reasonable until that time.

Fair enough.  Patch queued.

cheers,
  Gerd




Re: [Qemu-devel] [PATCH 2/2] gtk: disable the F10 menubar key

2018-05-15 Thread Daniel P . Berrangé
On Tue, May 15, 2018 at 10:30:09AM +0200, Gerd Hoffmann wrote:
> On Fri, May 11, 2018 at 01:07:39AM +0200, Peter Wu wrote:
> > The F10 key is used in various applications, disable it unconditionally
> > (do not limit it to grab mode). Note that this property is deprecated
> > and might be removed in the future (GTK+ commit b082fb598d).
> 
> Any replacement provided by gtk?

It doesn't look like it

> I don't feel like adding new code depending on already deprecated
> features ...
> 
> Also note that there is the "grab-on-hover" option in the view menu,
> which will make qemu grab the keyboard if the mouse pointer is inside
> the qemu window.  Which is pretty convinient for hotkeys, they go to the
> guest if you work in the qemu window and to the host otherwise.

IMHO the right thing todo long term is to kill the menu bar from the
GTK UI entirely, and replace with the GTK HeaderBar. This allows the
menu items to be provided via popups directly from the title bar of
the windows, which is more vertically space efficient. This would
probably have to wait for us to ditch GTK2, so I think this fix is
reasonable until that time.

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|



Re: [Qemu-devel] [PATCH 2/2] gtk: disable the F10 menubar key

2018-05-15 Thread Gerd Hoffmann
On Fri, May 11, 2018 at 01:07:39AM +0200, Peter Wu wrote:
> The F10 key is used in various applications, disable it unconditionally
> (do not limit it to grab mode). Note that this property is deprecated
> and might be removed in the future (GTK+ commit b082fb598d).

Any replacement provided by gtk?

I don't feel like adding new code depending on already deprecated
features ...

Also note that there is the "grab-on-hover" option in the view menu,
which will make qemu grab the keyboard if the mouse pointer is inside
the qemu window.  Which is pretty convinient for hotkeys, they go to the
guest if you work in the qemu window and to the host otherwise.

cheers,
  Gerd