OT: weird curses problem

Axel Weiß aweiss at informatik.hu-berlin.de
Sun Jul 3 21:41:46 CEST 2005


Hannes Mayer schrieb:
> Hi all!
>
> I've been sitting over this weird curses problem for the past 2 hours,
> googled, but still no solution in sight.
>
> Here is the curses init:
> 	initscr();
> 	noecho();
> 	cbreak();
> 	nodelay(stdscr, TRUE);

Hi Hannes,

maybe it doesn't matter at all, but I do a
        refresh();
here.

> ..make some windows:
> 	screen = newwin(len, width, y, x);
> 	box(screen, ACS_VLINE, ACS_HLINE);
> 	title = newwin(len - 22, width - 4, y + 1, x + 2);
> 	box(title, ACS_VLINE, ACS_HLINE);
>
> ..print stuff in the window
> 	curs_set(0);
> 	mvwprintw(title,1,32,"- TITLE -");
>
> ..the loop:
> 	while ( [condition] ) {
> 		current_getch = getch();
> 	}
>
> Everything is printed as expected (the window-box, the TITLE), but
> as soon as getch() in the while loop is reached, the window-box and
> the TITLE _disappears_.
> I've tried various things:
> "nodelay(screen, TRUE);":  "getch" blocks.
> "wgetch(stdscr)":  window-box and the TITLE vanishes.
> "nodelay(screen, TRUE);" and "wgetch(screen)":  "getch" blocks
>
> How can I keep the window-box and the mvwprintw's *without* a blocking
> getch() ?
>
> Thanks for any hints and pointers!

I also do a refresh() after each printouts.

I'm afraid, this solution would be too trivial, but you may give it a 
try. Hope it helps,
			Axel

-- 
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050
** www.freesp.de **




More information about the Rtai mailing list