mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-27 05:50:06 +01:00
Xi: copy the KeySyms.map over from the source.
This commit is contained in:
parent
3c4c9938f3
commit
fde3c83662
1 changed files with 9 additions and 0 deletions
|
|
@ -462,6 +462,15 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
|
|||
|
||||
memcpy(to->key, from->key, sizeof(KeyClassRec));
|
||||
|
||||
if (!oldMap) /* newly created key struct */
|
||||
{
|
||||
int bytes = (to->key->curKeySyms.maxKeyCode -
|
||||
to->key->curKeySyms.minKeyCode + 1) *
|
||||
to->key->curKeySyms.mapWidth;
|
||||
oldMap = (KeySym *)xcalloc(sizeof(KeySym), bytes);
|
||||
memcpy(oldMap, from->key->curKeySyms.map, bytes);
|
||||
}
|
||||
|
||||
to->key->modifierKeyMap = oldModKeyMap;
|
||||
to->key->curKeySyms.map = oldMap;
|
||||
#ifdef XKB
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue