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

Ran Benita ran234 at gmail.com
Sun Jul 20 15:10:55 PDT 2014


On Thu, Jul 17, 2014 at 10:49:10PM +0200, Daniel Martin wrote:
> The field modLatches was missing in the request LatchLockState:
>     http://cgit.freedesktop.org/xorg/proto/kbproto/tree/XKBproto.h#n141
> 
> v2: Use a pad instead of a field, as the field would cause an API break.
>     Though, keep the field commented out to document it.

If someone comes up with something better, that'd be nice, but for now,

Reviewed-by: Ran Benita <ran234 at gmail.com>

The only downsize is that the _request_t struct is changed. But as far
as I can tell this is not a problem. I just tried to move its definition
to the xkb.c file from xkb.h, and it compiled fine; so at least there's
nothing internally that might use the def from the header at a later
time. I wish the headers didn't expose these (and other) details...

> 
> Signed-off-by: Daniel Martin <consume.noise at gmail.com>
> Reviewed-by: Peter Harris <pharris at opentext.com>
> ---
>  src/xkb.xml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/xkb.xml b/src/xkb.xml
> index 04ab429..ad52ea2 100644
> --- a/src/xkb.xml
> +++ b/src/xkb.xml
> @@ -1204,6 +1204,10 @@ <request name="LatchLockState" opcode="5">
>  		<field name="lockGroup" type="BOOL" />
>  		<field name="groupLock" type="CARD8" enum="Group" />
>  		<field name="affectModLatches" type="CARD8" mask="ModMask" />
> +		<pad bytes="1" /> <!-- This pad is a workaround to prevent an API break,
> +		                       which the following field (correct fix) would cause.
> +		<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