summaryrefslogtreecommitdiff
path: root/lib/libcurses
diff options
context:
space:
mode:
authoruwe <uwe@NetBSD.org>2021-05-15 11:06:07 +0000
committeruwe <uwe@NetBSD.org>2021-05-15 11:06:07 +0000
commit907ff4e8d71b2eb570fc85ed142fbe2dd1b501a4 (patch)
treeb56eeec6da4e5baa432e8d462bc0bf145526ee2c /lib/libcurses
parent715368acf301be2354682f39e0c0e715d275024d (diff)
__newwin - fix BGWCOL initialization.
From Michael Forney in PR lib/56174
Diffstat (limited to 'lib/libcurses')
-rw-r--r--lib/libcurses/newwin.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libcurses/newwin.c b/lib/libcurses/newwin.c
index 860ade3560f..a5546fc042b 100644
--- a/lib/libcurses/newwin.c
+++ b/lib/libcurses/newwin.c
@@ -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 ncols, int by, int bx, int ispad,
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, int ncols, int by, int bx, int sub,
win->flags = (__IDLINE | __IDCHAR);
win->delay = -1;
win->wattr = 0;
+ win->battr = 0;
#ifdef HAVE_WCHAR
win->bnsp = NULL;
SET_BGWCOL(*win, 1);