summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-03-13 16:17:20 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-03-16 13:29:07 +1000
commitc97c6c3de337f247406eaffd5845a847630ee6c1 (patch)
tree9ae712aa32e661d6ebe64b8c4ec8917a6c8c1a5e /xkb
parentd21a546e9604ce2d3c914900f6e6ff2df9f5ca8b (diff)
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.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 7e756d1ee..ba1a4f6fd 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -604,8 +604,7 @@ ProcXkbLatchLockState(ClientPtr client)
status = Success;
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
- if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) ||
- tmpd == dev) {
+ if ((tmpd == dev) || (!tmpd->isMaster && tmpd->u.master == dev)) {
if (!tmpd->key->xkbInfo)
continue;
@@ -744,10 +743,8 @@ ProcXkbSetControls(ClientPtr client)
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
- for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) {
- if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) ||
- tmpd == dev) {
-
+ for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
+ if ((tmpd == dev) || (!tmpd->isMaster && tmpd->u.master == dev)) {
xkbi = tmpd->key->xkbInfo;
ctrl = xkbi->desc->ctrls;
new = *ctrl;
@@ -5834,9 +5831,7 @@ ProcXkbGetKbdByName(ClientPtr client)
xkb->ctrls->num_groups= nTG;
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
- if (tmpd == dev ||
- (dev->id == inputInfo.keyboard->id && tmpd->key &&
- tmpd->coreEvents)) {
+ if ((tmpd == dev) || (!tmpd->isMaster && tmpd->u.master == dev)) {
if (tmpd != dev)
XkbCopyDeviceKeymap(tmpd, dev);