XKB: Fix initial map setting on startup
Due to an unwitting sense inversion when eliminating XkbFileInfo, we were
setting the complete wrong keymap on startup (non-XKB map if we had an XKB
map available, or the XKB map if we didn't have any available). Invert the
sense properly, and add two small bits that also went missing in that commit.
(cherry picked from commit 0bd0f90d7c
)
This commit is contained in:
parent
5d2946655b
commit
1bda57a41e
|
@ -375,7 +375,8 @@ Atom unknown;
|
|||
names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch");
|
||||
}
|
||||
|
||||
if (!(xkb->defined & XkmIndicatorsMask)) {
|
||||
if (!(xkb->defined & XkmIndicatorsMask) ||
|
||||
!(xkb->defined & XkmGeometryMask)) {
|
||||
initIndicatorNames(NULL,xkb);
|
||||
if (names->indicators[LED_CAPS-1]==None)
|
||||
names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock");
|
||||
|
@ -531,10 +532,10 @@ XkbEventCauseRec cause;
|
|||
XkbDDXInitDevice(pXDev);
|
||||
|
||||
if (xkb->defined & XkmSymbolsMask)
|
||||
XkbUpdateCoreDescription(pXDev, True);
|
||||
else
|
||||
XkbUpdateKeyTypesFromCore(pXDev, xkb->min_key_code,
|
||||
XkbNumKeys(xkb), &changes);
|
||||
else
|
||||
XkbUpdateCoreDescription(pXDev, True);
|
||||
|
||||
XkbSetCauseUnknown(&cause);
|
||||
XkbUpdateActions(pXDev,xkb->min_key_code, XkbNumKeys(xkb),&changes,
|
||||
|
|
|
@ -184,9 +184,27 @@ unsigned wantNames,wantConfig,wantDflts;
|
|||
if (want==0)
|
||||
return False;
|
||||
|
||||
if (xkb!=NULL)
|
||||
old_names= xkb->names;
|
||||
else old_names= NULL;
|
||||
if (xkb) {
|
||||
old_names = xkb->names;
|
||||
|
||||
xkb->defined = 0;
|
||||
/* Wow would it ever be neat if we didn't need this noise. */
|
||||
if (xkb->names && xkb->names->keys)
|
||||
xkb->defined |= XkmKeyNamesMask;
|
||||
if (xkb->map && xkb->map->types)
|
||||
xkb->defined |= XkmTypesMask;
|
||||
if (xkb->compat)
|
||||
xkb->defined |= XkmCompatMapMask;
|
||||
if (xkb->map && xkb->map->num_syms)
|
||||
xkb->defined |= XkmSymbolsMask;
|
||||
if (xkb->indicators)
|
||||
xkb->defined |= XkmIndicatorsMask;
|
||||
if (xkb->geom)
|
||||
xkb->defined |= XkmGeometryMask;
|
||||
}
|
||||
else {
|
||||
old_names= NULL;
|
||||
}
|
||||
|
||||
wantConfig= want&(~complete);
|
||||
if (xkb!=NULL) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user