On Sat, Jun 04, 2016 at 06:42:07PM +0200, Walter Alejandro Iglesias wrote:
> There's an old xkbcomp bug that perhaps because it just causes a
> harmless warning (and not with all layouts, us keyboard users won't
> notice it) xorg guys never bothered about fixing it.  A couple of years
> ago some guy sent them a patch that never was applied:
>
> https://lists.x.org/archives/xorg-devel/2014-September/043751.html
>
> The warning is indeed a bug.  The guy explains all well except for the
> way to *reproduce* it, that isn't complete; to see the warning you must
> set before one of the affected layouts (i.e. de, es, fr).  Some
> examples:
>
> $ setxkbmap fi -print | xkbcomp -w 1 - $DISPLAY
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
> $ setxkbmap af -print | xkbcomp -w 1 - $DISPLAY
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
> $ setxkbmap br -print | xkbcomp -w 1 - $DISPLAY
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
> $ setxkbmap es -print | xkbcomp -w 1 - $DISPLAY
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
> $ setxkbmap fr -print | xkbcomp -w 1 - $DISPLAY
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
> $ setxkbmap de -print | xkbcomp -w 1 - $DISPLAY
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
> $ setxkbmap pl -print | xkbcomp -w 1 - $DISPLAY
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
> $ setxkbmap us -print | xkbcomp -w 1 - $DISPLAY
> $ (no output with 'us' layout)
> $ setxkbmap ru -print | xkbcomp -w 1 - $DISPLAY
> $ (no output with 'ru' layout)
>
> The final version of the patch (relevant part pasted also at the bottom
> of this message):
>
> http://lists.x.org/archives/xorg-devel/attachments/20140911/e675c15a/attachment.patch
>
> The good news is *I've tried the patch in xenocara* and I can confirm it
> makes the useless warning disappear and at least with the Spanish
> keyboard I haven't noticed any undesirable side effects.  But I ignore
> what the expected behavior in all other languages is.  If we wait for
> anyone affected to try the patch it won't ever get fixed.  May be
> committing the diff, put a notice in misc@, and wait to see if someone
> complains? :-)  Once the patch is applied anyone may check specially if
> the right alt key *when associated to level3 symbols* works as expected.
>
>
> Here is the diff (xenocara/app/xkbcomp/symbols.c):
>
> Signed-off-by: Benno Schulenberg <[email protected]>
> Reviewed-by: Ran Benita <[email protected]>
> ---
>  symbols.c |   15 ++++++++-------
>  1 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/symbols.c b/symbols.c
> index d43ba9f..9313d3c 100644
> --- a/symbols.c
> +++ b/symbols.c
> @@ -339,18 +339,19 @@ MergeKeyGroups(SymbolsInfo * info,
>      clobber = (from->defs.merge != MergeAugment);
>      report = (warningLevel > 9) ||
>          ((into->defs.fileID == from->defs.fileID) && (warningLevel > 0));
> -    if (into->numLevels[group] >= from->numLevels[group])
> -    {
> -        resultSyms = into->syms[group];
> -        resultActs = into->acts[group];
> -        resultWidth = into->numLevels[group];
> -    }
> -    else
> +    if ((from->numLevels[group] > into->numLevels[group])
> +        || (clobber && (from->types[group] != None)))
>      {
>          resultSyms = from->syms[group];
>          resultActs = from->acts[group];
>          resultWidth = from->numLevels[group];
>      }
> +    else
> +    {
> +        resultSyms = into->syms[group];
> +        resultActs = into->acts[group];
> +        resultWidth = into->numLevels[group];
> +    }
>      if (resultSyms == NULL)
>      {
>          resultSyms = uTypedCalloc(resultWidth, KeySym);
>
>
> Thanks,
>
>       Walter
>

Upgraded today to latest snapshot:

OpenBSD 6.0-beta (GENERIC.MP) #2239: Thu Jun 30 12:13:01 MDT 2016

I was hopping this:

https://marc.info/?l=openbsd-cvs&m=146713260221317&w=2

would fix the issue.  Unfortunately it doesn't.

Reply via email to