diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2016-09-13 08:25:35 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2016-09-13 08:28:24 +0200 |
commit | 55afda8a7387ae670ead4cc07a250ac969723aa1 (patch) | |
tree | 813e48fcb64698ccee28c12698cd9c75201f6711 | |
parent | e6f8a2932a9d66e905f0cf2e6d02fc17e1caad06 (diff) | |
download | calcurse-55afda8a7387ae670ead4cc07a250ac969723aa1.tar.gz calcurse-55afda8a7387ae670ead4cc07a250ac969723aa1.zip |
Stop all threads before leaving curses mode
This prevents from notification bar artifacts being drawn after leaving
interactive mode.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r-- | src/utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c index 50f2507..14683fc 100644 --- a/src/utils.c +++ b/src/utils.c @@ -75,6 +75,9 @@ void exit_calcurse(int status) { int was_interactive; + ui_calendar_stop_date_thread(); + io_stop_psave_thread(); + if (ui_mode == UI_CURSES) { notify_stop_main_thread(); clear(); @@ -86,11 +89,10 @@ void exit_calcurse(int status) was_interactive = 0; } - ui_calendar_stop_date_thread(); - io_stop_psave_thread(); free_user_data(); keys_free(); mem_stats(); + if (was_interactive) { if (unlink(path_cpid) != 0) EXIT(_("Could not remove calcurse lock file: %s\n"), |