]> Pileus Git - wmpus/commitdiff
Cleanup output messages
authorAndy Spencer <andy753421@gmail.com>
Sat, 9 Jun 2012 09:27:49 +0000 (09:27 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 9 Jun 2012 09:27:49 +0000 (09:27 +0000)
conf.c
makefile
sys-x11.c

diff --git a/conf.c b/conf.c
index 24bb54934a017e91c62f80a4ef6ae3f15ea94764..407165546c72e4c83c8234672753aef4bac011f7 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -74,11 +74,11 @@ static void conf_set(const char *key, int num, const char *str)
        if (str) {
                entry->type = STRING;
                entry->str  = strdup(str);
-               printf("set_str: %s = %s\n", key, str);
+               //printf("set_str: %s = %s\n", key, str);
        } else {
                entry->type = NUMBER;
                entry->num  = num;
-               printf("set_num: %s = %d\n", key, num);
+               //printf("set_num: %s = %d\n", key, num);
        }
        tsearch(entry, &conf, conf_cmp);
 }
@@ -103,7 +103,7 @@ static void load_file(const char *path)
        char key[256]={}, val[256]={}, fullkey[256]={};
        FILE *fd = fopen(path, "rt");
        if (!fd) return;
-       printf("load_file: %s\n", path);
+       //printf("load_file: %s\n", path);
        while (fgets(line, sizeof(line), fd)) {
                /* Find special characters */
                char *lbrace = strchr(           line   , '[');
@@ -127,7 +127,7 @@ static void load_file(const char *path)
                                        section, strtrim(key));
                        if (!strchr(fullkey, ' ')) {
                                conf_set_str(fullkey, val);
-                               printf("  [%s] = [%s]\n", fullkey, val);
+                               //printf("  [%s] = [%s]\n", fullkey, val);
                        }
                }
                else if (section[0] && equal) {
@@ -147,7 +147,7 @@ static void load_file(const char *path)
                                        conf_set_int(fullkey, 0);
                                else
                                        conf_set_str(fullkey, trim);
-                               printf("  [%s] = [%s]\n", fullkey, trim);
+                               //printf("  [%s] = [%s]\n", fullkey, trim);
                        }
                }
        }
index fb14b4d31a614e8d32e1eb60f934ff2a3726c532..efef70137753adc8037030f86b42c1fb72ae1283 100644 (file)
--- a/makefile
+++ b/makefile
@@ -5,7 +5,7 @@ undefine CC
 
 -include config.mk
 
-VERSION   ?= 0.1
+VERSION   ?= 0.1-p0
 WM        ?= wmii
 SYS       ?= x11
 CFLAGS    ?= -g -Wall
index a0c3e8fe98c85a2b646ff98ad5c3006fac3f081f..fa66a31d83a2fedffbb78efc65931008ad6c3dbe 100644 (file)
--- a/sys-x11.c
+++ b/sys-x11.c
@@ -403,6 +403,8 @@ static int xerror(Display *dpy, XErrorEvent *err)
            (err->request_code == X_GrabKey           && err->error_code == BadAccess  ) ||
            (err->request_code == X_CopyArea          && err->error_code == BadDrawable))
                return 0;
+       if (err->request_code == X_ChangeWindowAttributes && err->error_code == BadAccess)
+               error("Another window manager is already running");
        return xerrorxlib(dpy, err);
 }
 
@@ -568,7 +570,7 @@ win_t *sys_init(void)
        colors[CLR_FOCUS]   = get_color(dpy, "#a0a0ff");
        colors[CLR_UNFOCUS] = get_color(dpy, "#101066");
        colors[CLR_URGENT]  = get_color(dpy, "#ff0000");
-       printf("colors = #%06lx #%06lx #%06lx\n", colors[0], colors[1], colors[2]);
+       //printf("colors = #%06lx #%06lx #%06lx\n", colors[0], colors[1], colors[2]);
 
        /* Select window management events */
        XSelectInput(dpy, xid, SubstructureRedirectMask|SubstructureNotifyMask);