aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-06-14 14:35:37 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-06-14 14:35:37 +0000
commit35b3752eb2c16a0a256fa7a0bdc410ca4eaa0ad8 (patch)
treed4b0f5ae06edec33cd4cafbcec81b1f1dd440e5e /main.c
parent81eed5c092eb40fd6e1256b2b1d160b2ba5bb426 (diff)
downloaddzen-35b3752eb2c16a0a256fa7a0bdc410ca4eaa0ad8.tar.gz
dzen-35b3752eb2c16a0a256fa7a0bdc410ca4eaa0ad8.zip
proper check if can allocate the requested color
git-svn-id: http://dzen.googlecode.com/svn/trunk@99 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 38bf037..47cdc0e 100644
--- a/main.c
+++ b/main.c
@@ -281,8 +281,10 @@ x_create_windows(void) {
root = RootWindow(dzen.dpy, dzen.screen);
/* style */
- dzen.norm[ColBG] = getcolor(dzen.bg);
- dzen.norm[ColFG] = getcolor(dzen.fg);
+ if((dzen.norm[ColBG] = getcolor(dzen.bg)) == -1)
+ eprint("dzen: error, cannot allocate color '%s'\n", dzen.bg);
+ if((dzen.norm[ColFG] = getcolor(dzen.fg)) == -1)
+ eprint("dzen: error, cannot allocate color '%s'\n", dzen.fg);
setfont(dzen.fnt);
/* window attributes */