diff options
author | okan | 2012-12-17 02:28:45 +0000 |
---|---|---|
committer | okan | 2012-12-17 02:28:45 +0000 |
commit | 413da1eebb4612d1fe0c55b2b9a5957b5379285d (patch) | |
tree | d4ab320aa75fefece4189a84bf0e697503416b9e /parse.y | |
parent | 168c81d59eaf5d21c57d30f3ddb5674168a753f8 (diff) | |
download | cwm-413da1eebb4612d1fe0c55b2b9a5957b5379285d.tar.gz |
non-trivial menu drawing rewrite, moving to Xft and solving various
font/color drawing issues; from Alexander Polakov
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.34 2012/10/31 22:06:24 okan Exp $ */ +/* $OpenBSD: parse.y,v 1.35 2012/12/17 02:28:45 okan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -73,7 +73,8 @@ typedef struct { %token COLOR SNAPDIST %token ACTIVEBORDER INACTIVEBORDER %token GROUPBORDER UNGROUPBORDER -%token MENUBG MENUFG FONTCOLOR +%token MENUBG MENUFG +%token FONTCOLOR FONTSELCOLOR %token ERROR %token <v.string> STRING %token <v.number> NUMBER @@ -186,16 +187,20 @@ colors : ACTIVEBORDER STRING { conf->color[CWM_COLOR_BORDER_UNGROUP].name = $2; } | MENUBG STRING { - free(conf->color[CWM_COLOR_BG_MENU].name); - conf->color[CWM_COLOR_BG_MENU].name = $2; + free(conf->menucolor[CWM_COLOR_MENU_BG]); + conf->menucolor[CWM_COLOR_MENU_BG] = $2; } | MENUFG STRING { - free(conf->color[CWM_COLOR_FG_MENU].name); - conf->color[CWM_COLOR_FG_MENU].name = $2; + free(conf->menucolor[CWM_COLOR_MENU_FG]); + conf->menucolor[CWM_COLOR_MENU_FG] = $2; } | FONTCOLOR STRING { - free(conf->color[CWM_COLOR_FONT].name); - conf->color[CWM_COLOR_FONT].name = $2; + free(conf->menucolor[CWM_COLOR_MENU_FONT]); + conf->menucolor[CWM_COLOR_MENU_FONT] = $2; + } + | FONTSELCOLOR STRING { + free(conf->menucolor[CWM_COLOR_MENU_FONT_SEL]); + conf->menucolor[CWM_COLOR_MENU_FONT_SEL] = $2; } ; %% @@ -247,6 +252,7 @@ lookup(char *s) { "mousebind", MOUSEBIND}, { "moveamount", MOVEAMOUNT}, { "no", NO}, + { "selfont", FONTSELCOLOR}, { "snapdist", SNAPDIST}, { "sticky", STICKY}, { "ungroupborder", UNGROUPBORDER}, @@ -575,6 +581,9 @@ parse_config(const char *filename, struct conf *xconf) for (i = 0; i < CWM_COLOR_MAX; i++) xconf->color[i].name = conf->color[i].name; + for (i = 0; i < CWM_COLOR_MENU_MAX; i++) + xconf->menucolor[i]= conf->menucolor[i]; + xconf->font = conf->font; } |