From 82bfe334f61253461d24981c728b2c63b5d9e70a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 9 Oct 2008 16:23:24 +1030 Subject: [PATCH] Xi: don't memcpy the KeyClassRec from SD to MD. Most of its component get copied during CopyKeyClass anyway. The ones that aren't: postdown - never changed for virtual devices anyway. down - shouldn't change that without sending events. memcpy'ing the struct also copied mapWidth, which means we didn't realloc during SetKeySymsMap lateron, overwriting the memory assigned to us. --- Xi/exevents.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 6f65279..155cb9b 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -527,8 +527,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) oldXkbInfo = to->key->xkbInfo; #endif - memcpy(to->key, from->key, sizeof(KeyClassRec)); - if (!oldMap) /* newly created key struct */ { int bytes = (to->key->curKeySyms.maxKeyCode - -- 1.5.4.3