if (!OptNoCurses)
{
int crc = start_curses();
-
if (crc != 0)
goto main_curses; // TEST08: can't test -- fake term?
/* check whether terminal status is supported (must follow curses init) */
TsSupported = mutt_ts_capability();
- mutt_window_reflow(NULL);
+ mutt_window_set_root(LINES, COLS);
}
/* set defaults and read init files */
return;
struct MuttWindow *w1 =
- mutt_window_new(MUTT_WIN_ORIENT_VERTICAL, MUTT_WIN_SIZE_MAXIMISE,
- MUTT_WIN_SIZE_UNLIMITED, MUTT_WIN_SIZE_UNLIMITED);
+ mutt_window_new(MUTT_WIN_ORIENT_VERTICAL, MUTT_WIN_SIZE_FIXED, 0, 0);
struct MuttWindow *w2 =
mutt_window_new(MUTT_WIN_ORIENT_VERTICAL, MUTT_WIN_SIZE_MAXIMISE,
MUTT_WIN_SIZE_UNLIMITED, MUTT_WIN_SIZE_UNLIMITED);
*/
void mutt_window_reflow_prep(void)
{
- RootWindow->state.cols = COLS; // From curses
- RootWindow->state.rows = LINES;
-
MuttHelpWindow->state.visible = C_Help;
MuttSidebarWindow->state.visible = C_SidebarVisible;
MuttSidebarWindow->req_cols = C_SidebarWidth;
mutt_debug(LL_DEBUG2, "entering\n");
mutt_window_reflow_prep();
window_reflow(win ? win : RootWindow);
+
+ mutt_menu_set_current_redraw_full();
+ /* the pager menu needs this flag set to recalc line_info */
+ mutt_menu_set_current_redraw(REDRAW_FLOW);
}
/**
FREE(&np);
}
}
+
+/**
+ * mutt_window_set_root - XXX
+ * @param rows
+ * @param cols
+ */
+void mutt_window_set_root(int rows, int cols)
+{
+ if (!RootWindow)
+ return;
+
+ bool changed = false;
+
+ if (RootWindow->state.rows != rows)
+ {
+ RootWindow->state.rows = rows;
+ changed = true;
+ }
+
+ if (RootWindow->state.cols != cols)
+ {
+ RootWindow->state.cols = cols;
+ changed = true;
+ }
+
+ if (changed)
+ {
+ mutt_window_reflow(RootWindow);
+ }
+}
struct MuttWindow *mutt_window_new (enum MuttWindowOrientation orient, enum MuttWindowSize size, int rows, int cols);
void mutt_window_reflow (struct MuttWindow *win);
void mutt_window_reflow_message_rows(int mw_rows);
+void mutt_window_set_root (int rows, int cols);
int mutt_window_wrap_cols (int width, short wrap);
// Functions for drawing on the Window
SLsmg_init_smg();
stdscr = newwin(0, 0, 0, 0);
keypad(stdscr, true);
+ mutt_window_set_root(w.ws_row, w.ws_col);
mutt_window_reflow(NULL);
}
#else
}
resizeterm(screenrows, screencols);
+ mutt_window_set_root(w.ws_row, w.ws_col);
mutt_window_reflow(NULL);
}
#endif