1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 00:03:12 +02:00

core: send signal "signal_sigwinch" after refreshs (issue #902)

Sending the signal after the refreshs will let scripts receive the good
size for windows/bars/terminal, ie the size computed with the new
terminal size.
This commit is contained in:
Sébastien Helleu
2017-02-22 07:40:55 +01:00
parent e6d5d791cd
commit f4c2328abf
2 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -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::
+12 -3
View File
@@ -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 */