diff --git a/src/profanity.c b/src/profanity.c index cc95875a..102d5160 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -313,6 +313,7 @@ _init(const int disable_tls, char *log_level) static void _shutdown(void) { + ui_clear_win_title(); ui_close_all_wins(); jabber_disconnect(); jabber_shutdown(); diff --git a/src/ui/core.c b/src/ui/core.c index c926d633..8ee83b90 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1497,6 +1497,12 @@ _ui_chat_win_contact_offline(PContact contact, char *resource, char *status) free(display_str); } +static void +_ui_clear_win_title(void) +{ + printf("\033]0;\007"); +} + static void _ui_draw_win_title(void) { @@ -1777,4 +1783,5 @@ ui_init_module(void) ui_handle_recipient_error = _ui_handle_recipient_error; ui_handle_error = _ui_handle_error; ui_current_update_virtual = _ui_current_update_virtual; + ui_clear_win_title = _ui_clear_win_title; } diff --git a/src/ui/ui.h b/src/ui/ui.h index 874ccee2..1dd6b160 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -132,6 +132,7 @@ void (*ui_chat_win_contact_offline)(PContact contact, char *resource, char *stat void (*ui_handle_recipient_not_found)(const char * const recipient, const char * const err_msg); void (*ui_handle_recipient_error)(const char * const recipient, const char * const err_msg); void (*ui_handle_error)(const char * const err_msg); +void (*ui_clear_win_title)(void); // contact status functions void (*ui_status_room)(const char * const contact);