[Xcb] [proto 1/3] xkb: Add missing modLatches to LatchLockState

Ran Benita ran234 at gmail.com
Wed Jul 16 08:09:17 PDT 2014


On Wed, Jul 16, 2014 at 03:37:35PM +0200, Daniel Martin wrote:
> On 16 July 2014 14:30, Ran Benita <ran234 at gmail.com> wrote:
> > On Tue, Jul 15, 2014 at 07:25:16PM +0200, Daniel Martin wrote:
> >> The field modLatches was missing in the request LatchLockState:
> >>     http://cgit.freedesktop.org/xorg/proto/kbproto/tree/XKBproto.h#n141
> >
> > Change looks correct to me, but as always it breaks the existing
> > users (which according to google do exist). So this needs a major
> > sobump, or something else, like LatchLockState2... Any suggestions?
> 
> Ups, I have spoted such a break in Roberts dri2 patch lately, but not
> in my own. :/
> 
> I personally don't like to have a second LatchLockState version in the xml.
> We could just add the fix as a comment and keep latchGroup misplaced as it is.
> Or add a second pad+comment instead of modLatches. At least latchGroup would
> be aligned correct afterwards. Though, we may need a sobump as the _request_t
> struct changes - in case anyone uses it directly?

Yeah, a -2 version is ugly.
Best of all would be a solution where modLatches is not mysteriously
absent. But if that's not possible, I like your pad idea, it is better
than keeping a broken request. I don't think anyone cares about the
request struct itself, so we can even keep the so number (though I'm not
100% sure about that).

> >> Signed-off-by: Daniel Martin <consume.noise at gmail.com>
> >> ---
> >>  src/xkb.xml | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/src/xkb.xml b/src/xkb.xml
> >> index 04ab429..c904f6c 100644
> >> --- a/src/xkb.xml
> >> +++ b/src/xkb.xml
> >> @@ -1204,6 +1204,7 @@ <request name="LatchLockState" opcode="5">
> >>               <field name="lockGroup" type="BOOL" />
> >>               <field name="groupLock" type="CARD8" enum="Group" />
> >>               <field name="affectModLatches" type="CARD8" mask="ModMask" />
> >> +             <field name="modLatches" type="CARD8" mask="ModMask" />
> >>               <pad bytes="1" />
> >>               <field name="latchGroup" type="BOOL" />
> >>               <field name="groupLatch" type="CARD16" />
> >> --
> >> 2.0.1
> >>
> >> _______________________________________________
> >> Xcb mailing list
> >> Xcb at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list