diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-11-29 11:34:00 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-11-29 11:34:00 +0100 |
commit | a91fd7264191ed32bbd6e12d250701ac0eb6a0b3 (patch) | |
tree | 74b8b3cfc8cb7a84b6bdd61227bfe59ef45a87ab /src | |
parent | db2df835da9893930a12a62b30e8893599ae540f (diff) | |
parent | 8ae75f3ca723d4d7e449c18f1704147b229ac66c (diff) | |
download | calcurse-a91fd7264191ed32bbd6e12d250701ac0eb6a0b3.tar.gz calcurse-a91fd7264191ed32bbd6e12d250701ac0eb6a0b3.zip |
Merge branch 'maint'
Diffstat (limited to 'src')
-rw-r--r-- | src/calcurse.h | 2 | ||||
-rw-r--r-- | src/sigs.c | 14 | ||||
-rw-r--r-- | src/wins.c | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index 0feefcc..093b9af 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -908,6 +908,8 @@ void recur_apoint_paste_item(struct recur_apoint *, long); /* sigs.c */ void sigs_init(void); unsigned sigs_set_hdlr(int, void (*)(int)); +void sigs_ignore(void); +void sigs_unignore(void); /* todo.c */ extern llist_t todolist; @@ -108,3 +108,17 @@ void sigs_init() || !sigs_set_hdlr(SIGINT, SIG_IGN)) exit_calcurse(1); } + +/* Ignore SIGWINCH and SIGTERM signals. */ +void sigs_ignore(void) +{ + sigs_set_hdlr(SIGWINCH, SIG_IGN); + sigs_set_hdlr(SIGTERM, SIG_IGN); +} + +/* No longer ignore SIGWINCH and SIGTERM signals. */ +void sigs_unignore(void) +{ + sigs_set_hdlr(SIGWINCH, generic_hdlr); + sigs_set_hdlr(SIGTERM, generic_hdlr); +} @@ -535,16 +535,20 @@ void wins_prepare_external(void) clear(); wins_refresh(); endwin(); + sigs_ignore(); } /* Restore windows when returning from an external command. */ void wins_unprepare_external(void) { + sigs_unignore(); reset_prog_mode(); clearok(curscr, TRUE); curs_set(0); ui_mode = UI_CURSES; wins_refresh(); + wins_reinit(); + wins_update(FLAG_ALL); if (notify_bar()) notify_start_main_thread(); } |