switchtotag patch to dwm.
This commit is contained in:
parent
7805d7d381
commit
0178a6a766
4 changed files with 89 additions and 21 deletions
|
@ -122,6 +122,7 @@ struct Client {
|
|||
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
||||
int bw, oldbw;
|
||||
unsigned int tags;
|
||||
unsigned int switchtotag;
|
||||
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow;
|
||||
pid_t pid;
|
||||
Client *next;
|
||||
|
@ -171,6 +172,7 @@ typedef struct {
|
|||
const char *instance;
|
||||
const char *title;
|
||||
unsigned int tags;
|
||||
unsigned int switchtotag;
|
||||
int isfloating;
|
||||
int isterminal;
|
||||
int noswallow;
|
||||
|
@ -378,6 +380,11 @@ applyrules(Client *c)
|
|||
for (m = mons; m && m->num != r->monitor; m = m->next);
|
||||
if (m)
|
||||
c->mon = m;
|
||||
if (r->switchtotag) {
|
||||
Arg a = { .ui = r->tags };
|
||||
c->switchtotag = selmon->tagset[selmon->seltags];
|
||||
view(&a);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ch.res_class)
|
||||
|
@ -2315,11 +2322,15 @@ unmanage(Client *c, int destroyed)
|
|||
}
|
||||
free(c);
|
||||
|
||||
if (!s) {
|
||||
arrange(m);
|
||||
focus(NULL);
|
||||
updateclientlist();
|
||||
}
|
||||
if (!s) {
|
||||
arrange(m);
|
||||
if (c->switchtotag) {
|
||||
Arg a = { .ui = c->switchtotag };
|
||||
view(&a);
|
||||
}
|
||||
focus(NULL);
|
||||
updateclientlist();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue