summaryrefslogtreecommitdiff
path: root/xkb/xkbUtils.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-11-27 13:35:42 +1100
committerDaniel Stone <daniel@fooishbar.org>2009-01-20 15:32:18 +1100
commit2762cafc321166ac48f80146720709b1011e6894 (patch)
tree6e6a9a742c42f46de4058027e77c8a1693d42246 /xkb/xkbUtils.c
parent07c3bb922b8c1ae8fe28198f6c451430b836f21e (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/xkbUtils.c')
-rw-r--r--xkb/xkbUtils.c31
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;
}
}