From: Daniel Stone Date: Thu, 16 Feb 2012 11:18:49 +0000 (+0000) Subject: Respect explicit minimum/maximum keycodes X-Git-Tag: accepted/2.0alpha-wayland/20121109.204519~299 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbb82199eefe34ad8068303a396adc5c4861d87e;p=profile%2Fivi%2Flibxkbcommon.git Respect explicit minimum/maximum keycodes Make sure we carry over an explicit minimum/maximum keycode setting, rather than just using the computed minimum/maximum; this got broken while changing the keycode range to be unsigned. Signed-off-by: Daniel Stone Reported-by: Pekka Paalanen --- diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c index 40fe60a..e8d3d35 100644 --- a/src/xkbcomp/keycodes.c +++ b/src/xkbcomp/keycodes.c @@ -531,13 +531,13 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from, into->errorCount++; if (from->explicitMin != 0) { - if ((into->explicitMin < 0) + if ((into->explicitMin == 0) || (into->explicitMin > from->explicitMin)) into->explicitMin = from->explicitMin; } if (from->explicitMax > 0) { - if ((into->explicitMax < 0) + if ((into->explicitMax == 0) || (into->explicitMax < from->explicitMax)) into->explicitMax = from->explicitMax; }