xkbcomp: Generating components requires rules _and_ layout
This came from trial and error, but it seems that you can generate a valid keymap with only rules and layout.master
parent
fa96602d0f
commit
8269cbce81
|
@ -40,6 +40,8 @@ authorization from the authors.
|
||||||
unsigned int debugFlags = 0;
|
unsigned int debugFlags = 0;
|
||||||
unsigned int warningLevel = 0;
|
unsigned int warningLevel = 0;
|
||||||
|
|
||||||
|
#define ISEMPTY(str) (!(str) || (strlen(str) == 0))
|
||||||
|
|
||||||
static int
|
static int
|
||||||
XkbFileFromComponents(const XkbComponentNamesPtr ktcsg, XkbFile **file)
|
XkbFileFromComponents(const XkbComponentNamesPtr ktcsg, XkbFile **file)
|
||||||
{
|
{
|
||||||
|
@ -112,8 +114,8 @@ XkbcCompileKeymapFromRules(const char *rules, XkbRF_VarDefsPtr defs)
|
||||||
XkbComponentNamesPtr names;
|
XkbComponentNamesPtr names;
|
||||||
XkbcDescPtr xkb;
|
XkbcDescPtr xkb;
|
||||||
|
|
||||||
if (!rules || strlen(rules) == 0) {
|
if (ISEMPTY(rules) || ISEMPTY(defs->layout)) {
|
||||||
ERROR("no rules supplied for generating XKB keymap\n");
|
ERROR("rules and layout required to generate XKB keymap\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue