summary refs log tree commit diff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 7ee6e0a..b05dd08 100644
--- a/main.c
+++ b/main.c
@@ -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;