about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-06-06 11:17:56 +0200
committerAnselm R. Garbe <arg@suckless.org>2007-06-06 11:17:56 +0200
commit4bf3b019535da3aa14cfccebd65ea726cbd15862 (patch)
treebfbb9877a5eb386f3d7e8870aa97edf7bbc00cab
parentff957d1eaca73800e59f640351dce35e3ab67f9e (diff)
downloaddwm-4bf3b019535da3aa14cfccebd65ea726cbd15862.tar.gz
I change the style of init somewhat, init as early as possible.
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 471cfc2..d72f13d 100644
--- a/main.c
+++ b/main.c
@@ -16,7 +16,9 @@
 
 char stext[256];
 int screen, sx, sy, sw, sh, wax, way, waw, wah;
-unsigned int bh, bpos, ntags, numlockmask;
+unsigned int bh, ntags;
+unsigned int bpos = BARPOS;
+unsigned int numlockmask = 0;
 Atom wmatom[WMLast], netatom[NetLast];
 Bool *seltag;
 Bool selscreen = True;
@@ -149,7 +151,6 @@ setup(void) {
 	cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing);
 	cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
 	/* init modifier map */
-	numlockmask = 0;
 	modmap = XGetModifierMapping(dpy);
 	for (i = 0; i < 8; i++)
 		for (j = 0; j < modmap->max_keypermod; j++) {
@@ -191,7 +192,6 @@ setup(void) {
 			DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen),
 			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
 	XDefineCursor(dpy, barwin, cursor[CurNormal]);
-	bpos = BARPOS;
 	updatebarpos();
 	XMapRaised(dpy, barwin);
 	strcpy(stext, "dwm-"VERSION);
href='#n164'>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 289 290 291 292 293 294 295 296 297