Adding switchtag improvements

This commit is contained in:
bakkeby
2019-11-26 20:23:58 +01:00
parent 7d107ce8eb
commit ab2c5fe5da
3 changed files with 16 additions and 1 deletions

12
dwm.c
View File

@@ -149,6 +149,9 @@ struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
#if SWITCHTAG_PATCH
unsigned int switchtag;
#endif // SWITCHTAG_PATCH
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
#if FAKEFULLSCREEN_CLIENT_PATCH
int fakefullscreen;
@@ -526,9 +529,14 @@ applyrules(Client *c)
newtagset = c->tags;
if (newtagset) {
c->switchtag = selmon->tagset[selmon->seltags];
c->mon->tagset[c->mon->seltags] = newtagset;
if (r->switchtag == 1)
#if PERTAG_PATCH
pertagview(&((Arg) { .ui = newtagset }));
#else
view(&((Arg) { .ui = newtagset }));
#endif // PERTAG_PATCH
arrange(c->mon);
}
}
@@ -3316,6 +3324,10 @@ unmanage(Client *c, int destroyed)
focus(NULL);
updateclientlist();
arrange(m);
#if SWITCHTAG_PATCH
if (c->switchtag)
view(&((Arg) { .ui = c->switchtag }));
#endif // SWITCHTAG_PATCH
}
void