[Spice-devel] spice-gtk : magic key options

Frédéric Grelot fredericg_99 at yahoo.fr
Mon Jun 6 23:42:02 PDT 2011


At last, I updated my client to Fedora 15, which lets me go further than Ubuntu regarding spice client usage...
As you suggested, I tried vinagre instead of spic{y,ec} : it is quite better, especially regarding usability thanks to the bookmarks, the popup you talked about, etc... I haven't got any problem with dual-screen yet, since my secondary monitor just died yesterday! It'll be for another time...

But (and there is a but...), the problem with "Alt" is still here!
In particular alt+click (does nothing) and alt+space+click (opens vinagre's window menu).
Since I thought it was mostly related to the "drag window" functionality of the window manager (in this case, mutter, under Ubuntu it was metacity), I found this message :
https://bbs.archlinux.org/viewtopic.php?id=118585
Quote :
>The controls for changing the keyboard layout is a little hidden in Gnome 3.
>Pull up the Activities Menu, search for Region and Languages.
>Next select Layout tab, and then select Options.
>There, you can change Alt/Win Key behavior.

The only satisfying option is to choose "Left Alt key is switched with left logo key". At last, Alt works as expected inside vinagre, but the main problem is that now, I have to use "Logo+Tab" when I want to switch windows in Gnome, and I am really not used to that...
Maybe an option would be to globally disable Alt key behaviour whenever the focus is inside the guest, and re-enable it afterward, but this needs to be robust... (otherwise, if vinagre crashes the user looses  control over its windows...)

I'm adding David King (maintainer of Vinagre) in this discussion since he may be interested with it, and he may have an advice on the question.

I'll keep trying other solutions but at least I can zoom out in PS now!

I will add a bug about it in bugzilla : do you think it is better in vinagre or spice-gtk ?

Frederic.


----- Mail original -----
> Hi Frédéric,
>
> Although it looks like we have more problems than before, they were
> mostly expected. The primary goal of spice-gtk is not to be a
> client, but rather a client widget. spicy is only our experimental
> client that help us to quickly evaluate a change API, feature or
> behaviour. There is not yet a fully featured (and solid) spice-gtk
> based client. The best is still spicy, for now.. Vinagre+Spice isn't
> bad either, but it lacks multi-head (look, it has the pop-up menu
> you talked about!), and we have plan to make its UI better
> (https://live.gnome.org/Design/Apps/RemoteAccess).
>
> > -I had to go past the warnings about new options (I'm still on
> > Ubuntu,
> > so --with-gtk2.0 helps, and --disable-werror since there is no
> > libjpeg-turbo ppa available yet), but that's done.
>
> Regarding the warning during compilation, that's what we wanted, make
> 3.0 default, and jpeg-turbo *strongly* recommended (I think it
> reduced by x2 the cpu of mjpeg video decoding)
>
> Regarding key handling, the widget is embedded inside a widget tree.
> As such it cannot fully control the behavior of application key
> handling. So it is left to the application (spicy or virt-manager
> for example), to deal with key bindings, configuration, grabbing
> cooperation etc.. There is room for improvements.
>
> > -now that it works : Alt+space still pops up the menu (not the file
> > menu, but that one with the reduce, restore, move window options)
>
> That shouldn't happen if the mouse is over the widget. I think it
> shouldn't ungrab & reactivate accels&mnemonics on mouse leave. Would
> that work in practise? Somebody have an opinion?
>
> > -Alt alone does the same as before : if I'm in panning mode in PS,
> > the
> > cursor changes to "zoom out" as expected, but then nothing happens
> > if
> > I click or click+drag
>
> It seems the window manager still intercepts the mouse, although
> spice-gtk should have the grab. It fails at least for
> alt+right-click (on f15/gnome-shell, with spic{y,ec}). Can you try
> also with spicec? I don't have PS.
>
> > -once in fullscreen, nothing goes out of the client! That means
> > that
> > Shift+F11 does not go back to window mode... Fortunately I am in
> > dual
> > screen (guest has single screen), so I moved the mouse away to the
> > second monitor, hit alt+tab to activate the client again, and only
> > then, Alt+F4 or shift+F11 work.
>
> Actually Shift+F12 should leave fullscreen: spicy notice the ungrab
> combination has been pressed and leave fullscreen. This is perhaps
> not ideal, and we have to decide if spice-gtk widget should handle
> the various key bindings, that is normally handled also by the
> application... With your idea of magic key, we could make it easy
> for an application to create custom bindings without being too
> intrusive.
>
> > -Actually, I noticed that when the mouse is grabbed (even in window
> > mode), shift+F11 does not work... It only work when the mouse is
> > outside the guest area
>
> Correct, same reason, we drop all accels & mnemonics from the app. So
> we need what I described just above, better bindings support in
> spice-gtk (or a different widget tree event traversal, but that is
> perhaps more complicated).
>
> > -I'm not sure if that was the case before, but now, the window has
> > always the same size at opening (and not very big... actually fits
> > exactly with 640x480 in the guest). If I was previously in
> > fullscreen
> > for example, the window opens small, and the agent fits the guest's
> > resolution to 640x480 : not very handy... At client opening, it
> > would
> > be a good idea to try to match the window to the guest resolution,
> > eventually by directly going to fullscreen.
>
> I think it has always been the case, afaik. We need to fix that.
> Would you like to open a bug? ;)
>
> > -I found the configuration file, but not the option to put into
> > it...
>
> Now you can customize the grab sequence in ~/.config/spicy/setting,
> ex:
> [general]
> grab-sequence=Shift_R.
>
> But I am afraid that is probably not the solution you are looking for
> yet.
>
> > -Using a magic key as suggested, I hope you'll put shortcut for all
> > the other options. In particular, it would be handy to be able to
> > disable the "match guest resolution to window size" once in
> > fullscreen
> > : that way, the guest's resolution matches the client fullscreen
> > resolution when it goes fullscreen, and then sticks to it... FYI,
> > in
>
> Ok (again feel free to open a bug)
>
> > VB there is a popup menu (at the top or bottom of the screen,
> > configurable) that opens when the mouse reaches the border. It
> > contains all options related to the client : de/activate this kind
> > of
> > option, plug/unplug devices, etc...
>
> That's one of the thing I like in Vinagre/Spicy. Give it a try!
>
> --
> Marc-André Lureau
>
> >
> > That's a lot of suggestion for tonight, so I'll come back later to
> > you
> > if necessary! Anyway, I'll keep testing and feedbacking you!
> >
> > Frederic.
> >
> > ----- Mail original -----
> > > Hi Frédéric,
> > >
> > > ----- Original Message -----
> > > > works very well over 100Mbit network, 1440*1280 fullscreen),
> > > > some
> > > > key
> > > > combinations don't work well. In particular, alt works alone
> > > > (client's
> > > > cursor gets changed), but you can't press another key together
> > > > with
> > > > it
> > > > nor click (zoom out in photoshop is with alt+space+click, or
> > > > alt+click
> > > > when already in pan mode, which doesn't work either). When I
> > > > try
> > > > that,
> > > > the gtk client's menu appears, and that is very frustrating...
> > >
> > > > That's my first point : at the moment, only shift+F11/F12 are
> > > > supposed
> > > > to interact with the outside, but combinations involving Alt
> > > > interfere.
> > >
> > > Hopefully, this is fixed in git. We now disable all Gtk mnemonics
> > > &
> > > accels. If you have a chance, please give it a try and tell us if
> > > the problem persist.
> > >
> > > > My second point would be about a configuration option : I used
> > > > to
> > > > use
> > > > Virtualbox, and there is a possibility to choose the key that
> > > > gets
> > > > intercepted. Using specifically "Right shift" (which is,
> > > > otherwise,
> > > > almost never used), I solved all my problems : I'm not sure if
> > > > there
> > > > is already a configuration framework for storing user-defined
> > > > options
> > > > in spicy, but maybe that would be a good thing...
> > >
> > > spice-gtk have support for custom grab key combination. It is
> > > used
> > > by
> > > virt-manager "Preferences" for instance. Spicy however, doesn't
> > > have
> > > configuration UI for it. Adding it to spicy.ini configuration
> > > file
> > > should be easy, if you don't mind editing ini files. I'll keep
> > > that
> > > in mind before the next release. Feel free to open a bug in
> > > bugzilla.freedesktop.org.
> > >
> > > > I talked only about a single "magic key", regarding how VB
> > > > works :
> > > > the
> > > > base key (or combination, it can be "Alt+Ctrl" for example) is
> > > > defined, and gives access to all shortcuts : key+F for
> > > > fullscreen,
> > > > "magic key"+other key for the other functions....
> > >
> > > That seems neat, indeed. I very much like it, and I might well
> > > try
> > > to
> > > implement that for spicy.
> > >
> > > > Sorry for not helping much in this project that I really
> > > > believe
> > > > in,
> > > > but I hope that at least my user feedback will help you!
> > >
> > > Your feedback is great, thanks a lot!
> > >
> > > --
> > > Marc-André Lureau
> > >
> > >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
>


More information about the Spice-devel mailing list