Make the input windows update immediately instead of needing a refresh.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/main.c b/main.c
index 0c65bb3..abad2b4 100644
--- a/main.c
+++ b/main.c
@@ -1444,6 +1444,7 @@ static void display_pools(void)
char input;
opt_loginput = true;
+ immedok(logwin, true);
updated:
clear_logwin();
pthread_mutex_lock(&curses_lock);
@@ -1466,7 +1467,6 @@ retry:
wprintw(logwin, "[A]dd pool [R]emove pool [D]isable pool [E]nable pool\n");
wprintw(logwin, "[C]hange management strategy [S]witch pool [I]nformation\n");
wprintw(logwin, "Or press any other key to continue\n");
- wrefresh(logwin);
pthread_mutex_unlock(&curses_lock);
input = getch();
@@ -1541,6 +1541,7 @@ retry:
}
clear_logwin();
+ immedok(logwin, false);
opt_loginput = false;
}
@@ -1549,9 +1550,9 @@ static void display_options(void)
char input;
opt_loginput = true;
+ immedok(logwin, true);
wprintw(logwin, "\nToggle: [D]ebug [N]ormal [S]ilent [V]erbose [R]PC debug [C]lear\n");
wprintw(logwin, "Select an option or any other key to return\n");
- wrefresh(logwin);
input = getch();
if (!strncasecmp(&input, "s", 1)) {
opt_quiet ^= true;
@@ -1575,7 +1576,7 @@ static void display_options(void)
applog(LOG_WARNING, "RPC protocol debugging %s", opt_protocol ? "enabled" : "disabled");
} else if (!strncasecmp(&input, "c", 1))
clear_logwin();
- wrefresh(logwin);
+ immedok(logwin, false);
opt_loginput = false;
}