aboutsummaryrefslogtreecommitdiffstats
path: root/bar.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-09-15 20:39:31 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-09-15 20:39:31 +0200
commit2091200c957783deed032380d56c4199a23c6b81 (patch)
treedc878b437a2ebbe9cfbe79eced7dc50ae8f4fc55 /bar.c
parent7e476fb86ba254e6fe3a916ed7b5298e432a469c (diff)
downloaddwm-2091200c957783deed032380d56c4199a23c6b81.tar.gz
new colorscheme (16-bit compliant)
Diffstat (limited to 'bar.c')
-rw-r--r--bar.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/bar.c b/bar.c
index 9e3c386..91689cf 100644
--- a/bar.c
+++ b/bar.c
@@ -69,7 +69,8 @@ initfont(const char *fontstr) {
if(dc.font.xfont)
XFreeFont(dpy, dc.font.xfont);
dc.font.xfont = NULL;
- if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)))
+ if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
+ || !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
eprint("error, cannot load font: '%s'\n", fontstr);
dc.font.ascent = dc.font.xfont->ascent;
dc.font.descent = dc.font.xfont->descent;
@@ -186,9 +187,7 @@ drawbar(void) {
}
void
-initbar(void) {
- XSetWindowAttributes wa;
-
+initstyle(void) {
dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR);
dc.norm[ColBG] = initcolor(NORMBGCOLOR);
dc.norm[ColFG] = initcolor(NORMFGCOLOR);
@@ -197,6 +196,12 @@ initbar(void) {
dc.sel[ColFG] = initcolor(SELFGCOLOR);
initfont(FONT);
dc.h = bh = dc.font.height + 2;
+}
+
+void
+initbar(void) {
+ XSetWindowAttributes wa;
+
wa.override_redirect = 1;
wa.background_pixmap = ParentRelative;
wa.event_mask = ButtonPressMask | ExposureMask;