void mutt_need_hard_redraw(void)
{
- keypad(stdscr, true);
- clearok(stdscr, true);
+ keypad(main_w, true);
+ clearok(main_w, true);
set_option(OPTNEEDREDRAW);
}
return;
/* else */
- wrefresh(stdscr);
if (sidebar_w)
- wrefresh(sidebar_w);
- wrefresh(main_w);
- main_w = NULL;
+ wnoutrefresh(sidebar_w);
+ if (main_w)
+ wnoutrefresh(main_w);
+ wrefresh(stdscr);
}
void mutt_endwin(const char *msg)
{
if (!option(OPTNOCURSES)) {
- CLEARLINE(LINES - 1);
+ CLEARLINE(stdscr, LINES - 1);
if (sidebar_w) {
delwin(sidebar_w);
sidebar_w = NULL;
}
+#if 0
if (main_w) {
delwin(main_w);
main_w = NULL;
}
+#endif
- wattrset(stdscr, A_NORMAL);
mutt_refresh();
endwin();
}
void ui_layout_init(void)
{
- SETCOLOR(MT_COLOR_NORMAL);
- wclear(stdscr);
+ erase();
+ main_w = newwin(LINES - 1, COLS, 0, 0);
+ SETCOLOR(main_w, MT_COLOR_NORMAL);
mutt_error = mutt_curses_error;
mutt_message = mutt_curses_message;
-
- main_w = newwin(LINES - 1, COLS, 0, 0);
}
void ui_layout_resize(void)
resizeterm(rows, cols);
SigWinch = 0;
/* force a real complete redraw. */
- clearok(stdscr, true);
+ clearok(main_w, true);
}
}
if (!sidebar_w) {
sidebar_w = newwin(LINES - 1, SidebarWidth, 0, 0);
wresize(main_w, LINES - 1, COLS - SidebarWidth);
+ mvwin(main_w, 0, SidebarWidth);
}
getmaxyx(sidebar_w, sh, sw);
if (sh != LINES - 1 || sw != SidebarWidth) {
wresize(sidebar_w, LINES - 1, SidebarWidth);
wresize(main_w, LINES - 1, COLS - SidebarWidth);
+ mvwin(main_w, 0, SidebarWidth);
}
} else {
if (sidebar_w) {
delwin(sidebar_w);
sidebar_w = NULL;
wresize(main_w, LINES - 1, COLS);
+ mvwin(main_w, 0, 0);
}
}
return sidebar_w;