Commit fbb82199eefe34ad8068303a396adc5c4861d87e

Daniel Stone 2012-02-16T11:18:49

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 <daniel@fooishbar.org> Reported-by: Pekka Paalanen <ppaalanen@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
     }