From b15c56c8fe05ea6d1f101ad744d88b76db2b6b46 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 25 Dec 2001 09:08:58 +0000 Subject: [w3m-dev 02719] From: Fumitoshi UKAI --- main.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 0cc19c4..3925260 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.43 2001/12/23 16:30:10 ukai Exp $ */ +/* $Id: main.c,v 1.44 2001/12/25 09:08:58 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -45,6 +45,10 @@ static Event alarm_event; static MySignalHandler SigAlarm(SIGNAL_ARG); #endif +#ifdef SIGWINCH +static int resized = 0; +#endif + #ifdef USE_MARK static char *MarkString = NULL; #endif @@ -896,9 +900,7 @@ MAIN(int argc, char **argv, char **envp) setlinescols(); setupscreen(); #endif /* not SIGWINCH */ -#ifdef SIGCHLD - signal(SIGCHLD, sig_chld); -#endif + Currentbuf = Firstbuf; displayBuffer(Currentbuf, B_NORMAL); if (line_str) { @@ -937,6 +939,15 @@ MAIN(int argc, char **argv, char **envp) signal(SIGALRM, SigAlarm); alarm(alarm_sec); } +#endif +#ifdef SIGWINCH + if (resized) { + resized = 0; + setlinescols(); + setupscreen(); + if (Currentbuf) + displayBuffer(Currentbuf, B_FORCE_REDRAW); + } #endif c = getch(); #ifdef USE_ALARM @@ -1166,10 +1177,7 @@ intTrap(SIGNAL_ARG) MySignalHandler resize_hook(SIGNAL_ARG) { - setlinescols(); - setupscreen(); - if (Currentbuf) - displayBuffer(Currentbuf, B_FORCE_REDRAW); + resized = 1; signal(SIGWINCH, resize_hook); SIGNAL_RETURN; } -- cgit v1.2.3