diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index b879a8a57..490a60636 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -1035,7 +1035,7 @@ channel_set_alpha(unsigned* channel, int alpha){ return -1; } *channel = (alpha << CELL_ALPHA_SHIFT) | (*channel & ~CELL_ALPHA_MASK); - if(alpha != CELL_ALPHA_HIGHCONTRAST){ + if(alpha != CELL_ALPHA_OPAQUE){ *channel |= CELL_BGDEFAULT_MASK; } return 0; diff --git a/tests/cell.cpp b/tests/cell.cpp index 2d25406fe..ac4d0e8b1 100644 --- a/tests/cell.cpp +++ b/tests/cell.cpp @@ -120,7 +120,7 @@ SUBCASE("SetItalic") { CHECK(0 == cell_set_bg_alpha(&c, CELL_ALPHA_TRANSPARENT)); CHECK(CELL_ALPHA_TRANSPARENT == cell_bg_alpha(&c)); CHECK(cell_fg_default_p(&c)); - CHECK(cell_bg_default_p(&c)); + CHECK(!cell_bg_default_p(&c)); } // common teardown diff --git a/tests/notcurses.cpp b/tests/notcurses.cpp index 1fd4f5361..e58804136 100644 --- a/tests/notcurses.cpp +++ b/tests/notcurses.cpp @@ -124,7 +124,7 @@ TEST_CASE("NotcursesBase") { CHECK(0 > channels_set_bg_alpha(&channel, CELL_ALPHA_HIGHCONTRAST)); CHECK(CELL_ALPHA_TRANSPARENT == channels_bg_alpha(channel)); CHECK(channels_fg_default_p(channel)); - CHECK(channels_bg_default_p(channel)); + CHECK(!channels_bg_default_p(channel)); } SUBCASE("Stats"){