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

Marc-André Lureau mlureau at redhat.com
Thu Jun 2 02:56:00 PDT 2011


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