diff --git a/src/client.c b/src/client.c index fde0f87..ca63594 100644 --- a/src/client.c +++ b/src/client.c @@ -875,20 +875,21 @@ client_apply_rule(struct client *c) c->theme = r->theme; + /* free = false for originally free client */ if(r->flags & RULE_FREE) c->flags |= CLIENT_FREE; - /* free = false for originally free client */ else c->flags &= ~CLIENT_FREE; + /* Free rule is not compatible with tab rule */ + if(r->flags & RULE_TAB) + W->flags ^= WMFS_TABNOC; /* < can be disable by client_tab_next_opened */ /* TODO - if(r->flags & RULE_MAX) - {} - if(r->flags & RULE_IGNORE_TAG) {} */ + c->flags |= CLIENT_RULED; } flags = 0; diff --git a/src/config.c b/src/config.c index 4fb9480..f100b80 100644 --- a/src/config.c +++ b/src/config.c @@ -264,7 +264,7 @@ config_rule(void) r->tag = fetch_opt_first(ks[i], "-1", "tag").num; FLAGAPPLY(r->flags, fetch_opt_first(ks[i], "false", "free").boolean, RULE_FREE); - FLAGAPPLY(r->flags, fetch_opt_first(ks[i], "false", "max").boolean, RULE_MAX); + FLAGAPPLY(r->flags, fetch_opt_first(ks[i], "false", "tab").boolean, RULE_TAB); FLAGAPPLY(r->flags, fetch_opt_first(ks[i], "false", "ignore_tag").boolean, RULE_IGNORE_TAG); if((tn = fetch_opt_first(ks[i], "", "theme").str)) diff --git a/src/layout.c b/src/layout.c index 8534a87..036359b 100644 --- a/src/layout.c +++ b/src/layout.c @@ -389,6 +389,7 @@ layout_split_integrate(struct client *c, struct client *sc) { client_maximize(c); c->flags |= CLIENT_TILED; + W->flags &= ~WMFS_TABNOC; return; } } diff --git a/src/layout.h b/src/layout.h index 0bae14c..2d00652 100644 --- a/src/layout.h +++ b/src/layout.h @@ -7,6 +7,7 @@ #define LAYOUT_H #include "wmfs.h" +#include "client.h" /* Check lateral direction (if p is Right or Left) */ #define LDIR(P) (P < Top) diff --git a/src/tag.c b/src/tag.c index 4fd04c3..0fd9c44 100644 --- a/src/tag.c +++ b/src/tag.c @@ -102,8 +102,6 @@ tag_client(struct tag *t, struct client *c) infobar_elem_screen_update(t->screen, ElemTag); - layout_client(c); - if(c->flags & CLIENT_TABMASTER && c->prevtag) { struct client *cc; @@ -116,6 +114,8 @@ tag_client(struct tag *t, struct client *c) } } + layout_client(c); + if(t != c->screen->seltag || c->flags & CLIENT_TABBED) client_unmap(c); } diff --git a/src/wmfs.h b/src/wmfs.h index f49eb58..408521f 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -274,7 +274,7 @@ struct rule char *name; int tag, screen; #define RULE_FREE 0x01 -#define RULE_MAX 0x02 +#define RULE_TAB 0x02 #define RULE_IGNORE_TAG 0x04 Flags flags; SLIST_ENTRY(rule) next; diff --git a/wmfsrc b/wmfsrc index 5bc139c..9fec292 100644 --- a/wmfsrc +++ b/wmfsrc @@ -137,7 +137,7 @@ screen = 0 free = false - max = false + tab = false ignore_tag = false [/rule]