1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 14:56:39 +02:00

core: delay the signal "signal_sigwinch" after WeeChat screen refresh

The signal is sent after WeeChat screen refresh, so all sizes for
windows, bars, ... are already adjusted to the new terminal size.
This commit is contained in:
Sebastien Helleu
2014-01-21 14:19:12 +01:00
parent 5d1568ecc2
commit 5c661a497f
+10 -2
View File
@@ -60,6 +60,7 @@
int gui_reload_config = 0;
int gui_signal_sigwinch_received = 0;
int gui_term_cols = 0;
int gui_term_lines = 0;
@@ -296,9 +297,9 @@ gui_main_signal_sighup ()
void
gui_main_signal_sigwinch ()
{
gui_window_ask_refresh (2);
gui_signal_sigwinch_received = 1;
hook_signal_send ("signal_sigwinch", WEECHAT_HOOK_SIGNAL_STRING, NULL);
gui_window_ask_refresh (2);
}
/*
@@ -478,6 +479,13 @@ gui_main_loop ()
if (gui_window_refresh_needed)
gui_main_refreshs ();
if (gui_signal_sigwinch_received)
{
hook_signal_send ("signal_sigwinch",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
gui_signal_sigwinch_received = 0;
}
gui_color_pairs_auto_reset_pending = 0;
/* wait for keyboard or network activity */