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:
+1
-1
@@ -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::
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user