about summary refs log tree commit diff stats
path: root/float.c
diff options
context:
space:
mode:
Diffstat (limited to 'float.c')
-rw-r--r--float.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/float.c b/float.c
new file mode 100644
index 0000000..25bec69
--- /dev/null
+++ b/float.c
@@ -0,0 +1,41 @@
+/* See LICENSE file for copyright and license details. */
+#include "dwm.h"
+
+/* extern */
+
+void
+floating(void) {
+	Client *c;
+
+	if(lt->arrange != floating)
+		return;
+
+	for(c = clients; c; c = c->next)
+		if(isvisible(c)) {
+			unban(c);
+			resize(c, c->x, c->y, c->w, c->h, True);
+		}
+		else
+			ban(c);
+	focus(NULL);
+	restack();
+}
+
+void
+togglemax(const char *arg) {
+	XEvent ev;
+
+	if(!sel || (lt->arrange != floating && !sel->isfloating) || sel->isfixed)
+		return;
+	if((sel->ismax = !sel->ismax)) {
+		sel->rx = sel->x;
+		sel->ry = sel->y;
+		sel->rw = sel->w;
+		sel->rh = sel->h;
+		resize(sel, wax, way, waw - 2 * sel->border, wah - 2 * sel->border, True);
+	}
+	else
+		resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True);
+	drawstatus();
+	while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+}
h=devel&id=ca4b971bc81b2e751e0388d80896fde7079b1679'>ca4b971bc ^
fe0f10f6b ^
0879f0b0a ^
0879f0b0a ^
1b1bb284d ^
0879f0b0a ^

5263d9d6f ^
93e03144f ^
1b1bb284d ^





2f48dbd16 ^
0879f0b0a ^
a1203cf84 ^
d20a8ac68 ^
b2e486b23 ^
9af85fb69 ^
1b1bb284d ^
1dd9ec85b ^
f2f16f645 ^






ca4b971bc ^
f2f16f645 ^


f04b502cf ^

9b29436f6 ^
f04b502cf ^

5a4122dc9 ^
809a4a77a ^

e9b665f33 ^

c60bb9464 ^
e9b665f33 ^

f04b502cf ^
1b1bb284d ^
809a4a77a ^

dce0b3b00 ^
b77ae66e8 ^
dce0b3b00 ^
644318ad9 ^
dce0b3b00 ^
93cd98dd1 ^
b7dd8e7df ^
5263d9d6f ^



035f0fb02 ^
25b4a0ab0 ^
035f0fb02 ^

8d2953e80 ^
e9b665f33 ^
a5ecbf823 ^

25b4a0ab0 ^


606288974 ^
25b4a0ab0 ^
4a720394b ^


16e800503 ^

4a720394b ^
88b5dd336 ^
c5c6bae2a ^

e5ae7ceaa ^
6e4cd3e5b ^

e5ae7ceaa ^

1b54be777 ^
567691220 ^

58282547f ^


44f672a51 ^

2844ac8b5 ^
2bb7277a6 ^
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
102
103
104
105
106
107
108
109
110
111
112
113
114