diff options
-rw-r--r-- | testing/toxic/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/toxic/main.c b/testing/toxic/main.c index d1a4be5d..aa025a1a 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
9 | #include <stdbool.h> | 9 | #include <stdbool.h> |
10 | #include <stdint.h> | 10 | #include <stdint.h> |
11 | #include <signal.h> | ||
11 | 12 | ||
12 | #ifdef _win32 | 13 | #ifdef _win32 |
13 | #include <direct.h> | 14 | #include <direct.h> |
@@ -25,9 +26,17 @@ | |||
25 | #include "friendlist.h" | 26 | #include "friendlist.h" |
26 | 27 | ||
27 | 28 | ||
29 | void on_window_resize(int sig) | ||
30 | { | ||
31 | endwin(); | ||
32 | refresh(); | ||
33 | clear(); | ||
34 | } | ||
35 | |||
28 | static void init_term() | 36 | static void init_term() |
29 | { | 37 | { |
30 | /* Setup terminal */ | 38 | /* Setup terminal */ |
39 | signal(SIGWINCH, on_window_resize); | ||
31 | initscr(); | 40 | initscr(); |
32 | cbreak(); | 41 | cbreak(); |
33 | keypad(stdscr, 1); | 42 | keypad(stdscr, 1); |