Cannot do a ncurses overwrite(curscr, savewin) correctly because I ripoffline() before

Posted by Costi on Stack Overflow See other posts from Stack Overflow or by Costi
Published on 2010-03-13T16:30:04Z Indexed on 2010/03/13 16:35 UTC
Read the original article Hit count: 281

Filed under:
|

I have a C/ncurses program that I'm debugging/maintaining. This program does ripoffline twice: first, to put a title bar and the second time to put a menu bar on the top of the page.

I need to dropdown some menus so I save the screen before I drop down the menus. In the InitMenu function, I have the following code:

 savewin = newwin (0, 0, 0, 0);
 overwrite (curscr, savewin);
 wrefresh(savewin)

The problem is that savewin is being copied WITH the menu and the ripped off lines, but it gets drawn on the screen BELOW the rippedoff lines. This duplicates the ripped off lines on the screen.

Only realizing where the problem was took me a while. Now, I have no idea how to fix it. Ideally, I would like to copy curscr to savewin without the ripped off lines. Any ideas?

© Stack Overflow or respective owner

Related posts about ncurses

Related posts about c