colors = 1;
}
- // set background color of main window
+ // set background color for main window
if(colors)
- wbkgd(stdscr, COLOR_PAIR(CP_YELLOW));
+ wbkgd(stdscr, COLOR_PAIR(CP_WHITE));
- // setup main window
+ // setup content window
WINDOW *content = newwin(LINES - bar_top - bar_bottom, COLS, 0 + bar_top, 0);
+
+ // set background color of content window
if(colors)
wbkgd(content, COLOR_PAIR(CP_WHITE));
// always resize window in case terminal geometry has changed
wresize(content, LINES - bar_top - bar_bottom, COLS);
+ // set main window text color
+ if(colors)
+ wattron(stdscr, COLOR_PAIR(CP_YELLOW));
+
// setup header
if(bar_top) {
line = deck->header;
break;
}
- // make header + fooder visible
- wrefresh(content);
- wrefresh(stdscr);
+ // copy changed lines in main window to virtual screen
+ wnoutrefresh(stdscr);
line = slide->line;
l = stop = 0;
}
}
- // make content visible
- wrefresh(content);
+ // copy changed lines in content window to virtual screen
+ wnoutrefresh(content);
+
+ // compare virtual screen to physical screen and does the actual updates
+ doupdate();
// fade in
if(fade)
init_pair(CP_BLACK, 16, white_ramp[i]);
}
- // refresh window with new color
- wrefresh(window);
+ // refresh virtual screen with new color
+ wnoutrefresh(window);
+
+ // compare virtual screen to physical screen and does the actual updates
+ doupdate();
// delay for our eyes to recognize the change
usleep(FADE_DELAY);
init_pair(CP_BLACK, 16, white_ramp[i]);
}
- // refresh window with new color
- wrefresh(window);
+ // refresh virtual screen with new color
+ wnoutrefresh(window);
+
+ // compare virtual screen to physical screen and does the actual updates
+ doupdate();
// delay for our eyes to recognize the change
usleep(FADE_DELAY);