tRaise SIGWINCH in SIGHUP, so refresh is safe in ncurses. - catpoint - Catpoint simple presenting software.
(HTM) git clone git://r-36.net/catpoint
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 59a8c7e4ae0d424319bccc0ffa6ffa8ae88d2ba6
(DIR) parent b87460e37befbca7423a4cdafa017a6422ce0041
(HTM) 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:
catpoint.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/catpoint.c b/catpoint.c
t@@ -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