mirror of git://git.suckless.org/dwm
applied patch similiar proposed by dave tweed
This commit is contained in:
parent
c3c94c0e0a
commit
157ea539a2
23
tag.c
23
tag.c
|
@ -30,6 +30,17 @@ RULES
|
||||||
static RReg *rreg = NULL;
|
static RReg *rreg = NULL;
|
||||||
static unsigned int len = 0;
|
static unsigned int len = 0;
|
||||||
|
|
||||||
|
static void
|
||||||
|
applytag()
|
||||||
|
{
|
||||||
|
/* asserts sel != NULL */
|
||||||
|
settitle(sel);
|
||||||
|
if(!isvisible(sel))
|
||||||
|
arrange(NULL);
|
||||||
|
else
|
||||||
|
drawstatus();
|
||||||
|
}
|
||||||
|
|
||||||
/* extern */
|
/* extern */
|
||||||
|
|
||||||
Client *
|
Client *
|
||||||
|
@ -121,11 +132,7 @@ tag(Arg *arg)
|
||||||
for(i = 0; i < ntags; i++)
|
for(i = 0; i < ntags; i++)
|
||||||
sel->tags[i] = False;
|
sel->tags[i] = False;
|
||||||
sel->tags[arg->i] = True;
|
sel->tags[arg->i] = True;
|
||||||
settitle(sel);
|
applytag();
|
||||||
if(!isvisible(sel))
|
|
||||||
arrange(NULL);
|
|
||||||
else
|
|
||||||
drawstatus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -140,9 +147,5 @@ toggletag(Arg *arg)
|
||||||
for(i = 0; i < ntags && !sel->tags[i]; i++);
|
for(i = 0; i < ntags && !sel->tags[i]; i++);
|
||||||
if(i == ntags)
|
if(i == ntags)
|
||||||
sel->tags[arg->i] = True;
|
sel->tags[arg->i] = True;
|
||||||
settitle(sel);
|
applytag();
|
||||||
if(!isvisible(sel))
|
|
||||||
arrange(NULL);
|
|
||||||
else
|
|
||||||
drawstatus();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue