[PATCH:setxkbmap 3/3] Use C99 struct initializer for cmdNames in applyComponentNames
Peter Hutterer
peter.hutterer at who-t.net
Mon Feb 11 19:29:47 PST 2013
On Sun, Feb 10, 2013 at 08:31:57PM -0800, Alan Coopersmith wrote:
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> setxkbmap.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/setxkbmap.c b/setxkbmap.c
> index e50ad16..29a37a2 100644
> --- a/setxkbmap.c
> +++ b/setxkbmap.c
> @@ -1018,13 +1018,15 @@ applyComponentNames(void)
> /* Upload the new description to the server. */
> if (dpy && !print && !query)
> {
> - XkbComponentNamesRec cmdNames;
> - cmdNames.types = settings.types.value;
> - cmdNames.compat = settings.compat.value;
> - cmdNames.symbols = settings.symbols.value;
> - cmdNames.keycodes = settings.keycodes.value;
> - cmdNames.geometry = settings.geometry.value;
> - cmdNames.keymap = settings.keymap.value;
> + XkbComponentNamesRec cmdNames = {
> + .keymap = settings.keymap.value,
> + .keycodes = settings.keycodes.value,
> + .types = settings.types.value,
> + .compat = settings.compat.value,
> + .symbols = settings.symbols.value,
> + .geometry = settings.geometry.value
> + };
> +
> xkb = XkbGetKeyboardByName(dpy, deviceSpec, &cmdNames,
> XkbGBN_AllComponentsMask,
> XkbGBN_AllComponentsMask &
> --
> 1.7.9.2
series:
cac515f..cdc2551 master -> master
thanks.
Cheers,
Peter
More information about the xorg-devel
mailing list