summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-04-16 19:15:30 +0300
committerDaniel Stone <daniel@fooishbar.org>2009-01-22 15:08:55 +1100
commitf062e90a95f9b7ae5458ef2100615e8ace9b66a7 (patch)
tree3a75bce36e2a95e085a268186c8a268bddd9bccf /xkb
parentcf6a2fc2bd94b392cfea120444d5e032d26f1d37 (diff)
Input: Remove modifierKeyMap
Since modifierKeyMap is generated from modifierMap, just remove it, and only generate it when we need to send the modifier map to the client. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbUtils.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index c7a6d99d0..8960bca12 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -438,36 +438,7 @@ int maxNumberOfGroups;
if (nGroups > maxNumberOfGroups)
maxNumberOfGroups = nGroups;
}
- if (_XkbCoreKeycodeInRange(keyc,key)) {
- if (keyc->modifierMap[key]!=0) {
- register unsigned bit,i,mask;
- mask= keyc->modifierMap[key];
- for (i=0,bit=1;i<XkbNumModifiers;i++,bit<<=1) {
- if (mask&bit) {
- keysPerMod[i]++;
- if (keysPerMod[i]>maxKeysPerMod)
- maxKeysPerMod= keysPerMod[i];
- }
- }
- }
- }
- }
-
- if (maxKeysPerMod>0) {
- tmp= maxKeysPerMod*XkbNumModifiers;
- if (keyc->modifierKeyMap==NULL)
- keyc->modifierKeyMap= (KeyCode *)_XkbCalloc(1, tmp);
- else if (keyc->maxKeysPerModifier<maxKeysPerMod)
- keyc->modifierKeyMap= (KeyCode *)_XkbRealloc(keyc->modifierKeyMap,tmp);
- if (keyc->modifierKeyMap==NULL)
- FatalError("Couldn't allocate modifierKeyMap in UpdateCore\n");
- bzero(keyc->modifierKeyMap,tmp);
}
- else if ((keyc->maxKeysPerModifier>0)&&(keyc->modifierKeyMap!=NULL)) {
- _XkbFree(keyc->modifierKeyMap);
- keyc->modifierKeyMap= NULL;
- }
- keyc->maxKeysPerModifier= maxKeysPerMod;
if (maxSymsPerKey>0) {
/* See Section 12.4 of the XKB Protocol spec. Because of the
@@ -489,7 +460,6 @@ int maxNumberOfGroups;
}
keyc->curKeySyms.mapWidth= maxSymsPerKey;
- bzero(keysPerMod,sizeof(keysPerMod));
for (key=firstCommon;key<=lastCommon;key++) {
if (keyc->curKeySyms.map!=NULL) {
KeySym *pCore,*pXKB;
@@ -568,17 +538,6 @@ int maxNumberOfGroups;
pXKB+= XkbKeyGroupsWidth(xkb,key);
}
}
- if (keyc->modifierMap[key]!=0) {
- register unsigned bit,i,mask;
- mask= keyc->modifierMap[key];
- for (i=0,bit=1;i<XkbNumModifiers;i++,bit<<=1) {
- if (mask&bit) {
- tmp= i*maxKeysPerMod+keysPerMod[i];
- keyc->modifierKeyMap[tmp]= key;
- keysPerMod[i]++;
- }
- }
- }
}
return;
}