From 4808bdec45775342eb9a6352b41e4919e1a69279 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. #16167 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. X.Org Bug 16167 --- Xi/exevents.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 6f652794f..155cb9b52 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 -