summaryrefslogtreecommitdiff
path: root/xkb/xkbUtils.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-12-30 12:17:14 +1100
committerDaniel Stone <daniel@fooishbar.org>2008-12-30 12:17:14 +1100
commit48dbaf173a82693fd72953983da9fc556cd1c6ed (patch)
tree677e86dc2bf170409d55406c672b1e354c0e80c9 /xkb/xkbUtils.c
parentcf85a32b5f80694f3c2f434e91cf77edb33a7c17 (diff)
XKB: Also copy keyboard feedback when copying the keymap
When updating the XKB keymap, make sure the keyboard feedback is also copied, to preserve autorepeat settings etc. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'xkb/xkbUtils.c')
-rw-r--r--xkb/xkbUtils.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 7c39bcc93..aeb9892ba 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -2123,6 +2123,12 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
DeviceIntPtr pDev = NULL, tmpDev = NULL;
xkbMapNotify mn;
xkbNewKeyboardNotify nkn;
+ XkbEventCauseRec cause;
+ XkbChangesRec changes;
+ unsigned int check = 0;
+
+ memset(&changes, 0, sizeof(changes));
+ memset(&cause, 0, sizeof(cause));
if (!src || !dst || src == dst)
return FALSE;
@@ -2205,9 +2211,18 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
mn.firstVModMapKey = src->min_key_code;
mn.nVModMapKeys = XkbNumKeys(src);
mn.virtualMods = ~0; /* ??? */
- mn.changed = XkbAllMapComponentsMask;
+ mn.changed = XkbAllMapComponentsMask;
XkbSendMapNotify(pDev, &mn);
}
+
+ XkbUpdateActions(pDev, dst->min_key_code,
+ XkbNumKeys(pDev->key->xkbInfo->desc), &changes,
+ &check, &cause);
+ if (check)
+ XkbCheckSecondaryEffects(pDev->key->xkbInfo, check, &changes,
+ &cause);
+ memcpy(pDev->kbdfeed->ctrl.autoRepeats, dst->ctrls->per_key_repeat,
+ XkbPerKeyBitArraySize);
}
}