diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-25 09:08:58 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-25 09:08:58 +0000 |
commit | b15c56c8fe05ea6d1f101ad744d88b76db2b6b46 (patch) | |
tree | 3df65a835e687b15c5531cfc142ea093af43627a /main.c | |
parent | [w3m-dev 02702] fix problem with emacs-w3m in [w3m-dev 02699] (diff) | |
download | w3m-b15c56c8fe05ea6d1f101ad744d88b76db2b6b46.tar.gz w3m-b15c56c8fe05ea6d1f101ad744d88b76db2b6b46.zip |
[w3m-dev 02719]
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to '')
-rw-r--r-- | main.c | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -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 <signal.h> @@ -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) { @@ -938,6 +940,15 @@ MAIN(int argc, char **argv, char **envp) 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 if (alarm_sec > 0) { @@ -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; } |