diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-06-06 11:17:56 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-06-06 11:17:56 +0200 |
| commit | 4bf3b019535da3aa14cfccebd65ea726cbd15862 (patch) | |
| tree | bfbb9877a5eb386f3d7e8870aa97edf7bbc00cab /main.c | |
| parent | uncommented creatnotify (diff) | |
| download | dwm-4bf3b019535da3aa14cfccebd65ea726cbd15862.tar.gz dwm-4bf3b019535da3aa14cfccebd65ea726cbd15862.zip | |
I change the style of init somewhat, init as early as possible.
Diffstat (limited to '')
| -rw-r--r-- | main.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -16,7 +16,9 @@ | |||
| 16 | 16 | ||
| 17 | char stext[256]; | 17 | char stext[256]; |
| 18 | int screen, sx, sy, sw, sh, wax, way, waw, wah; | 18 | int screen, sx, sy, sw, sh, wax, way, waw, wah; |
| 19 | unsigned int bh, bpos, ntags, numlockmask; | 19 | unsigned int bh, ntags; |
| 20 | unsigned int bpos = BARPOS; | ||
| 21 | unsigned int numlockmask = 0; | ||
| 20 | Atom wmatom[WMLast], netatom[NetLast]; | 22 | Atom wmatom[WMLast], netatom[NetLast]; |
| 21 | Bool *seltag; | 23 | Bool *seltag; |
| 22 | Bool selscreen = True; | 24 | Bool selscreen = True; |
| @@ -149,7 +151,6 @@ setup(void) { | |||
| 149 | cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); | 151 | cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); |
| 150 | cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); | 152 | cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); |
| 151 | /* init modifier map */ | 153 | /* init modifier map */ |
| 152 | numlockmask = 0; | ||
| 153 | modmap = XGetModifierMapping(dpy); | 154 | modmap = XGetModifierMapping(dpy); |
| 154 | for (i = 0; i < 8; i++) | 155 | for (i = 0; i < 8; i++) |
| 155 | for (j = 0; j < modmap->max_keypermod; j++) { | 156 | for (j = 0; j < modmap->max_keypermod; j++) { |
| @@ -191,7 +192,6 @@ setup(void) { | |||
| 191 | DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), | 192 | DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), |
| 192 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); | 193 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); |
| 193 | XDefineCursor(dpy, barwin, cursor[CurNormal]); | 194 | XDefineCursor(dpy, barwin, cursor[CurNormal]); |
| 194 | bpos = BARPOS; | ||
| 195 | updatebarpos(); | 195 | updatebarpos(); |
| 196 | XMapRaised(dpy, barwin); | 196 | XMapRaised(dpy, barwin); |
| 197 | strcpy(stext, "dwm-"VERSION); | 197 | strcpy(stext, "dwm-"VERSION); |
