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?'.
This commit is contained in:
parent
4ae7745a0d
commit
ad355fecee
11
xkb/xkb.c
11
xkb/xkb.c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user