ConfigureWindow XML change

View: New views
3 Messages — Rating Filter:   Alert me  

ConfigureWindow XML change

by Bugzilla from ewalsh@tycho.nsa.gov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

xcb/proto commit 57934c introduced the "value-mask-pad" attribute to fix
the ConfigureWindow request and it's unique, problematic 2-byte
value-mask field.

However it was still broken in xpyb (the pad was in the wrong place),
prompting
http://bugs.freedesktop.org/show_bug.cgi?id=24507

I was able to fix it harder by reverting 57934c and instead simply
defining the value-mask-length field early and then the pad bytes:

    <request name="ConfigureWindow" opcode="12">
      <pad bytes="1" />
      <field type="WINDOW" name="window" />
+<field type="CARD16" name="value_mask" />
+<pad bytes="2" />
      <valueparam value-mask-type="CARD16"
                  value-mask-name="value_mask"
                  value-list-name="value_list" />

This change shouldn't be a huge deal because defining a length field
early happens all the time with lists (the Python parser treats
valueparams as lists which is why this works).  But this could in theory
affect other parsers/bindings, so I wanted to give a heads-up.



--
Eamon Walsh<ewalsh@...>
National Security Agency

_______________________________________________
Xcb mailing list
Xcb@...
http://lists.freedesktop.org/mailman/listinfo/xcb

Re: ConfigureWindow XML change

by Barton C Massey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Eamon, thanks much for tackling this.  I'm not quite sure I
understand your fix :-), but hopefully those affected by it
will.

        Bart

In message <4ADF95AA.4010707@...> you wrote:

> xcb/proto commit 57934c introduced the "value-mask-pad" attribute to fix
> the ConfigureWindow request and it's unique, problematic 2-byte
> value-mask field.
>
> However it was still broken in xpyb (the pad was in the wrong place),
> prompting
> http://bugs.freedesktop.org/show_bug.cgi?id=24507
>
> I was able to fix it harder by reverting 57934c and instead simply
> defining the value-mask-length field early and then the pad bytes:
>
>     <request name="ConfigureWindow" opcode="12">
>       <pad bytes="1" />
>       <field type="WINDOW" name="window" />
> +<field type="CARD16" name="value_mask" />
> +<pad bytes="2" />
>       <valueparam value-mask-type="CARD16"
>                   value-mask-name="value_mask"
>                   value-list-name="value_list" />
>
> This change shouldn't be a huge deal because defining a length field
> early happens all the time with lists (the Python parser treats
> valueparams as lists which is why this works).  But this could in theory
> affect other parsers/bindings, so I wanted to give a heads-up.
>
>
>
> --
> Eamon Walsh<ewalsh@...>
> National Security Agency
>
_______________________________________________
Xcb mailing list
Xcb@...
http://lists.freedesktop.org/mailman/listinfo/xcb

Re: ConfigureWindow XML change

by Julien Danjou-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At 1256166826 time_t, Eamon Walsh wrote:
> This change shouldn't be a huge deal because defining a length field
> early happens all the time with lists (the Python parser treats
> valueparams as lists which is why this works).  But this could in theory
> affect other parsers/bindings, so I wanted to give a heads-up.

FWIW, the C binding (well, libxcb) is not affected by this change, so
we're good. :)

--
Julien Danjou
// ᐰ <julien@...>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// Tomorrow I was nothing, yesterday I'll be.


_______________________________________________
Xcb mailing list
Xcb@...
http://lists.freedesktop.org/mailman/listinfo/xcb

signature.asc (205 bytes) Download Attachment