xkb: fix a couple of device checks when looping through all devices.
Generally, we want to apply stuff to the device and to all attached slave devices.
This commit is contained in:
parent
d21a546e96
commit
c97c6c3de3
13
xkb/xkb.c
13
xkb/xkb.c
|
@ -604,8 +604,7 @@ ProcXkbLatchLockState(ClientPtr client)
|
||||||
status = Success;
|
status = Success;
|
||||||
|
|
||||||
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
|
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
|
||||||
if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) ||
|
if ((tmpd == dev) || (!tmpd->isMaster && tmpd->u.master == dev)) {
|
||||||
tmpd == dev) {
|
|
||||||
if (!tmpd->key->xkbInfo)
|
if (!tmpd->key->xkbInfo)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -744,10 +743,8 @@ ProcXkbSetControls(ClientPtr client)
|
||||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
|
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
|
||||||
CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
|
CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
|
||||||
|
|
||||||
for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) {
|
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
|
||||||
if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) ||
|
if ((tmpd == dev) || (!tmpd->isMaster && tmpd->u.master == dev)) {
|
||||||
tmpd == dev) {
|
|
||||||
|
|
||||||
xkbi = tmpd->key->xkbInfo;
|
xkbi = tmpd->key->xkbInfo;
|
||||||
ctrl = xkbi->desc->ctrls;
|
ctrl = xkbi->desc->ctrls;
|
||||||
new = *ctrl;
|
new = *ctrl;
|
||||||
|
@ -5834,9 +5831,7 @@ ProcXkbGetKbdByName(ClientPtr client)
|
||||||
xkb->ctrls->num_groups= nTG;
|
xkb->ctrls->num_groups= nTG;
|
||||||
|
|
||||||
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
|
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
|
||||||
if (tmpd == dev ||
|
if ((tmpd == dev) || (!tmpd->isMaster && tmpd->u.master == dev)) {
|
||||||
(dev->id == inputInfo.keyboard->id && tmpd->key &&
|
|
||||||
tmpd->coreEvents)) {
|
|
||||||
if (tmpd != dev)
|
if (tmpd != dev)
|
||||||
XkbCopyDeviceKeymap(tmpd, dev);
|
XkbCopyDeviceKeymap(tmpd, dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue