Subject: lib/26660: libcurses 'curscr' contains the wrong information
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/14/2004 15:50:51
>Number:         26660
>Category:       lib
>Synopsis:       libcurses 'curscr' contains the wrong information
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 14 15:09:01 UTC 2004
>Originator:     David Laight
>Release:        NetBSD 2.0 current
	current sources
Architecture: i386
Machine: i386
	Other curses implementations use 'curscr' for the screen image
	that has been processed by wnoutrefresh(). NetBSD's curses
	uses the internal structure __virtscr for that and uses 'curscr'
	for the image processed bu doupdate() - ie the data that is actually
	on the screen display.

	wrefresh(stdscr) is also expected to re-output the entire screen
	(eg if it has been corrupted by non-curses output).
	Run code that uses the (almost) portable code below to perform
	a 'pop up box' without corrupting the underlying screen, and without
	knowing which WINDOWs need to be refreshed in which order to redraw
	the screen image.

	This code:
		popup_win = newwin( ... );
		sv_win = dupwin(popup_win);
		overwrite(stdscr, sv_win);
		.... do display in popup_win ...
		overwrite(sv_win, popup_win);
	only works if preceded by a doupdate() call.
	Completely redo all the refresh handling...