X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Fbase%2Flib_wattron.c;h=906021d3b4cfaf058dbb960958161accb57af024;hb=eeac2ef5db363494c4272b6dca6d9a0474153381;hp=3806285e2a387a337370ab4609d37c00af727661;hpb=cf94c7485f7b40ff7870b5bf9a65e7ab87481a76;p=ncurses.git diff --git a/ncurses/base/lib_wattron.c b/ncurses/base/lib_wattron.c index 3806285e..906021d3 100644 --- a/ncurses/base/lib_wattron.c +++ b/ncurses/base/lib_wattron.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright 2020,2022 Thomas E. Dickey * + * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -42,7 +43,7 @@ #include #include -MODULE_ID("$Id: lib_wattron.c,v 1.11 2010/03/31 23:38:02 tom Exp $") +MODULE_ID("$Id: lib_wattron.c,v 1.13 2022/04/15 22:34:38 tom Exp $") NCURSES_EXPORT(int) wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED) @@ -54,8 +55,10 @@ wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED) GET_WINDOW_PAIR(win))); if_EXT_COLORS({ - if (at & A_COLOR) + if (at & A_COLOR) { win->_color = PairNumber(at); + set_extended_pair(opts, win->_color); + } }); toggle_attr_on(WINDOW_ATTRS(win), at); returnCode(OK);