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);
}
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 , '[');
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) {
conf_set_int(fullkey, 0);
else
conf_set_str(fullkey, trim);
- printf(" [%s] = [%s]\n", fullkey, trim);
+ //printf(" [%s] = [%s]\n", fullkey, trim);
}
}
}
(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);
}
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);