Commit e24ed49c7247d02653c96d70a819e03fe6895962

Ran Benita 2012-10-23T10:05:16

test/interactive: use num_layouts_for_key() This is the more appropriate for a specific key (also considering the num_layouts() is a bit of a made-up value). Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/test/interactive.c b/test/interactive.c
index 90b1df2..94b14a7 100644
--- a/test/interactive.c
+++ b/test/interactive.c
@@ -255,8 +255,9 @@ print_keycode(struct keyboard *kbd, xkb_keycode_t keycode)
     printf("] ");
 #endif
 
-    printf("groups [ ");
-    for (group = 0; group < xkb_keymap_num_layouts(keymap); group++) {
+    printf("group [ ");
+    for (group = 0; group < xkb_keymap_num_layouts_for_key(keymap, keycode);
+         group++) {
         if (xkb_state_layout_index_is_active(state, group,
                                              XKB_STATE_LAYOUT_EFFECTIVE) <= 0)
             continue;