diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-10-15 21:59:06 +0300 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-10-15 21:59:06 +0300 |
commit | ad355fecee3965be576596aeed5da54d776edf1d (patch) | |
tree | 633df1ea6b7391a2a62c6b3a24fff20f11503ab9 /xkb | |
parent | 4ae7745a0dc86de6346409a69c1e396e0b954514 (diff) |
xkb: make sure we set the map on the right device, not necessarily core
Forgot that all XKB requests took a device spec: the comparison of
'if working on the core keyboard, does this device send core events; or,
is this device the core keyboard?' was broken. Instead, what we want is
'if working on the core keyboard, does this device send core events; or,
is this device the one we're working on?'.
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkb.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -555,7 +555,7 @@ ProcXkbLatchLockState(ClientPtr client) for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) || - tmpd == inputInfo.keyboard) { + tmpd == dev) { if (!tmpd->key->xkbInfo) continue; @@ -697,7 +697,7 @@ ProcXkbSetControls(ClientPtr client) for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) { if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) || - tmpd == inputInfo.keyboard) { + tmpd == dev) { xkbi = tmpd->key->xkbInfo; ctrl = xkbi->desc->ctrls; @@ -5441,12 +5441,13 @@ ProcXkbGetKbdByName(ClientPtr client) xkb->ctrls->num_groups= nTG; for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { - if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) || - tmpd == inputInfo.keyboard) { + if (tmpd == dev || + (dev->id == inputInfo.keyboard->id && tmpd->key && + tmpd->coreEvents)) { memcpy(tmpd->key->modifierMap, xkb->map->modmap, xkb->max_key_code + 1); - if (dev != inputInfo.keyboard) + if (tmpd != dev) XkbCopyKeymap(dev->key->xkbInfo->desc, tmpd->key->xkbInfo->desc, True); XkbUpdateCoreDescription(tmpd, True); |