[Spice-devel] [PATCH spice-gtk] Revert "Ignore modifiers messages if no modifiers changed"

Victor Toso victortoso at redhat.com
Wed Jul 19 10:00:58 UTC 2017


Hi,

On Mon, Jul 17, 2017 at 01:17:27PM +0200, Victor Toso wrote:
> 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

Acked-by: Victor Toso <victortoso at redhat.com>

Feel free to push if no one has any further 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 at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel



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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170719/fe7b2eda/attachment.sig>


More information about the Spice-devel mailing list