[Spice-devel] [PATCH spice-gtk 2/2] gtk-session: always sync modifiers for client events

Marc-André Lureau marcandre.lureau at gmail.com
Mon Apr 7 03:06:32 PDT 2014


ack?


On Fri, Apr 4, 2014 at 8:49 PM, Jonathon Jongsma <jjongsma at redhat.com>wrote:

>
>
> ----- Original Message -----
> > From: "Marc-André Lureau" <mlureau at redhat.com>
> > To: "Jonathon Jongsma" <jjongsma at redhat.com>
> > Cc: spice-devel at lists.freedesktop.org
> > Sent: Friday, April 4, 2014 12:16:26 PM
> > Subject: Re: [Spice-devel] [PATCH spice-gtk 2/2] gtk-session: always
> sync modifiers for client events
> >
> >
> >
> > ----- Original Message -----
> > >         - if the guest display widget is focused and the user presses
> > >         Caps lock, we will send a keypress message (which will cause
> the
> > >         capslock modifier to toggle on the guest) and then we will
> > >         immediately send a modifers message. So we'll send duplicate
> > >         messages for the same event. In practice I hadn't noticed any
> > >         problems because of this, but I wonder if this is partly what
> > >         caused the issue you observed?
> >
> > Yeah, I noticed that too, but I don't think it's a big problem sending
> twice
> > the current state.
>
> Probably not. I can't currently think of a race condition that would cause
> problems here.
>
> >
> >
> > >         - if the capslock on the client is mapped to something else
> > >         (e.g. 'control'), and the capslock key is pressed while the
> > >         display widget is focused, we will send a keypress event to the
> > >         guest, which will cause the guest's capslock state to change.
> >
> >
> > >         However, the client's capslock state will not change, so when
> we
> > >         receive the 'inputs-modifiers' message from the guest, we will
> > >         send down the old value again.  On the other hand, this is a
> > >         corner case because it requires a non-standard keyboard layout,
> > >         and the alternative (not overriding the guest modifiers state)
> > >         results in an out-of-sync modifiers state between the guest and
> > >         client. So I'm not sure what the right answer is here.
> > >
> > > thoughts?
> >
> > That sounds still ok to me, we want the guest to be sync with the client
> > state. Doing something else will be even more annoying, wouldn't it?
> >
>
> Yes, probably, but I thought I'd mention it for others to consider.
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140407/0389f5cc/attachment-0001.html>


More information about the Spice-devel mailing list