Krolyxon
Commit 3238ef6

Branches

Refs →

nsxiv3238ef6

Fixed issue #41, added WIN_FS_COLOR to config.h

Author
Bert Münnich
Date
2012-03-02 19:42 +0100
Parent
37a42db
Commit
3238ef6bf6a4a0e1842aff565f4286ef9de6ce3c

+7 −7

4 files changed

  1. M config.def.h +1 −0
  2. M thumbs.c +1 −1
  3. M window.c +4 −5
  4. M window.h +1 −1
M config.def.h View
@@ -15,6 +15,7 @@ static const char * const BAR_FONT = "fixed";
1515 * (see X(7) section "COLOR NAMES" for valid values)
1616 */
1717 static const char * const WIN_BG_COLOR = "#777777";
18+static const char * const WIN_FS_COLOR = "#000000";
1819 static const char * const SEL_COLOR = "#DDDDDD";
1920 static const char * const BAR_BG_COLOR = "#222222";
2021 static const char * const BAR_FG_COLOR = "#EEEEEE";
M thumbs.c View
@@ -379,7 +379,7 @@ void tns_highlight(tns_t *tns, int n, bool hl) {
379379 if (hl)
380380 col = win->selcol;
381381 else if (win->fullscreen)
382− col = win->black;
382+ col = win->fscol;
383383 else
384384 col = win->bgcol;
385385
M window.c View
@@ -110,10 +110,9 @@ void win_init(win_t *win) {
110110 e->cmap = DefaultColormap(e->dpy, e->scr);
111111 e->depth = DefaultDepth(e->dpy, e->scr);
112112
113− win->black = BlackPixel(e->dpy, e->scr);
114− win->white = WhitePixel(e->dpy, e->scr);
115−
113+ win->white = WhitePixel(e->dpy, e->scr);
116114 win->bgcol = win_alloc_color(win, WIN_BG_COLOR);
115+ win->fscol = win_alloc_color(win, WIN_FS_COLOR);
117116 win->selcol = win_alloc_color(win, SEL_COLOR);
118117 win->barbgcol = win_alloc_color(win, BAR_BG_COLOR);
119118 win->barfgcol = win_alloc_color(win, BAR_FG_COLOR);
@@ -195,7 +194,7 @@ void win_open(win_t *win) {
195194 cwatch = XCreateFontCursor(e->dpy, XC_watch);
196195
197196 if (XAllocNamedColor(e->dpy, DefaultColormap(e->dpy, e->scr), "black",
198− &col, &col) == 0)
197+ &col, &col) == 0)
199198 {
200199 die("could not allocate color: black");
201200 }
@@ -334,7 +333,7 @@ void win_clear(win_t *win) {
334333 XFreePixmap(e->dpy, win->pm);
335334 win->pm = XCreatePixmap(e->dpy, win->xwin, e->scrw, e->scrh, e->depth);
336335
337− XSetForeground(e->dpy, gc, win->fullscreen ? win->black : win->bgcol);
336+ XSetForeground(e->dpy, gc, win->fullscreen ? win->fscol : win->bgcol);
338337 XFillRectangle(e->dpy, win->pm, gc, 0, 0, e->scrw, e->scrh);
339338 }
340339
M window.h View
@@ -38,9 +38,9 @@ typedef struct {
3838 Window xwin;
3939 win_env_t env;
4040
41− unsigned long black;
4241 unsigned long white;
4342 unsigned long bgcol;
43+ unsigned long fscol;
4444 unsigned long selcol;
4545 unsigned long barbgcol;
4646 unsigned long barfgcol;