[PATCH inputproto] specs: clarify SD keyboard focus behaviour

Peter Hutterer peter.hutterer at who-t.net
Sun Jul 21 21:28:00 PDT 2013


On Fri, Jul 19, 2013 at 02:59:46AM -0400, Jasper St. Pierre wrote:
> On Fri, Jul 19, 2013 at 1:56 AM, Peter Hutterer <peter.hutterer at who-t.net>wrote:
> 
> > The smart thing would be to have the SD's keyboard focus to be identical to
> > the MD's keyboard focus (and a BadDevice returned when trying to set an
> > attached SD's keyboard focus) but alas, the server never implemented this
> > behaviour and we've now shipped 7 versions with separate SD and MD focus.
> > So
> > consider this set in stone. oops.
> >
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> >  specs/XI2proto.txt | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
> > index d30fcca..79988fc 100644
> > --- a/specs/XI2proto.txt
> > +++ b/specs/XI2proto.txt
> > @@ -212,6 +212,8 @@ If an event is generated by an SD
> >
> >  - if the SD is attached to a master pointer, it changes the position
> > and/or
> >    button state of the master pointer.
> > +- if the SD has a keyboard focus other than None, the key event is sent to
> > +  the focus window.
> >  - if the SD is attached to a master keyboard, it sends events to this
> >    keyboard's focus window (if applicable) and/or changes the modifier
> > state of
> >    this keyboard.
> > @@ -220,6 +222,13 @@ If an event is generated by an SD
> >    Both the sprite and the focus must be managed explicitly by the client
> >    program.
> >
> > +Note: the keyboard focus of an attached slave device is independent to
> > that
> > +of the master device. Two keyboard events are generated, once with
> > deviceid
> > +and sourceid set to the slave device. This keyboard event is sent to the
> > +slave device's focus window. The second event has a deviceid of the master
> > +and a sourceid of the slave device. This second event is delivered to the
> > +master keyboard's focus window.
> > +
> 
> 
> Hm. Is it already emphasized that the default is the root window? If so,
> 
> Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

the default focus isn't specified, it's technically "implementation
dependent", which effectively means "don't rely on the focus to be set to
specific value because someone may have changed it".

Cheers,
   Peter

> 
>  [[hierarchy-dcce]]
> >  Event processing for attached slave devices
> >  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > --
> > 1.8.2.1
> >
> >
> 
> 
> -- 
>   Jasper


More information about the xorg-devel mailing list