Skip to content

Commit

Permalink
interactive-evdev: reduce the space allocated for keysyms
Browse files Browse the repository at this point in the history
In commit 8cca3a7 the buffer for the keysym
was extended to accommodate for up to XKB_COMPOSE_MAX_STRING_SIZE bytes. This
caused the printf to expand to the same width for the keysym alone, making the
output less useful. Drop this back down to the same width it was before.
  • Loading branch information
whot committed Feb 7, 2024
1 parent 8e26a8b commit 5b9c181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/tools-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ tools_print_keycode_state(char *prefix,
printf("keysyms [ ");
for (int i = 0; i < nsyms; i++) {
xkb_keysym_get_name(syms[i], s, sizeof(s));
printf("%-*s ", (int) sizeof(s), s);
printf("%-*s ", (int)MAX(strlen(s), XKB_KEYSYM_NAME_MAX_SIZE), s);
}
printf("] ");

Expand Down

0 comments on commit 5b9c181

Please sign in to comment.