diff options
author | Daniel Stone <daniel@fooishbar.org> | 2008-11-27 13:35:42 +1100 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2009-01-20 15:32:18 +1100 |
commit | 2762cafc321166ac48f80146720709b1011e6894 (patch) | |
tree | 6e6a9a742c42f46de4058027e77c8a1693d42246 /xkb | |
parent | 07c3bb922b8c1ae8fe28198f6c451430b836f21e (diff) |
XkbCopyKeymap: inputInfo.keyboard is not a special case
The device-walking code is still depressing, though.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbUtils.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index aeb9892ba..19be1cfb0 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -2148,26 +2148,19 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) if (!_XkbCopyGeom(src, dst)) return FALSE; - if (inputInfo.keyboard->key->xkbInfo && - inputInfo.keyboard->key->xkbInfo->desc == dst) { - pDev = inputInfo.keyboard; - } - else { - for (tmpDev = inputInfo.devices; tmpDev && !pDev; - tmpDev = tmpDev->next) { - if (tmpDev->key && tmpDev->key->xkbInfo && - tmpDev->key->xkbInfo->desc == dst) { - pDev = tmpDev; - break; - } + for (tmpDev = inputInfo.devices; tmpDev && !pDev; tmpDev = tmpDev->next) { + if (tmpDev->key && tmpDev->key->xkbInfo && + tmpDev->key->xkbInfo->desc == dst) { + pDev = tmpDev; + break; } - for (tmpDev = inputInfo.off_devices; tmpDev && !pDev; - tmpDev = tmpDev->next) { - if (tmpDev->key && tmpDev->key->xkbInfo && - tmpDev->key->xkbInfo->desc == dst) { - pDev = tmpDev; - break; - } + } + for (tmpDev = inputInfo.off_devices; tmpDev && !pDev; + tmpDev = tmpDev->next) { + if (tmpDev->key && tmpDev->key->xkbInfo && + tmpDev->key->xkbInfo->desc == dst) { + pDev = tmpDev; + break; } } |