Commit 4e6e7fdcef8b3c9af118a5c011c1fbe79d505bf4

Stefan Sperling 2018-10-22T22:23:20

make tog read input from stdscr; avoids races when resizing

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tog/tog.c b/tog/tog.c
index 00b4e68..0e1562e 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -487,7 +487,7 @@ view_input(struct tog_view **new, struct tog_view **dead,
 	errcode = pthread_mutex_unlock(&tog_mutex);
 	if (errcode)
 		return got_error_set_errno(errcode);
-	ch = wgetch(view->window);
+	ch = getch();
 	errcode = pthread_mutex_lock(&tog_mutex);
 	if (errcode)
 		return got_error_set_errno(errcode);