1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 16:13:24 +01:00

Added define that fixes text not being visible on rxvt-unicode.

This commit is contained in:
irungentoo 2013-09-26 09:51:21 -04:00
parent e51ebd9c7c
commit 7da72b79ef
2 changed files with 19 additions and 4 deletions

View File

@ -37,6 +37,10 @@
#define MAGENTA 6
#define BLACK 7
/* Fixes text color problem on some terminals.
Uncomment if necessary */
//#define URXVT_FIX
typedef struct ToxWindow_ ToxWindow;
struct ToxWindow_ {

View File

@ -154,8 +154,10 @@ int add_window(Tox *m, ToxWindow w)
if (w.window == NULL)
return -1;
wbkgd(w.window, COLOR_PAIR(0));
#ifdef URXVT_FIX
/* Fixes text color problem on some terminals. */
wbkgd(w.window, COLOR_PAIR(6));
#endif
windows[i] = w;
w.onInit(&w, m);
@ -245,8 +247,13 @@ static void draw_bar()
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {
if (windows[i].window) {
if (windows + i == active_window)
if (windows + i == active_window) {
#ifdef URXVT_FIX
attron(A_BOLD | COLOR_PAIR(GREEN));
} else {
#endif
attron(A_BOLD);
}
odd = (odd + 1) % blinkrate;
@ -259,7 +266,11 @@ static void draw_bar()
if (windows[i].blink && (odd < (blinkrate / 2)))
attroff(COLOR_PAIR(RED));
if (windows + i == active_window) {
if (windows + i == active_window) {
#ifdef URXVT_FIX
attroff(A_BOLD | COLOR_PAIR(GREEN));
} else {
#endif
attroff(A_BOLD);
}
}