From 00e4e9975e078ed2be27c5a6c3676dee4d11fd24 Mon Sep 17 00:00:00 2001 From: Raphael Khaiat Date: Tue, 6 Jul 2010 23:03:40 +0200 Subject: [PATCH 1/2] Fix a bug that printed the tag previous count instead of the new one when using the tag_add with the name_count = true --- src/tag.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/tag.c b/src/tag.c index 160a44c..2188efd 100644 --- a/src/tag.c +++ b/src/tag.c @@ -479,7 +479,16 @@ tag_new(int s, char *name) { char * displayedName; - if((!name || strlen(name) == 0)) + if(conf.ntag[s] + 1 > MAXTAG) + { + warnx("Too many tag: Can't create new tag"); + + return; + } + + ++conf.ntag[s]; + + if(!name || strlen(name) == 0) { if(conf.tagnamecount) { @@ -498,17 +507,8 @@ tag_new(int s, char *name) conf.default_tag.barpos, conf.default_tag.layout, 0, NULL, 0 }; - if(conf.ntag[s] + 1 > MAXTAG) - { - warnx("Too many tag: Can't create new tag"); - - return; - } - - ++conf.ntag[s]; tags[s][conf.ntag[s]] = t; -/* tags[s][conf.ntag[s]].name = _strdup(displayedName);*/ infobar_update_taglist(s); infobar_draw(s); From 2d9baf78c5458708417172e89b674ce9606a5ae2 Mon Sep 17 00:00:00 2001 From: Raphael Khaiat Date: Tue, 16 Nov 2010 01:09:35 +0100 Subject: [PATCH 2/2] Starting wmfs with an alternate wmfs was possible with wmfs -C otherWmfsrc but only $HOME/.config/wmfsrc was read when reloading wmfs. Now, if you start wmfs with -C and a different file, this file will be reloaded. --- src/wmfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wmfs.c b/src/wmfs.c index b614b21..cdbb923 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -282,7 +282,8 @@ uicb_reload(uicb_t cmd) for(; argv_global[0] && argv_global[0] == ' '; ++argv_global); - execlp(argv_global, argv_global, NULL); + // add -C to always load the same config file + execlp(argv_global, argv_global, "-C", conf.confpath, NULL); return; }