Remove fake support for global group range settings
A symbols file may contain a global, non key specific setting for the group out-of-range handling method (wrap, clamp, redirect). Only that: * Its parsed and kept in the SymbolsInfo, but is not otherwise used in any way (it's the same in the real xkbcomp). * It's not used in any of xkeyboard-config files. * It's not mentioned in the xkb specs (only the per-key ones). * It doesn't make much sense anyway. So remove the struct field, and emit an "unsupported, ignored" warning. We don't increment the error count because of it, just continue (the radio group warning just below is changed to do the same - there's no reason to possibly abort the entire thing for it). Signed-off-by: Ran Benita <ran234@gmail.com> Conflicts: src/xkbcomp/symbols.cmaster
parent
98b155c80a
commit
dd1ae1e42f
|
@ -265,7 +265,6 @@ typedef struct _SymbolsInfo
|
||||||
unsigned fileID;
|
unsigned fileID;
|
||||||
unsigned merge;
|
unsigned merge;
|
||||||
unsigned explicit_group;
|
unsigned explicit_group;
|
||||||
unsigned groupInfo;
|
|
||||||
darray(KeyInfo) keys;
|
darray(KeyInfo) keys;
|
||||||
KeyInfo dflt;
|
KeyInfo dflt;
|
||||||
VModInfo vmods;
|
VModInfo vmods;
|
||||||
|
@ -286,7 +285,6 @@ InitSymbolsInfo(SymbolsInfo * info, struct xkb_keymap *keymap)
|
||||||
info->errorCount = 0;
|
info->errorCount = 0;
|
||||||
info->fileID = 0;
|
info->fileID = 0;
|
||||||
info->merge = MergeOverride;
|
info->merge = MergeOverride;
|
||||||
info->groupInfo = 0;
|
|
||||||
darray_init(info->keys);
|
darray_init(info->keys);
|
||||||
darray_growalloc(info->keys, SYMBOLS_INIT_SIZE);
|
darray_growalloc(info->keys, SYMBOLS_INIT_SIZE);
|
||||||
info->modMap = NULL;
|
info->modMap = NULL;
|
||||||
|
@ -1357,7 +1355,7 @@ SetGroupName(SymbolsInfo *info, struct xkb_keymap *keymap, ExprDef *arrayNdx,
|
||||||
static int
|
static int
|
||||||
HandleSymbolsVar(VarDef *stmt, struct xkb_keymap *keymap, SymbolsInfo *info)
|
HandleSymbolsVar(VarDef *stmt, struct xkb_keymap *keymap, SymbolsInfo *info)
|
||||||
{
|
{
|
||||||
ExprResult elem, field, tmp;
|
ExprResult elem, field;
|
||||||
ExprDef *arrayNdx;
|
ExprDef *arrayNdx;
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
|
@ -1378,59 +1376,31 @@ HandleSymbolsVar(VarDef *stmt, struct xkb_keymap *keymap, SymbolsInfo *info)
|
||||||
&& ((strcasecmp(field.str, "groupswrap") == 0) ||
|
&& ((strcasecmp(field.str, "groupswrap") == 0) ||
|
||||||
(strcasecmp(field.str, "wrapgroups") == 0)))
|
(strcasecmp(field.str, "wrapgroups") == 0)))
|
||||||
{
|
{
|
||||||
if (!ExprResolveBoolean(keymap->ctx, stmt->value, &tmp))
|
ERROR("Global \"groupswrap\" not supported\n");
|
||||||
{
|
ACTION("Ignored\n");
|
||||||
ERROR("Illegal setting for global groupsWrap\n");
|
ret = true;
|
||||||
ACTION("Non-boolean value ignored\n");
|
|
||||||
ret = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (tmp.uval)
|
|
||||||
info->groupInfo = XkbWrapIntoRange;
|
|
||||||
else
|
|
||||||
info->groupInfo = XkbClampIntoRange;
|
|
||||||
ret = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ((elem.str == NULL)
|
else if ((elem.str == NULL)
|
||||||
&& ((strcasecmp(field.str, "groupsclamp") == 0) ||
|
&& ((strcasecmp(field.str, "groupsclamp") == 0) ||
|
||||||
(strcasecmp(field.str, "clampgroups") == 0)))
|
(strcasecmp(field.str, "clampgroups") == 0)))
|
||||||
{
|
{
|
||||||
if (!ExprResolveBoolean(keymap->ctx, stmt->value, &tmp))
|
ERROR("Global \"groupsclamp\" not supported\n");
|
||||||
{
|
ACTION("Ignored\n");
|
||||||
ERROR("Illegal setting for global groupsClamp\n");
|
ret = true;
|
||||||
ACTION("Non-boolean value ignored\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (tmp.uval)
|
|
||||||
info->groupInfo = XkbClampIntoRange;
|
|
||||||
else
|
|
||||||
info->groupInfo = XkbWrapIntoRange;
|
|
||||||
ret = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ((elem.str == NULL)
|
else if ((elem.str == NULL)
|
||||||
&& ((strcasecmp(field.str, "groupsredirect") == 0) ||
|
&& ((strcasecmp(field.str, "groupsredirect") == 0) ||
|
||||||
(strcasecmp(field.str, "redirectgroups") == 0)))
|
(strcasecmp(field.str, "redirectgroups") == 0)))
|
||||||
{
|
{
|
||||||
if (!ExprResolveGroup(keymap->ctx, stmt->value, &tmp))
|
ERROR("Global \"groupsredirect\" not supported\n");
|
||||||
{
|
ACTION("Ignored\n");
|
||||||
ERROR("Illegal group index for global groupsRedirect\n");
|
ret = true;
|
||||||
ACTION("Definition with non-integer group ignored\n");
|
|
||||||
ret = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
info->groupInfo = XkbSetGroupInfo(0, XkbRedirectIntoRange,
|
|
||||||
tmp.uval);
|
|
||||||
ret = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ((elem.str == NULL) && (strcasecmp(field.str, "allownone") == 0))
|
else if ((elem.str == NULL) && (strcasecmp(field.str, "allownone") == 0))
|
||||||
{
|
{
|
||||||
ERROR("Radio groups not supported\n");
|
ERROR("Radio groups not supported\n");
|
||||||
ACTION("Ignoring \"allow none\" specification\n");
|
ACTION("Ignoring \"allownone\" specification\n");
|
||||||
ret = false;
|
ret = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ret = SetActionField(keymap, elem.str, field.str, arrayNdx,
|
ret = SetActionField(keymap, elem.str, field.str, arrayNdx,
|
||||||
|
|
Loading…
Reference in New Issue