Skip to content

Commit

Permalink
Revert "xkb: if the keymap failed to compile, load the default keymap…
Browse files Browse the repository at this point in the history
… instead."

This reverts commit d349955.
  • Loading branch information
Alexander Kerner committed Apr 7, 2011
1 parent ffb3f00 commit d5c354f
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions xkb/ddxLoad.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,34 +512,13 @@ XkbDescPtr
XkbCompileKeymap(DeviceIntPtr dev, XkbRMLVOSet *rmlvo)
{
XkbDescPtr xkb;
unsigned int need;

if (!dev || !rmlvo) {
LogMessage(X_ERROR, "XKB: No device or RMLVO specified\n");
return NULL;
}

/* These are the components we really really need */
need = XkmSymbolsMask | XkmCompatMapMask | XkmTypesMask |
XkmKeyNamesMask | XkmVirtualModsMask;


xkb = XkbCompileKeymapForDevice(dev, rmlvo, need);

if (!xkb) {
XkbRMLVOSet dflts;

/* we didn't get what we really needed. And that will likely leave
* us with a keyboard that doesn't work. Use the defaults instead */
LogMessage(X_ERROR, "XKB: Failed to load keymap. Loading default "
"keymap instead.\n");

XkbGetRulesDflts(&dflts);

xkb = XkbCompileKeymapForDevice(dev, &dflts, 0);

XkbFreeRMLVOSet(&dflts, FALSE);
}
xkb = XkbCompileKeymapForDevice(dev, rmlvo, 0);

return xkb;
}

0 comments on commit d5c354f

Please sign in to comment.