--- a/wms/irssi.c Sat Apr 06 16:05:38 2019 +0200
+++ b/wms/irssi.c Sat Apr 06 16:13:46 2019 +0200
@@ -305,14 +305,27 @@
name = gnt_widget_get_name(widget);
if (name && strstr(name, "conversation-window")) {
gnt_widget_get_position(widget, &cx, &cy);
gnt_widget_get_size(widget, &cw, &ch);
find_window_position(irssi, widget, &hor, &vert);
get_xywh_for_frame(irssi, hor, vert, &x, &y, &w, &h);
+ * Refreshing the windows on terminal resize, without breaking the layout, depends + * currently on the order of the following calls: + * gnt_wm_move_window() emits the "window_moved" signal which will eventually get to + * refresh_node(), which asks sanitize_position() to give maximum space to a widget + * that extends out of screen, and this process may change the widget's position, + * which breaks the irssi layout. To prevent that we first resize the conversation + * widget to fit on the screen. + if (w != cw || h != ch) + gnt_wm_resize_window(GNT_WM(irssi), widget, w, h); gnt_wm_move_window(GNT_WM(irssi), widget, x, y);
- if (w != cw || h != ch)
- gnt_wm_resize_window(GNT_WM(irssi), widget, w, h);