aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/XKBMAlloc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-04 09:21:39 +0200
committermarha <marha@users.sourceforge.net>2012-06-04 09:21:39 +0200
commit1af6fc1b5d93e54d6674de8b5870448b29f139a7 (patch)
tree83c0d1097657f08544c154d5ba6c820c1fb67e78 /xorg-server/xkb/XKBMAlloc.c
parente4580373a81894c451e5933b24906a075828b77e (diff)
downloadvcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.tar.gz
vcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.tar.bz2
vcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.zip
fontconfig libX11 libXft mesa pixman xserver xkeyboard-config git update 4
May 2012
Diffstat (limited to 'xorg-server/xkb/XKBMAlloc.c')
-rw-r--r--xorg-server/xkb/XKBMAlloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xorg-server/xkb/XKBMAlloc.c b/xorg-server/xkb/XKBMAlloc.c
index 645e90544..3ffd5dad1 100644
--- a/xorg-server/xkb/XKBMAlloc.c
+++ b/xorg-server/xkb/XKBMAlloc.c
@@ -375,8 +375,10 @@ XkbResizeKeyType(XkbDescPtr xkb,
nResize = 0;
for (nTotal = 1, i = xkb->min_key_code; i <= xkb->max_key_code; i++) {
width = XkbKeyGroupsWidth(xkb, i);
- if (width < type->num_levels)
+ if (width < type->num_levels || width >= new_num_lvls) {
+ nTotal += XkbKeyNumSyms(xkb,i);
continue;
+ }
for (match = 0, g = XkbKeyNumGroups(xkb, i) - 1;
(g >= 0) && (!match); g--) {
if (XkbKeyKeyTypeIndex(xkb, i, g) == type_ndx) {
@@ -384,7 +386,7 @@ XkbResizeKeyType(XkbDescPtr xkb,
match = 1;
}
}
- if ((!match) || (width >= new_num_lvls))
+ if (!match)
nTotal += XkbKeyNumSyms(xkb, i);
else {
nTotal += XkbKeyNumGroups(xkb, i) * new_num_lvls;