diff --git a/ChangeLog b/ChangeLog index 2bae28ec9..142834916 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,13 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.4.0-rc1, 2013-01-04 +v0.4.0-rc1, 2013-01-05 Version 0.4.0 (under dev!) -------------------------- +* core: fix refresh of bars when applying layout (bug #37944, bug #37952) * core: add buffer pointer in arguments for signals "input_search", "input_text_changed" and "input_text_cursor_moved" * core: fix scroll to bottom of window (default key: alt+end) when line diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index 822f17013..0816b54e9 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -270,6 +270,13 @@ gui_main_refreshs () } } + /* refresh window if needed (if asked during refresh of bars) */ + if (gui_window_refresh_needed) + { + gui_window_refresh_screen ((gui_window_refresh_needed > 1) ? 1 : 0); + gui_window_refresh_needed = 0; + } + /* refresh windows if needed */ for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) { diff --git a/src/gui/gui-bar-window.c b/src/gui/gui-bar-window.c index c8a2e51e0..712b8f41b 100644 --- a/src/gui/gui-bar-window.c +++ b/src/gui/gui-bar-window.c @@ -1139,7 +1139,7 @@ gui_bar_window_get_max_size_in_window (struct t_gui_bar_window *bar_window, } } - return max_size; + return (max_size >= 1) ? max_size : -1; } /* @@ -1166,7 +1166,7 @@ gui_bar_window_get_max_size (struct t_gui_bar_window *bar_window, { max_size = gui_bar_window_get_max_size_in_window (bar_window, ptr_window); - if (max_size < max_size_found) + if ((max_size >= 0) && (max_size < max_size_found)) max_size_found = max_size; } if (max_size_found == INT_MAX) @@ -1203,7 +1203,7 @@ gui_bar_window_set_current_size (struct t_gui_bar_window *bar_window, if (bar_window->current_size != new_size) { max_size = gui_bar_window_get_max_size (bar_window, window); - new_size = (max_size < new_size) ? max_size : new_size; + new_size = ((max_size >= 0) && (max_size < new_size)) ? max_size : new_size; if (bar_window->current_size != new_size) { bar_window->current_size = new_size;