compat: ignore "allowExplicit" in indicator statements

Using !allowExplicit sets the XkbIM_NoExplicit flag of the indicator,
which means that an XKB client cannot change the state of the indicator
using e.g. XkbSetNamedIndicator().
We do not support changing the state of an indicator; furthermore doing
it is probably only useful in conjunction with led-drives-keyboard
behavior, which we also do not support. This is because setting an
indicator without led-drives-keyboard would make the indicator and the
modifier/group it's bound to to get out of sync.

We can re-add this if we need this info.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-08-30 18:56:24 +03:00
parent d573600da0
commit 6e676cb7d8
1 changed files with 3 additions and 21 deletions

View File

@ -155,7 +155,6 @@ enum led_field {
LED_FIELD_MODS = (1 << 0),
LED_FIELD_GROUPS = (1 << 1),
LED_FIELD_CTRLS = (1 << 2),
LED_FIELD_EXPLICIT = (1 << 3),
};
typedef struct _LEDInfo {
@ -526,12 +525,6 @@ AddIndicatorMap(CompatInfo *info, LEDInfo *new)
old->ctrls = new->ctrls;
old->defined |= LED_FIELD_CTRLS;
}
if (UseNewLEDField(LED_FIELD_EXPLICIT, old, new, verbosity,
&collide)) {
old->flags &= ~XkbIM_NoExplicit;
old->flags |= (new->flags & XkbIM_NoExplicit);
old->defined |= LED_FIELD_EXPLICIT;
}
if (collide) {
log_warn(info->keymap->ctx,
@ -786,20 +779,9 @@ SetIndicatorMapField(CompatInfo *info, LEDInfo *led,
led->defined |= LED_FIELD_CTRLS;
}
else if (istreq(field, "allowexplicit")) {
bool set;
if (arrayNdx)
return ReportIndicatorNotArray(info, led, field);
if (!ExprResolveBoolean(keymap->ctx, value, &set))
return ReportIndicatorBadType(info, led, field, "boolean");
if (set)
led->flags &= ~XkbIM_NoExplicit;
else
led->flags |= XkbIM_NoExplicit;
led->defined |= LED_FIELD_EXPLICIT;
log_dbg(info->keymap->ctx,
"The \"allowExplicit\" field in indicator statements is unsupported; "
"Ignored\n");
}
else if (istreq(field, "whichmodstate") ||
istreq(field, "whichmodifierstate")) {