Now refresh() refreshes subwindows too.
Fixes PR lib/20544 by rtr.
This commit is contained in:
parent
32657d0d79
commit
045c8e350f
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: curses_refresh.3,v 1.7 2003/02/14 16:29:12 grant Exp $
|
||||
.\" $NetBSD: curses_refresh.3,v 1.8 2003/03/29 21:43:23 jdc Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2002
|
||||
.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
|
||||
|
@ -30,7 +30,7 @@
|
|||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\"
|
||||
.Dd December 4, 2002
|
||||
.Dd March 26, 2003
|
||||
.Dt CURSES_REFRESH 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -67,7 +67,9 @@ The
|
|||
.Fn refresh
|
||||
function causes curses to propagate changes made to
|
||||
.Dv stdscr
|
||||
to the terminal display.
|
||||
to the terminal display. Any changes made to subwindows of
|
||||
.Dv stdscr
|
||||
are also propagated.
|
||||
.Pp
|
||||
The
|
||||
.Fn wrefresh
|
||||
|
@ -140,6 +142,10 @@ An error occurred in the function.
|
|||
.Xr curses_getch 3 ,
|
||||
.Xr curses_pad 3 ,
|
||||
.Xr curses_touch 3
|
||||
.Sh NOTES
|
||||
Calling
|
||||
.Fn wrefresh
|
||||
on a new, unchanged window has no effect.
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Nx
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: refresh.c,v 1.53 2003/02/17 11:07:20 dsl Exp $ */
|
||||
/* $NetBSD: refresh.c,v 1.54 2003/03/29 21:43:22 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: refresh.c,v 1.53 2003/02/17 11:07:20 dsl Exp $");
|
||||
__RCSID("$NetBSD: refresh.c,v 1.54 2003/03/29 21:43:22 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -109,7 +109,7 @@ pnoutrefresh(WINDOW *pad, int pbegy, int pbegx, int sbegy, int sbegx,
|
|||
if (sbegx < 0)
|
||||
sbegx = 0;
|
||||
|
||||
/* Calculate rectangle on pad - used bu _cursesi_wnoutrefresh */
|
||||
/* Calculate rectangle on pad - used by _cursesi_wnoutrefresh */
|
||||
pmaxy = pbegy + smaxy - sbegy + 1;
|
||||
pmaxx = pbegx + smaxx - sbegx + 1;
|
||||
|
||||
|
@ -140,6 +140,7 @@ _cursesi_wnoutrefresh(SCREEN *screen, WINDOW *win, int begy, int begx,
|
|||
|
||||
short wy, wx, y_off, x_off;
|
||||
__LINE *wlp, *vlp;
|
||||
WINDOW *sub_win;
|
||||
|
||||
#ifdef DEBUG
|
||||
__CTRACE("wnoutrefresh: win %p, flags 0x%08x\n", win, win->flags);
|
||||
|
@ -254,7 +255,16 @@ _cursesi_wnoutrefresh(SCREEN *screen, WINDOW *win, int begy, int begx,
|
|||
}
|
||||
}
|
||||
|
||||
return (OK);
|
||||
/* Recurse through any sub-windows */
|
||||
if ((sub_win = win->nextp) != win && sub_win != win->orig) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("wnoutrefresh: win %o, sub_win %o\n", win, sub_win);
|
||||
#endif
|
||||
return _cursesi_wnoutrefresh(screen, sub_win, 0, 0,
|
||||
sub_win->begy, sub_win->begx,
|
||||
sub_win->maxy, sub_win->maxx);
|
||||
} else
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue