diff options
-rw-r--r-- | ChangeLog.adoc | 2 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-main.c | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index e49dc1a97..d146a96b7 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -31,7 +31,7 @@ Improvements:: Bug fixes:: - * core: fix delayed refresh when the signal SIGWINCH is received (terminal resized) (issue #902) + * core: fix delayed refresh when the signal SIGWINCH is received (terminal resized), send signal "signal_sigwinch" after refreshs (issue #902) * irc: fix parsing of message 324 (modes) when there is a colon before the modes (issue #913) Build:: diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index 9d03da860..20b203856 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -427,6 +427,9 @@ void gui_main_loop () { struct t_hook *hook_fd_keyboard; + int send_signal_sigwinch; + + send_signal_sigwinch = 0; /* catch SIGWINCH signal: redraw screen */ util_catch_signal (SIGWINCH, &gui_main_signal_sigwinch); @@ -453,16 +456,22 @@ gui_main_loop () if (gui_signal_sigwinch_received) { - (void) hook_signal_send ("signal_sigwinch", - WEECHAT_HOOK_SIGNAL_STRING, NULL); - gui_signal_sigwinch_received = 0; gui_window_ask_refresh (2); + gui_signal_sigwinch_received = 0; + send_signal_sigwinch = 1; } gui_main_refreshs (); if (gui_window_refresh_needed && !gui_window_bare_display) gui_main_refreshs (); + if (send_signal_sigwinch) + { + (void) hook_signal_send ("signal_sigwinch", + WEECHAT_HOOK_SIGNAL_STRING, NULL); + send_signal_sigwinch = 0; + } + gui_color_pairs_auto_reset_pending = 0; /* execute fd hooks */ |