<div dir="ltr"><div><div><div>Hi Chris, Vincent,<br><br></div>Thankyou for the comments.<br></div>I have rearranged the pad position in the patch below.<br><br><br>
CreateWindow<br>
ChangeWindowAttributes<br>
ConfigureWindow<br>
CreateGC<br>
ChangeGC<br>
ChangeKeyboardControl<br>
<br>
The changes of valueparam to switch has been made as per the specs for<br>
the extension for the possible values of value-mask and value-list<br>
<br>
CreateWindow:<br>
<a href="http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n979" target="_blank">http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n979</a><br>
<br>
ChangeWindowAttributes:<br>
<a href="http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1006" target="_blank">http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1006</a><br>
<br>
ConfigureWindow:<br>
<a href="http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1105" target="_blank">http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1105</a><br>
<br>
CreateGC:<br>
<a href="http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1815" target="_blank">http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1815</a><br>
<br>
ChangeGC:<br>
<a href="http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1909" target="_blank">http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1909</a><br>
<br>
ChangeKeyboardControl:<br>
<a href="http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n2547" target="_blank">http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n2547</a><br>
<br>
Casted KEYCODE32 as a CARD32 and added BOOL32 here instead of glx due<br>
common to usage in other extensions.<br>
<br>
Signed-off-by: Jaya Tiwari <<a href="mailto:tiwari.jaya18@gmail.com">tiwari.jaya18@gmail.com</a>><br><br>---<br> src/xproto.xml | 414 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---<br> 1 file changed, 395 insertions(+), 19 deletions(-)<br><br>diff --git a/src/xproto.xml b/src/xproto.xml<br>index bfb8a4c..db2e5a9 100644<br>--- a/src/xproto.xml<br>+++ b/src/xproto.xml<br>@@ -57,6 +57,7 @@ authorization from the authors.<br> <type>GCONTEXT</type><br> </xidunion><br> <br>+ <typedef oldname="CARD32" newname="BOOL32" /><br> <typedef oldname="CARD32" newname="VISUALID" /><br> <br> <typedef oldname="CARD32" newname="TIMESTAMP" /><br>@@ -64,6 +65,8 @@ authorization from the authors.<br> <typedef oldname="CARD32" newname="KEYSYM" /><br> <br> <typedef oldname="CARD8" newname="KEYCODE" /><br>+ <br>+ <typedef oldname="CARD32" newname="KEYCODE32" /><br> <br> <typedef oldname="CARD8" newname="BUTTON" /><br> <br>@@ -1293,9 +1296,71 @@ parent's cursor will cause an immediate change in the displayed cursor.<br> <field type="CARD16" name="border_width" /><br> <field type="CARD16" name="class" enum="WindowClass" /><br> <field type="VISUALID" name="visual" /><br>- <valueparam value-mask-type="CARD32"<br>- value-mask-name="value_mask"<br>- value-list-name="value_list" /><br>+ <field type="CARD32" name="value_mask" mask="CW" /><br>+ <switch name="value_list"><br>+ <fieldref>value_mask</fieldref><br>+ <bitcase><br>+ <enumref ref="CW">BackPixmap</enumref><br>+ <field type="PIXMAP" name="background_pixmap" altenum="BackPixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BackPixel</enumref><br>+ <field type="CARD32" name="background_pixel" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BorderPixmap</enumref><br>+ <field type="PIXMAP" name="border_pixmap" altenum="Pixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BorderPixel</enumref><br>+ <field type="CARD32" name="border_pixel" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BitGravity</enumref><br>+ <field type="CARD32" name="bit_gravity" enum="Gravity"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">WinGravity</enumref><br>+ <field type="CARD32" name="win_gravity" enum="Gravity"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BackingStore</enumref><br>+ <field type="CARD32" name="backing_store" enum="BackingStore"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BackingPlanes</enumref><br>+ <field type="CARD32" name="backing_planes" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BackingPixel</enumref><br>+ <field type="CARD32" name="backing_pixel" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">OverrideRedirect</enumref><br>+ <field type="BOOL32" name="override_redirect" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">SaveUnder</enumref><br>+ <field type="BOOL32" name="save_under" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">EventMask</enumref><br>+ <field type="CARD32" name="event_mask" mask="EventMask"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">DontPropagate</enumref><br>+ <field type="CARD32" name="do_not_propogate_mask" mask="EventMask"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">Colormap</enumref><br>+ <field type="COLORMAP" name="colormap" altenum="Colormap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">Cursor</enumref><br>+ <field type="CURSOR" name="cursor" altenum="Cursor"/><br>+ </bitcase><br>+ </switch><br>+<br> <doc><br> <brief>Creates a window</brief><br> <description><![CDATA[<br>@@ -1374,9 +1439,71 @@ The X server could not allocate the requested resources (no memory?).<br> <request name="ChangeWindowAttributes" opcode="2"><br> <pad bytes="1" /><br> <field type="WINDOW" name="window" /><br>- <valueparam value-mask-type="CARD32"<br>- value-mask-name="value_mask"<br>- value-list-name="value_list" /><br>+ <field type="CARD32" name="value_mask" mask="CW" /><br>+ <switch name="value_list"><br>+ <fieldref>value_mask</fieldref><br>+ <bitcase><br>+ <enumref ref="CW">BackPixmap</enumref><br>+ <field type="PIXMAP" name="background_pixmap" altenum="BackPixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BackPixel</enumref><br>+ <field type="CARD32" name="background_pixel" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BorderPixmap</enumref><br>+ <field type="PIXMAP" name="border_pixmap" altenum="Pixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BorderPixel</enumref><br>+ <field type="CARD32" name="border_pixel" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BitGravity</enumref><br>+ <field type="CARD32" name="bit_gravity" enum="Gravity"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">WinGravity</enumref><br>+ <field type="CARD32" name="win_gravity" enum="Gravity"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BackingStore</enumref><br>+ <field type="CARD32" name="backing_store" enum="BackingStore"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BackingPlanes</enumref><br>+ <field type="CARD32" name="backing_planes" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">BackingPixel</enumref><br>+ <field type="CARD32" name="backing_pixel" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">OverrideRedirect</enumref><br>+ <field type="BOOL32" name="override_redirect" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">SaveUnder</enumref><br>+ <field type="BOOL32" name="save_under" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">EventMask</enumref><br>+ <field type="CARD32" name="event_mask" mask="EventMask"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">DontPropagate</enumref><br>+ <field type="CARD32" name="do_not_propogate_mask" mask="EventMask"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">Colormap</enumref><br>+ <field type="COLORMAP" name="colormap" altenum="Colormap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="CW">Cursor</enumref><br>+ <field type="CURSOR" name="cursor" altenum="Cursor"/><br>+ </bitcase><br>+ </switch><br>+<br> <doc><br> <brief>change window attributes</brief><br> <description><![CDATA[<br>@@ -1689,11 +1816,40 @@ The specified window does not exist.<br> <request name="ConfigureWindow" opcode="12"><br> <pad bytes="1" /><br> <field type="WINDOW" name="window" /><br>- <field type="CARD16" name="value_mask" /><br>+ <field type="CARD16" name="value_mask" mask="ConfigWindow" /><br> <pad bytes="2" /><br>- <valueparam value-mask-type="CARD16"<br>- value-mask-name="value_mask"<br>- value-list-name="value_list" /><br>+ <switch name="value_list"><br>+ <fieldref>value_mask</fieldref><br>+ <bitcase><br>+ <enumref ref="ConfigWindow">X</enumref><br>+ <field type="INT32" name="x" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="ConfigWindow">Y</enumref><br>+ <field type="INT32" name="y" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="ConfigWindow">Width</enumref><br>+ <field type="CARD32" name="width" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="ConfigWindow">Height</enumref><br>+ <field type="CARD32" name="height" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="ConfigWindow">BorderWidth</enumref><br>+ <field type="CARD32" name="border_width" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="ConfigWindow">Sibling</enumref><br>+ <field type="WINDOW" name="sibling" altenum="Window"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="ConfigWindow">StackMode</enumref><br>+ <field type="CARD32" name="stack_mode" enum="StackMode"/><br>+ </bitcase><br>+ </switch><br>+ <br> <doc><br> <brief>Configures window attributes</brief><br> <description><![CDATA[<br>@@ -3883,9 +4039,102 @@ TODO<br> <pad bytes="1" /><br> <field type="GCONTEXT" name="cid" /><br> <field type="DRAWABLE" name="drawable" /><br>- <valueparam value-mask-type="CARD32"<br>- value-mask-name="value_mask"<br>- value-list-name="value_list" /><br>+ <field type="CARD32" name="value_mask" mask="GC" /><br>+ <switch name="value_list"><br>+ <fieldref>value_mask</fieldref><br>+ <bitcase><br>+ <enumref ref="GC">Function</enumref><br>+ <field type="CARD32" name="function" enum="GX"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">PlaneMask</enumref><br>+ <field type="CARD32" name="plane_mask" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Foreground</enumref><br>+ <field type="CARD32" name="foreground" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Background</enumref><br>+ <field type="CARD32" name="background" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">LineWidth</enumref><br>+ <field type="CARD32" name="line_width" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">LineStyle</enumref><br>+ <field type="CARD32" name="line_style" enum="LineStyle"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">CapStyle</enumref><br>+ <field type="CARD32" name="cap_style" enum="CapStyle"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">JoinStyle</enumref><br>+ <field type="CARD32" name="join_style" enum="JoinStyle"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">FillStyle</enumref><br>+ <field type="CARD32" name="fill_style" enum="FillStyle"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">FillRule</enumref><br>+ <field type="CARD32" name="fill_rule" enum="FillRule"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Tile</enumref><br>+ <field type="PIXMAP" name="tile" altenum="Pixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Stipple</enumref><br>+ <field type="PIXMAP" name="stipple" altenum="Pixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">TileStippleOriginX</enumref><br>+ <field type="INT32" name="tile_stipple_x_origin" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">TileStippleOriginY</enumref><br>+ <field type="INT32" name="tile_stipple_y_origin" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Font</enumref><br>+ <field type="FONT" name="font" altenum="Font"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">SubwindowMode</enumref><br>+ <field type="CARD32" name="subwindow_mode" enum="SubwindowMode"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">GraphicsExposures</enumref><br>+ <field type="BOOL32" name="graphics_exposures" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">ClipOriginX</enumref><br>+ <field type="INT32" name="clip_x_origin" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">ClipOriginY</enumref><br>+ <field type="INT32" name="clip_y_origin" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">ClipMask</enumref><br>+ <field type="PIXMAP" name="clip_mask" altenum="Pixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">DashOffset</enumref><br>+ <field type="CARD32" name="dash_offset" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">DashList</enumref><br>+ <field type="CARD32" name="dashes" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">ArcMode</enumref><br>+ <field type="CARD32" name="arc_mode" enum="ArcMode"/><br>+ </bitcase><br>+ </switch><br> <doc><br> <brief>Creates a graphics context</brief><br> <description><![CDATA[<br>@@ -3924,9 +4173,102 @@ The X server could not allocate the requested resources (no memory?).<br> <request name="ChangeGC" opcode="56"><br> <pad bytes="1" /><br> <field type="GCONTEXT" name="gc" /><br>- <valueparam value-mask-type="CARD32"<br>- value-mask-name="value_mask"<br>- value-list-name="value_list" /><br>+ <field type="CARD32" name="value_mask" mask="GC" /><br>+ <switch name="value_list"><br>+ <fieldref>value_mask</fieldref><br>+ <bitcase><br>+ <enumref ref="GC">Function</enumref><br>+ <field type="CARD32" name="function" enum="GX"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">PlaneMask</enumref><br>+ <field type="CARD32" name="plane_mask" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Foreground</enumref><br>+ <field type="CARD32" name="foreground" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Background</enumref><br>+ <field type="CARD32" name="background" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">LineWidth</enumref><br>+ <field type="CARD32" name="line_width" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">LineStyle</enumref><br>+ <field type="CARD32" name="line_style" enum="LineStyle"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">CapStyle</enumref><br>+ <field type="CARD32" name="cap_style" enum="CapStyle"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">JoinStyle</enumref><br>+ <field type="CARD32" name="join_style" enum="JoinStyle"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">FillStyle</enumref><br>+ <field type="CARD32" name="fill_style" enum="FillStyle"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">FillRule</enumref><br>+ <field type="CARD32" name="fill_rule" enum="FillRule"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Tile</enumref><br>+ <field type="PIXMAP" name="tile" altenum="Pixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Stipple</enumref><br>+ <field type="PIXMAP" name="stipple" altenum="Pixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">TileStippleOriginX</enumref><br>+ <field type="INT32" name="tile_stipple_x_origin" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">TileStippleOriginY</enumref><br>+ <field type="INT32" name="tile_stipple_y_origin" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">Font</enumref><br>+ <field type="FONT" name="font" altenum="Font"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">SubwindowMode</enumref><br>+ <field type="CARD32" name="subwindow_mode" enum="SubwindowMode"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">GraphicsExposures</enumref><br>+ <field type="BOOL32" name="graphics_exposures" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">ClipOriginX</enumref><br>+ <field type="INT32" name="clip_x_origin" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">ClipOriginY</enumref><br>+ <field type="INT32" name="clip_y_origin" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">ClipMask</enumref><br>+ <field type="PIXMAP" name="clip_mask" altenum="Pixmap"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">DashOffset</enumref><br>+ <field type="CARD32" name="dash_offset" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">DashList</enumref><br>+ <field type="CARD32" name="dashes" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="GC">ArcMode</enumref><br>+ <field type="CARD32" name="arc_mode" enum="ArcMode"/><br>+ </bitcase><br>+ </switch><br> <doc><br> <brief>change graphics context components</brief><br> <description><![CDATA[<br>@@ -4982,9 +5324,43 @@ sensitive!<br> <br> <request name="ChangeKeyboardControl" opcode="102"><br> <pad bytes="1" /><br>- <valueparam value-mask-type="CARD32"<br>- value-mask-name="value_mask"<br>- value-list-name="value_list" /><br>+ <field type="CARD32" name="value_mask" mask="KB" /><br>+ <switch name="value_list"><br>+ <fieldref>value_mask</fieldref><br>+ <bitcase><br>+ <enumref ref="KB">KeyClickPercent</enumref><br>+ <field type="INT32" name="key_click_percent" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="KB">BellPercent</enumref><br>+ <field type="INT32" name="bell_percent" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="KB">BellPitch</enumref><br>+ <field type="INT32" name="bell_pitch" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="KB">BellDuration</enumref><br>+ <field type="INT32" name="bell_duration" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="KB">Led</enumref><br>+ <field type="CARD32" name="led" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="KB">LedMode</enumref><br>+ <field type="CARD32" name="led_mode" enum="LedMode"/><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="KB">Key</enumref><br>+ <field type="KEYCODE32" name="key" /><br>+ </bitcase><br>+ <bitcase><br>+ <enumref ref="KB">AutoRepeatMode</enumref><br>+ <field type="CARD32" name="auto_repeat_mode" enum="AutoRepeatMode"/><br>+ </bitcase><br>+ </switch><br>+<br> </request><br> <br> <request name="GetKeyboardControl" opcode="103"><br>-- <br>2.1.3<br><br></div><div>Regards,<br></div><div>Jaya<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 16, 2015 at 6:41 AM, Christian Linhart <span dir="ltr"><<a href="mailto:chris@demorecorder.com" target="_blank">chris@demorecorder.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Vincent,<br>
<br>
Thank you very much for spotting this.<br>
<br>
In fact, the 2 byte pad is still there but at the wrong position.<br>
Therefore it needs to be removed from the wrong position.<br>
I have added my comment below.<br>
<br>
@Jaya: Can you please make a corrected patch?<br>
<br>
Thanks,<br>
<br>
Chris<br>
<br>
P.S.: there is a protocol spec that is clearer than the one you have cited:<br>
<a href="http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1105" target="_blank">http://cgit.freedesktop.org/xorg/proto/xproto/tree/specs/encoding.xml#n1105</a><br>
<span class=""><br>
<br>
On 01/16/15 11:31, Vincent Chen wrote:<br>
> Hi,<br>
><br>
> I think there might be an error with the specification of<br>
> ConfigureWindow. According to:<br>
><br>
> <a href="http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:ConfigureWindow" target="_blank">http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:ConfigureWindow</a><br>
><br>
> there should be a two-byte padding between the mask and the values.<br>
> The old valueparam with mask type of CARD16 (as opposed to the usual<br>
> CARD32) did not make this need for extra padding explicit. With the<br>
> new switch bitcase, however, the extra padding should be manually<br>
> inserted.<br>
><br>
> On Mon, Dec 22, 2014 at 10:35 AM, Jaya Tiwari <<a href="mailto:tiwari.jaya18@gmail.com">tiwari.jaya18@gmail.com</a>> wrote:<br>
>> @@ -1689,11 +1816,40 @@ <enum name="StackMode"><br>
>> <request name="ConfigureWindow" opcode="12"><br>
>> <pad bytes="1" /><br>
>> <field type="WINDOW" name="window" /><br>
>> - <field type="CARD16" name="value_mask" /><br>
>> <pad bytes="2" /><br>
</span>This pad needs to be removed.<br>
<span class="">>> - <valueparam value-mask-type="CARD16"<br>
>> - value-mask-name="value_mask"<br>
>> - value-list-name="value_list" /><br>
>> + <field type="CARD16" name="value_mask" mask="ConfigWindow" /><br>
> Should add padding here:<br>
><br>
> <pad bytes="2" /><br>
</span>Yes.<br>
<div class="HOEnZb"><div class="h5">><br>
>> + <switch name="value_list"><br>
>> + <fieldref>value_mask</fieldref><br>
>> + <bitcase><br>
>> + <enumref ref="ConfigWindow">X</enumref><br>
>> + <field type="INT32" name="x" /><br>
>> + </bitcase><br>
>> + <bitcase><br>
>> + <enumref ref="ConfigWindow">Y</enumref><br>
>> + <field type="INT32" name="y" /><br>
>> + </bitcase><br>
>> + <bitcase><br>
>> + <enumref ref="ConfigWindow">Width</enumref><br>
>> + <field type="CARD32" name="width" /><br>
>> + </bitcase><br>
>> + <bitcase><br>
>> + <enumref ref="ConfigWindow">Height</enumref><br>
>> + <field type="CARD32" name="height" /><br>
>> + </bitcase><br>
>> + <bitcase><br>
>> + <enumref ref="ConfigWindow">BorderWidth</enumref><br>
>> + <field type="CARD32" name="border_width" /><br>
>> + </bitcase><br>
>> + <bitcase><br>
>> + <enumref ref="ConfigWindow">Sibling</enumref><br>
>> + <field type="WINDOW" name="sibling" altenum="Window"/><br>
>> + </bitcase><br>
>> + <bitcase><br>
>> + <enumref ref="ConfigWindow">StackMode</enumref><br>
>> + <field type="CARD32" name="stack_mode" enum="StackMode"/><br>
>> + </bitcase><br>
>> + </switch><br>
>> +<br>
>> <doc><br>
>> <brief>Configures window attributes</brief><br>
>> <description><![CDATA[<br>
> By the way, ConfigureWindow is the only place (that I know of) where<br>
> the mask type is CARD16. Every other uses of valueparam uses mask type<br>
> of CARD32. Not sure why the protocol designer didn't just make this<br>
> CARD32 as well, since the mask plus the two padding uses up 4 bytes<br>
> anyway...<br>
><br>
> Regards,<br>
><br>
> Vincent Chen<br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Xcb mailing list<br>
> <a href="mailto:Xcb@lists.freedesktop.org">Xcb@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/xcb" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xcb</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Regards,<br></div>Jaya<br></div></div>
</div>