[Spice-devel] [spice-gtk v3 7/7] Sync only on focus change
Frediano Ziglio
fziglio at redhat.com
Mon Sep 5 14:07:18 UTC 2016
> > > When does this happen? Can you give a reproducer?
> > >
> >
> > If you have an English client and a Linux VM just use "setxkbmap jp", on
> > Windows set caps release to shift instead of caps, on Mac OS X use the
> > num/scroll locks. There are just normal settings.
>
> Ok, I can reproduce the 1 sync per second. It's probably not that critical
> though, I cannot realistically imagine how it can prevent you from using the
> VM.
>
On a Japanese keyboard this just change the keyboard input mode
every second... imagine that your keyboard layout change every second!
Just trying this
--- a/src/channel-inputs.c
+++ b/src/channel-inputs.c
@@ -242,8 +242,10 @@ static void inputs_handle_modifiers(SpiceChannel *channel, SpiceMsgIn *in)
SpiceInputsChannelPrivate *c = SPICE_INPUTS_CHANNEL(channel)->priv;
SpiceMsgInputsKeyModifiers *modifiers = spice_msg_in_parsed(in);
- c->modifiers = modifiers->modifiers;
- g_coroutine_signal_emit(channel, signals[SPICE_INPUTS_MODIFIERS], 0);
+ if (c->modifiers != modifiers->modifiers) {
+ c->modifiers = modifiers->modifiers;
+ g_coroutine_signal_emit(channel, signals[SPICE_INPUTS_MODIFIERS], 0);
+ }
}
/* coroutine context */
> Any idea why it doesn't sync in the guest?
>
Currently the lock sync on the server is done sending a specific
scancode, the problem is that on the guest this scancode is not
associated with the lock function.
> Tbh, I think we should keep the current behaviour by default: keep the locks
> on your keyboard even if the guest doesn't sync. Eventually, we could have
> guest locks indicator on a status bar (like spicy).
>
What does it means "keep the locks on your keyboard"? You mean never change
the client locks even if out of sync?
Yes, idea of status bar is fine, it's surely implemented by Bochs, I think
also in VMWare player.
Frediano
More information about the Spice-devel
mailing list