aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorokan2013-05-19 23:09:59 +0000
committerokan2013-05-19 23:09:59 +0000
commitddd89ea5ae03ad42e2aebd4e614e16bc4dd36c19 (patch)
treec78917d5a1bf167f676505945bde884fba9bbc39 /parse.y
parent9b2707d7772bceae892c022721d1f1857984432d (diff)
downloadcwm-ddd89ea5ae03ad42e2aebd4e614e16bc4dd36c19.tar.gz
- switch border colors to Xft
- merge border/menu color structures/functions since they now both use Xft - switch xu_xorcolor to operating on XftColor instead of just XRenderColor (basically adding pixel) - if color name allocation fails, revert back to default (this, along with font validation should occur during config parse, but we don't have screens setup yet - likely to change at some point)
Diffstat (limited to '')
-rw-r--r--parse.y23
1 files changed, 10 insertions, 13 deletions
diff --git a/parse.y b/parse.y
index b0d7395..d088b69 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.41 2013/05/06 19:09:19 okan Exp $ */
+/* $OpenBSD: parse.y,v 1.42 2013/05/19 23:09:59 okan Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -198,20 +198,20 @@ colors : ACTIVEBORDER STRING {
conf->color[CWM_COLOR_BORDER_UNGROUP] = $2;
}
| MENUBG STRING {
- free(conf->menucolor[CWM_COLOR_MENU_BG]);
- conf->menucolor[CWM_COLOR_MENU_BG] = $2;
+ free(conf->color[CWM_COLOR_MENU_BG]);
+ conf->color[CWM_COLOR_MENU_BG] = $2;
}
| MENUFG STRING {
- free(conf->menucolor[CWM_COLOR_MENU_FG]);
- conf->menucolor[CWM_COLOR_MENU_FG] = $2;
+ free(conf->color[CWM_COLOR_MENU_FG]);
+ conf->color[CWM_COLOR_MENU_FG] = $2;
}
| FONTCOLOR STRING {
- free(conf->menucolor[CWM_COLOR_MENU_FONT]);
- conf->menucolor[CWM_COLOR_MENU_FONT] = $2;
+ free(conf->color[CWM_COLOR_MENU_FONT]);
+ conf->color[CWM_COLOR_MENU_FONT] = $2;
}
| FONTSELCOLOR STRING {
- free(conf->menucolor[CWM_COLOR_MENU_FONT_SEL]);
- conf->menucolor[CWM_COLOR_MENU_FONT_SEL] = $2;
+ free(conf->color[CWM_COLOR_MENU_FONT_SEL]);
+ conf->color[CWM_COLOR_MENU_FONT_SEL] = $2;
}
;
%%
@@ -589,12 +589,9 @@ parse_config(const char *filename, struct conf *xconf)
(void)strlcpy(xconf->lockpath, conf->lockpath,
sizeof(xconf->lockpath));
- for (i = 0; i < CWM_COLOR_BORDER_MAX; i++)
+ for (i = 0; i < CWM_COLOR_MAX; i++)
xconf->color[i] = conf->color[i];
- for (i = 0; i < CWM_COLOR_MENU_MAX; i++)
- xconf->menucolor[i] = conf->menucolor[i];
-
xconf->font = conf->font;
}