about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/dwm.c b/dwm.c
index 02c30d4..88391af 100644
--- a/dwm.c
+++ b/dwm.c
@@ -165,7 +165,6 @@ void restack(void);
 void run(void);
 void scan(void);
 void setclientstate(Client *c, long state);
-void setlayout(const char *arg);
 void setmfact(const char *arg);
 void setup(void);
 void spawn(const char *arg);
@@ -179,6 +178,7 @@ void tileresize(Client *c, int x, int y, int w, int h);
 void tilev(void);
 void tilevstack(unsigned int n);
 void togglefloating(const char *arg);
+void togglelayout(const char *arg);
 void toggletag(const char *arg);
 void toggleview(const char *arg);
 void unban(Client *c);
@@ -335,7 +335,7 @@ buttonpress(XEvent *e) {
 			}
 		}
 		if((ev->x < x + blw) && ev->button == Button1) 
-			setlayout(NULL);
+			togglelayout(NULL);
 	}
 	else if((c = getclient(ev->window))) {
 		focus(c);
@@ -1376,28 +1376,6 @@ setclientstate(Client *c, long state) {
 }
 
 void
-setlayout(const char *arg) {
-	unsigned int i;
-
-	if(!arg) {
-		if(++lt == &layouts[LENGTH(layouts)])
-			lt = &layouts[0];
-	}
-	else {
-		for(i = 0; i < LENGTH(layouts); i++)
-			if(!strcmp(arg, layouts[i].symbol))
-				break;
-		if(i == LENGTH(layouts))
-			return;
-		lt = &layouts[i];
-	}
-	if(sel)
-		arrange();
-	else
-		drawbar();
-}
-
-void
 setmfact(const char *arg) {
 	double d;
 
@@ -1636,6 +1614,28 @@ togglefloating(const char *arg) {
 }
 
 void
+togglelayout(const char *arg) {
+	unsigned int i;
+
+	if(!arg) {
+		if(++lt == &layouts[LENGTH(layouts)])
+			lt = &layouts[0];
+	}
+	else {
+		for(i = 0; i < LENGTH(layouts); i++)
+			if(!strcmp(arg, layouts[i].symbol))
+				break;
+		if(i == LENGTH(layouts))
+			return;
+		lt = &layouts[i];
+	}
+	if(sel)
+		arrange();
+	else
+		drawbar();
+}
+
+void
 toggletag(const char *arg) {
 	unsigned int i, j;
 
26148ca21cd5cb8e681c7e'>^
efdc7b16 ^














1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101