diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-10-18 19:20:11 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-10-18 19:20:11 +0200 |
commit | 6523ca598db5e169af11c094579e8c2fc68a0028 (patch) | |
tree | 7d57e63eb52dc1be8b74a2a794e8ea60c96a6ce5 | |
parent | 9ab9dd54247fba00f1d7644ff7ee82ef59bf8157 (diff) |
switched back to sleep() for busy windows to assure a minimum wait
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | src/ui_nask.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui_nask.c b/src/ui_nask.c index af3ac73..11f9123 100644 --- a/src/ui_nask.c +++ b/src/ui_nask.c @@ -170,10 +170,13 @@ passwd_input_cb(WINDOW *wnd, void *data, int key) ui_ipc_msgrecv(MQ_IF, ipc_buf, 3); show_info_wnd(busywnd, "BUSY", ipc_buf, COLOR_PAIR(5), COLOR_PAIR(5), true, false); + sleep(3); - if (ui_ipc_msgrecv(MQ_IF, ipc_buf, 10) > 0) { - show_info_wnd(errwnd, "ERROR", ipc_buf, COLOR_PAIR(4), COLOR_PAIR(4), true, true); - while (ui_wgetchtest(1500, '\n') != DOUI_KEY) { }; + if (ui_ipc_getvalue(SEM_UI) > 0 && + ui_ipc_msgrecv(MQ_IF, ipc_buf, 3) > 0) + { + show_info_wnd(errwnd, "ERROR", ipc_buf, COLOR_PAIR(4), COLOR_PAIR(4), true, true); + while (ui_wgetchtest(1500, '\n') != DOUI_KEY) { }; } ui_thrd_suspend(); |