@@ 380,7 380,7 @@ show(int sigint) {
}
void
-handle_input(FILE *fd, struct key *sugg) {
+handle_input(FILE *fd, struct key *sugg, struct kbd *kb) {
char *line;
line = malloc(1024);
@@ 405,6 405,8 @@ handle_input(FILE *fd, struct key *sugg) {
key++;
free(key->label);
key->label = NULL;
+ kbd_init_suggs(sugg, kb->w, kb->h);
+ kbd_draw_layout(kb);
}
free(line);
@@ 524,7 526,7 @@ main(int argc, char **argv) {
while (run_display) {
while(layer_surface && poll(fds, 2, -1) != -1) {
if (fds[0].revents & POLLIN) {
- handle_input(stdin, keyboard.suggs);
+ handle_input(stdin, keyboard.suggs, &keyboard);
}
if (wl_display_dispatch(display) == -1) {
break;