Hi Pavel,

On Tue, Jul 11, 2017 at 01:34:12PM +0200, Pavel Grunt wrote:
> This reverts commit 73cd553fb0fbd213b64d72f8b4289ed8a17fc6c0.

Which is:

 "This avoid keep sending modifiers changes if guest is not
  synchronising the changes.

  I consider this as an improving as this avoids client to try again
  and again to force synchronisation however this does not prevent
  every unwanted keystroke insertion which possibly can be a real
  problem on some configurations.

  For instance if guest do not handle caps lock as the client do
  if client uses another modifiers (as num lock) this can force
  inserting virtual caps keypress."

> It may be an optimization, but it complicates turning off
> the capslock once it is enabled.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=101344

It feels like the original patch was trying to fix a bug, not an
optimization. At the same time, above bug is definitely a regression
somewhere.

CC'ing, Frediano for comments


> ---
>  src/channel-inputs.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/channel-inputs.c b/src/channel-inputs.c
> index f79bc38..7572bff 100644
> --- a/src/channel-inputs.c
> +++ b/src/channel-inputs.c
> @@ -242,10 +242,8 @@ static void inputs_handle_modifiers(SpiceChannel 
> *channel, SpiceMsgIn *in)
>      SpiceInputsChannelPrivate *c = SPICE_INPUTS_CHANNEL(channel)->priv;
>      SpiceMsgInputsKeyModifiers *modifiers = spice_msg_in_parsed(in);
>  
> -    if (c->modifiers != modifiers->modifiers) {
> -        c->modifiers = modifiers->modifiers;
> -        g_coroutine_signal_emit(channel, signals[SPICE_INPUTS_MODIFIERS], 0);
> -    }
> +    c->modifiers = modifiers->modifiers;
> +    g_coroutine_signal_emit(channel, signals[SPICE_INPUTS_MODIFIERS], 0);
>  }
>  
>  /* coroutine context */
> -- 
> 2.13.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to