~earboxer/suggpicker

6a432662606ed66055aafc938d6d62241a1f4876 — Zach DeCook 2 years ago 1da3d9e
input: redraw after layout change
1 files changed, 4 insertions(+), 2 deletions(-)

M main.c
M main.c => main.c +4 -2
@@ 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;