Module Name: src
Committed By: uwe
Date: Sat May 15 11:06:08 UTC 2021
Modified Files:
src/lib/libcurses: newwin.c
Log Message:
__newwin - fix BGWCOL initialization.
>From Michael Forney in PR lib/56174
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/lib/libcurses/newwin.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcurses/newwin.c
diff -u src/lib/libcurses/newwin.c:1.58 src/lib/libcurses/newwin.c:1.59
--- src/lib/libcurses/newwin.c:1.58 Tue Jul 14 04:39:39 2020
+++ src/lib/libcurses/newwin.c Sat May 15 11:06:07 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: newwin.c,v 1.58 2020/07/14 04:39:39 uwe Exp $ */
+/* $NetBSD: newwin.c,v 1.59 2021/05/15 11:06:07 uwe Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94";
#else
-__RCSID("$NetBSD: newwin.c,v 1.58 2020/07/14 04:39:39 uwe Exp $");
+__RCSID("$NetBSD: newwin.c,v 1.59 2021/05/15 11:06:07 uwe Exp $");
#endif
#endif /* not lint */
@@ -144,9 +144,7 @@ __newwin(SCREEN *screen, int nlines, int
win->bch = ' ';
if (__using_color)
- win->battr = __default_color;
- else
- win->battr = 0;
+ win->battr |= __default_color;
win->nextp = win;
win->ch_off = 0;
win->orig = NULL;
@@ -386,6 +384,7 @@ __makenew(SCREEN *screen, int nlines, in
win->flags = (__IDLINE | __IDCHAR);
win->delay = -1;
win->wattr = 0;
+ win->battr = 0;
#ifdef HAVE_WCHAR
win->bnsp = NULL;
SET_BGWCOL(*win, 1);