Raise SIGWINCH in SIGHUP, so refresh is safe in ncurses. - catpoint - Catpoint simple presenting software. HTML git clone git://bitreich.org/catpoint/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/catpoint/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 59a8c7e4ae0d424319bccc0ffa6ffa8ae88d2ba6 DIR parent b87460e37befbca7423a4cdafa017a6422ce0041 HTML Author: Christoph Lohmann <20h@r-36.net> Date: Sun, 20 Dec 2020 16:34:20 +0100 Raise SIGWINCH in SIGHUP, so refresh is safe in ncurses. Diffstat: M catpoint.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- DIR diff --git a/catpoint.c b/catpoint.c @@ -60,11 +60,8 @@ reloadcurrentslide(int sig) { loadcurrentslide(slidefiles, currentslide); - if (sig == SIGHUP) { - clear(); - refresh(); - printw("%.*s", currentslidelen, currentslidep); - } + if (sig == SIGHUP) + raise(SIGWINCH); /* Redisplay slide. */ } void