summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-08-31 08:48:04 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-08-31 08:48:04 +0200
commit4c368bcd24172166aab32948fc63feaa6a1bec93 (patch)
treedddc175fd0f072d6b7ea09a9b91cbcdf8f9f64d6
parentsmall fix in config.arg.h (diff)
downloaddwm-4c368bcd24172166aab32948fc63feaa6a1bec93.tar.gz
dwm-4c368bcd24172166aab32948fc63feaa6a1bec93.zip
applied sanders patch to remove unnecessary commit()
Diffstat (limited to '')
-rw-r--r--config.mk2
-rw-r--r--tag.c15
-rw-r--r--view.c8
3 files changed, 9 insertions, 16 deletions
diff --git a/config.mk b/config.mk
index 262fbde..af775ae 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,5 @@
1# dwm version 1# dwm version
2VERSION = 1.2 2VERSION = 1.3
3 3
4# Customize below to fit your system 4# Customize below to fit your system
5 5
diff --git a/tag.c b/tag.c
index b7c06de..dcda6dc 100644
--- a/tag.c
+++ b/tag.c
@@ -30,17 +30,6 @@ RULES
30static RReg *rreg = NULL; 30static RReg *rreg = NULL;
31static unsigned int len = 0; 31static unsigned int len = 0;
32 32
33static void
34commit()
35{
36 /* asserts sel != NULL */
37 settitle(sel);
38 if(!isvisible(sel))
39 arrange(NULL);
40 else
41 drawstatus();
42}
43
44/* extern */ 33/* extern */
45 34
46Client * 35Client *
@@ -132,7 +121,7 @@ tag(Arg *arg)
132 for(i = 0; i < ntags; i++) 121 for(i = 0; i < ntags; i++)
133 sel->tags[i] = False; 122 sel->tags[i] = False;
134 sel->tags[arg->i] = True; 123 sel->tags[arg->i] = True;
135 commit(); 124 arrange(NULL);
136} 125}
137 126
138void 127void
@@ -147,5 +136,5 @@ toggletag(Arg *arg)
147 for(i = 0; i < ntags && !sel->tags[i]; i++); 136 for(i = 0; i < ntags && !sel->tags[i]; i++);
148 if(i == ntags) 137 if(i == ntags)
149 sel->tags[arg->i] = True; 138 sel->tags[arg->i] = True;
150 commit(); 139 arrange(NULL);
151} 140}
diff --git a/view.c b/view.c
index 424ee5a..aa0a23a 100644
--- a/view.c
+++ b/view.c
@@ -67,7 +67,9 @@ dofloat(Arg *arg)
67 else 67 else
68 ban(c); 68 ban(c);
69 } 69 }
70 if((sel = getnext(clients))) 70 if(!sel || !isvisible(sel))
71 sel = getnext(clients);
72 if(sel)
71 focus(sel); 73 focus(sel);
72 else 74 else
73 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); 75 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
@@ -130,7 +132,9 @@ dotile(Arg *arg)
130 else 132 else
131 ban(c); 133 ban(c);
132 } 134 }
133 if((sel = getnext(clients))) 135 if(!sel || !isvisible(sel))
136 sel = getnext(clients);
137 if(sel)
134 focus(sel); 138 focus(sel);
135 else 139 else
136 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); 140 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);