about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--dwm.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index cd7c9e5..7d2a0de 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1,4 +1,33 @@
-/* See LICENSE file for copyright and license details. */
+/* See LICENSE file for copyright and license details.
+ *
+ * dynamic window manager is designed like any other X client as well. It is
+ * driven through handling X events. In contrast to other X clients, a window
+ * manager selects for SubstructureRedirectMask on the root window, to receive
+ * events about window (dis-)appearance.  Only one X connection at a time is
+ * allowed to select for this event mask.
+ *
+ * Calls to fetch an X event from the event queue are blocking.  Due reading
+ * status text from standard input, a select()-driven main loop has been
+ * implemented which selects for reads on the X connection and STDIN_FILENO to
+ * handle all data smoothly. The event handlers of dwm are organized in an
+ * array which is accessed whenever a new event has been fetched. This allows
+ * event dispatching in O(1) time.
+ *
+ * Each child of the root window is called a client, except windows which have
+ * set the override_redirect flag.  Clients are organized in a global
+ * doubly-linked client list, the focus history is remembered through a global
+ * stack list. Each client contains an array of Bools of the same size as the
+ * global tags array to indicate the tags of a client.  For each client dwm
+ * creates a small title window, which is resized whenever the (_NET_)WM_NAME
+ * properties are updated or the client is moved/resized.
+ *
+ * Keys and tagging rules are organized as arrays and defined in the config.h
+ * file. These arrays are kept static in event.o and tag.o respectively,
+ * because no other part of dwm needs access to them.  The current layout is
+ * represented by the lt pointer.
+ *
+ * To understand everything else, start reading main().
+ */
 #include <errno.h>
 #include <locale.h>
 #include <regex.h>
lass='oid'>ce859d8c1 ^
08c0ba379 ^






644d645ea ^
08c0ba379 ^
8ef66b973 ^





29a916696 ^


8ef66b973 ^


8ef66b973 ^
8ef66b973 ^
db56174a1 ^
40ec7be45 ^
db56174a1 ^
ce859d8c1 ^
8ef66b973 ^




29a916696 ^

8ef66b973 ^










2962ca789 ^

050789a8f ^
08c0ba379 ^
78f4aacde ^



ce859d8c1 ^
78f4aacde ^

47335aab4 ^
78f4aacde ^
a8e12afc7 ^
669a56449 ^
050789a8f ^
bf6c2c5cc ^
050789a8f ^
92b8fac94 ^
050789a8f ^
4f1725ad6 ^
78f4aacde ^

4f1725ad6 ^
08c0ba379 ^
52b241fd5 ^


bc0183509 ^
52b241fd5 ^
bc0183509 ^
52b241fd5 ^
















050789a8f ^
e4081a720 ^
bc0183509 ^
050789a8f ^
bc0183509 ^





cd0256136 ^
bc0183509 ^
52b241fd5 ^
bc0183509 ^





6a9baf3fd ^
154874385 ^
6a9baf3fd ^
bc0183509 ^
afddae5aa ^
bc0183509 ^
6a9baf3fd ^
bc0183509 ^
9574d318a ^
bc0183509 ^

ce859d8c1 ^
9574d318a ^
bc0183509 ^


9574d318a ^
bc0183509 ^
e7f37d722 ^
e4081a720 ^
b407f083b ^

050789a8f ^
6a9baf3fd ^
ce859d8c1 ^
2a7fc84c8 ^
6a9baf3fd ^
efb53233c ^
050789a8f ^
6db20a4be ^
050789a8f ^
afddae5aa ^
badb6c0f6 ^

050789a8f ^
efb53233c ^
badb6c0f6 ^
efb53233c ^

4fbba0a65 ^

674a1110f ^
3163a0f46 ^
30b098fca ^

a4e2b0c15 ^
674a1110f ^
ce859d8c1 ^
674a1110f ^
4fbba0a65 ^
9a7f0cd85 ^


08c0ba379 ^
b5b5e6e76 ^
08c0ba379 ^
ce859d8c1 ^
b5b5e6e76 ^
08c0ba379 ^
b5b5e6e76 ^


ce859d8c1 ^
9a7f0cd85 ^
08c0ba379 ^
40ec7be45 ^
de6198c74 ^
9a7f0cd85 ^

b5b5e6e76 ^
2b8bf8fc4 ^
bdcb72959 ^


9a7f0cd85 ^

01ae0d28d ^
9a7f0cd85 ^
8c6290342 ^
5d63ecb3a ^
8d714d2b0 ^











050789a8f ^
8d714d2b0 ^
050789a8f ^
8d714d2b0 ^







050789a8f ^
8d714d2b0 ^

050789a8f ^
8d714d2b0 ^

050789a8f ^
8d714d2b0 ^
050789a8f ^

8d714d2b0 ^

08c0ba379 ^
2962ca789 ^

08c0ba379 ^
050789a8f ^
ab26298a0 ^
08c0ba379 ^
050789a8f ^
08c0ba379 ^
8ef66b973 ^

b407f083b ^




2962ca789 ^
efb53233c ^
af792da0b ^
050789a8f ^

78f4aacde ^
4fbba0a65 ^
8d714d2b0 ^
0257f389f ^
8c6290342 ^
9a7f0cd85 ^
105a0616a ^


ed0d9e271 ^

5d63ecb3a ^
ce859d8c1 ^
4be0d1652 ^
a325692fb ^
4be0d1652 ^
ce859d8c1 ^
4be0d1652 ^


2962ca789 ^
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288