Add option (tag_auto_prev) in wmfsrc to disable the auto tag prev

when going twice on the same tag.
This commit is contained in:
bacardi55@gmail.com
2011-01-05 19:51:48 +01:00
parent c8eb002768
commit 03c41f9b3b
4 changed files with 4 additions and 1 deletions

View File

@@ -470,6 +470,7 @@ conf_tag_section(void)
sec = fetch_section_first(NULL, "tags");
conf.tag_round = fetch_opt_first(sec, "false", "tag_round").bool;
conf.tag_auto_prev = fetch_opt_first(sec, "true", "tag_auto_prev").bool;
conf.colors.tagselfg = fetch_opt_first(sec, "#ffffff", "sel_fg").str;
conf.colors.tagselbg = getcolor(fetch_opt_first(sec, "#000000", "sel_bg").str);
conf.colors.tagurfg = fetch_opt_first(sec, "#000000", "urgent_fg").str;

View File

@@ -480,6 +480,7 @@ typedef struct
Rule *rule;
int *ntag;
Bool tag_round;
Bool tag_auto_prev;
Bool client_round;
Bool layout_system; /* Switch: False, Menu: True. */
Bool layout_placement; /* Right (normal): False, Left: True. */

View File

@@ -49,7 +49,7 @@ tag_set(int tag)
if(seltag[selscreen] != tag)
prevseltag[selscreen] = seltag[selscreen];
else if(tag == seltag[selscreen] && tag != prevseltag[selscreen])
else if(tag == seltag[selscreen] && tag != prevseltag[selscreen] && conf.tag_auto_prev)
tag = seltag[selscreen] = prevseltag[selscreen];
else
seltag[selscreen] = tag;