summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-12-08 20:11:56 +0100
committerAnselm R. Garbe <garbeam@gmail.com>2007-12-08 20:11:56 +0100
commitd66ad1457e6b1e3fc18c01767fdb499acaef3c8e (patch)
tree1b8f5d8ccda22f343d402159211b1b900e6f95e8 /dwm.c
parentnext version will be 4.8 (diff)
downloaddwm-d66ad1457e6b1e3fc18c01767fdb499acaef3c8e.tar.gz
dwm-d66ad1457e6b1e3fc18c01767fdb499acaef3c8e.zip
implemented reapply for re-applying the tagging rules during runtime, Mod-r
Diffstat (limited to '')
-rw-r--r--dwm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index 53e5cb2..0af37d6 100644
--- a/dwm.c
+++ b/dwm.c
@@ -161,6 +161,7 @@ void movemouse(Client *c);
161Client *nexttiled(Client *c); 161Client *nexttiled(Client *c);
162void propertynotify(XEvent *e); 162void propertynotify(XEvent *e);
163void quit(const char *arg); 163void quit(const char *arg);
164void reapply(const char *arg);
164void resize(Client *c, int x, int y, int w, int h, Bool sizehints); 165void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
165void resizemouse(Client *c); 166void resizemouse(Client *c);
166void restack(void); 167void restack(void);
@@ -1159,6 +1160,17 @@ quit(const char *arg) {
1159 readin = running = False; 1160 readin = running = False;
1160} 1161}
1161 1162
1163void
1164reapply(const char *arg) {
1165 static Bool zerotags[LENGTH(tags)] = { 0 };
1166 Client *c;
1167
1168 for(c = clients; c; c = c->next) {
1169 memcpy(c->tags, zerotags, sizeof zerotags);
1170 applyrules(c);
1171 }
1172 arrange();
1173}
1162 1174
1163void 1175void
1164resize(Client *c, int x, int y, int w, int h, Bool sizehints) { 1176resize(Client *c, int x, int y, int w, int h, Bool sizehints) {