From 6e676cb7d89f0c3a7e133c6b007264cd381d74cc Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Thu, 30 Aug 2012 18:56:24 +0300 Subject: [PATCH] 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 --- src/xkbcomp/compat.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c index c5da7df..b18537b 100644 --- a/src/xkbcomp/compat.c +++ b/src/xkbcomp/compat.c @@ -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")) { -- 2.7.4