From: Narthorn Date: Mon, 12 Oct 2015 11:24:57 +0000 (+0200) Subject: curses: Fix background transparency in terminal X-Git-Tag: v0.87~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F93%2Fhead;p=thirdparty%2Fmtr.git curses: Fix background transparency in terminal Patch comes from, and closes traviscross/mtr#72. --- diff --git a/curses.c b/curses.c index 02b7937..f95f5d1 100644 --- a/curses.c +++ b/curses.c @@ -700,13 +700,15 @@ void mtr_curses_open(void) initscr(); raw(); noecho(); + int bg_col = 0; start_color(); #ifdef HAVE_USE_DEFAULT_COLORS - use_default_colors(); + if (use_default_colors() == OK) + bg_col = -1; #endif int i; for (i = 0; i < 8; i++) - init_pair(i+1, i, 0); + init_pair(i+1, i, bg_col); mtr_curses_init(); mtr_curses_redraw();