Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
c3c94c0
)
applied patch similiar proposed by dave tweed
author
Anselm R. Garbe <
[email protected]
>
Tue, 29 Aug 2006 15:11:37 +0000
(17:11 +0200)
committer
Anselm R. Garbe <
[email protected]
>
Tue, 29 Aug 2006 15:11:37 +0000
(17:11 +0200)
tag.c
patch
|
blob
|
history
diff --git
a/tag.c
b/tag.c
index
a2e1c89
..
ddffafa
100644
(file)
--- a/
tag.c
+++ b/
tag.c
@@
-30,6
+30,17
@@
RULES
static RReg *rreg = NULL;
static unsigned int len = 0;
static RReg *rreg = NULL;
static unsigned int len = 0;
+static void
+applytag()
+{
+ /* asserts sel != NULL */
+ settitle(sel);
+ if(!isvisible(sel))
+ arrange(NULL);
+ else
+ drawstatus();
+}
+
/* extern */
Client *
/* extern */
Client *
@@
-121,11
+132,7
@@
tag(Arg *arg)
for(i = 0; i < ntags; i++)
sel->tags[i] = False;
sel->tags[arg->i] = True;
for(i = 0; i < ntags; i++)
sel->tags[i] = False;
sel->tags[arg->i] = True;
- settitle(sel);
- if(!isvisible(sel))
- arrange(NULL);
- else
- drawstatus();
+ applytag();
}
void
}
void
@@
-140,9
+147,5
@@
toggletag(Arg *arg)
for(i = 0; i < ntags && !sel->tags[i]; i++);
if(i == ntags)
sel->tags[arg->i] = True;
for(i = 0; i < ntags && !sel->tags[i]; i++);
if(i == ntags)
sel->tags[arg->i] = True;
- settitle(sel);
- if(!isvisible(sel))
- arrange(NULL);
- else
- drawstatus();
+ applytag();
}
}