Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcurses __newwin - fix BGWCOL initialization.



details:   https://anonhg.NetBSD.org/src/rev/7936b9d9e467
branches:  trunk
changeset: 379155:7936b9d9e467
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sat May 15 11:06:07 2021 +0000

description:
__newwin - fix BGWCOL initialization.

>From Michael Forney in PR lib/56174

diffstat:

 lib/libcurses/newwin.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r fc7a04917468 -r 7936b9d9e467 lib/libcurses/newwin.c
--- a/lib/libcurses/newwin.c    Sat May 15 10:22:46 2021 +0000
+++ b/lib/libcurses/newwin.c    Sat May 15 11:06:07 2021 +0000
@@ -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 @@ WINDOW *
 
        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 @@ static WINDOW *
        win->flags = (__IDLINE | __IDCHAR);
        win->delay = -1;
        win->wattr = 0;
+       win->battr = 0;
 #ifdef HAVE_WCHAR
        win->bnsp = NULL;
        SET_BGWCOL(*win, 1);



Home | Main Index | Thread Index | Old Index