LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   A question about Ncurses start_color()... (https://www.linuxquestions.org/questions/programming-9/a-question-about-ncurses-start_color-4175455412/)

trist007 03-24-2013 06:48 PM

A question about Ncurses start_color()...
 
I use item and have set my background to black and foreground to blue. Sometimes when I exit my Ncurses program my foreground changes to white. Is there a function that I can run near the exit of my program to keep the blue?

-Tristan

dickey 03-25-2013 07:23 PM

Well, endwin will reset the colors. You could bypass that by making a substitute for endwin (which is a little complicated): use reset_shell_mode to fix the terminal mode, and tparm/tputs to move the cursor to the lower-left corner as well as sending the rmcup, rmkx terminfo capabilities to get the cursor-keys working again.


All times are GMT -5. The time now is 09:16 PM.