From e24ed49c7247d02653c96d70a819e03fe6895962 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 23 Oct 2012 10:05:16 +0200 Subject: [PATCH] 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 --- test/interactive.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.7.4