imcontext: Be more lenient in parsing Compose
X11 allows keysyms to be specified in addition to strings. We only support the strings. In the past, we ignored everything after the string. Go back to doing that, but issue a warning that we've ignored the keysym.
This commit is contained in:
@ -84,7 +84,7 @@ parse_compose_value (GtkComposeData *compose_data,
|
|||||||
|
|
||||||
if (val[0] != '"')
|
if (val[0] != '"')
|
||||||
{
|
{
|
||||||
g_warning ("Need to double-quote the value: %s: %s", val, line);
|
g_warning ("Only strings supported after ':': %s: %s", val, line);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,10 +104,7 @@ parse_compose_value (GtkComposeData *compose_data,
|
|||||||
while (*p && g_ascii_isspace (*p))
|
while (*p && g_ascii_isspace (*p))
|
||||||
p++;
|
p++;
|
||||||
if (*p != '\0' && *p != '#')
|
if (*p != '\0' && *p != '#')
|
||||||
{
|
g_warning ("Ignoring keysym after string: %s: %s", val, line);
|
||||||
g_warning ("Garbage after closing '\"': %s: %s", val, line);
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (*p == '\\')
|
else if (*p == '\\')
|
||||||
|
|||||||
Reference in New Issue
Block a user