summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-15 21:59:06 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-15 21:59:06 +0300
commitad355fecee3965be576596aeed5da54d776edf1d (patch)
tree633df1ea6b7391a2a62c6b3a24fff20f11503ab9 /xkb
parent4ae7745a0dc86de6346409a69c1e396e0b954514 (diff)
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?'.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 880f113eb..ba8fc7fbc 100644
--- a/xkb/xkb.c
+++ b/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);