Ignore signals during command execution
Disable signal handlers in wins_prepare_external() and reactivate them in wins_unprepare_external(). Before, it was possible that resizing the window during editor/pager mode resulted in the calcurse main screen appearing on top. Addresses BUG#9. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -591,16 +591,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user