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>
This commit is contained in:
parent
e6f8a2932a
commit
55afda8a73
@ -75,6 +75,9 @@ void exit_calcurse(int status)
|
|||||||
{
|
{
|
||||||
int was_interactive;
|
int was_interactive;
|
||||||
|
|
||||||
|
ui_calendar_stop_date_thread();
|
||||||
|
io_stop_psave_thread();
|
||||||
|
|
||||||
if (ui_mode == UI_CURSES) {
|
if (ui_mode == UI_CURSES) {
|
||||||
notify_stop_main_thread();
|
notify_stop_main_thread();
|
||||||
clear();
|
clear();
|
||||||
@ -86,11 +89,10 @@ void exit_calcurse(int status)
|
|||||||
was_interactive = 0;
|
was_interactive = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_calendar_stop_date_thread();
|
|
||||||
io_stop_psave_thread();
|
|
||||||
free_user_data();
|
free_user_data();
|
||||||
keys_free();
|
keys_free();
|
||||||
mem_stats();
|
mem_stats();
|
||||||
|
|
||||||
if (was_interactive) {
|
if (was_interactive) {
|
||||||
if (unlink(path_cpid) != 0)
|
if (unlink(path_cpid) != 0)
|
||||||
EXIT(_("Could not remove calcurse lock file: %s\n"),
|
EXIT(_("Could not remove calcurse lock file: %s\n"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user