I change the style of init somewhat, init as early as possible.

new_dwm
Anselm R. Garbe 18 years ago
parent ff957d1eac
commit 4bf3b01953

@ -16,7 +16,9 @@
char stext[256]; char stext[256];
int screen, sx, sy, sw, sh, wax, way, waw, wah; 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]; Atom wmatom[WMLast], netatom[NetLast];
Bool *seltag; Bool *seltag;
Bool selscreen = True; Bool selscreen = True;
@ -149,7 +151,6 @@ setup(void) {
cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing);
cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
/* init modifier map */ /* init modifier map */
numlockmask = 0;
modmap = XGetModifierMapping(dpy); modmap = XGetModifierMapping(dpy);
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
for (j = 0; j < modmap->max_keypermod; j++) { for (j = 0; j < modmap->max_keypermod; j++) {
@ -191,7 +192,6 @@ setup(void) {
DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen),
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
XDefineCursor(dpy, barwin, cursor[CurNormal]); XDefineCursor(dpy, barwin, cursor[CurNormal]);
bpos = BARPOS;
updatebarpos(); updatebarpos();
XMapRaised(dpy, barwin); XMapRaised(dpy, barwin);
strcpy(stext, "dwm-"VERSION); strcpy(stext, "dwm-"VERSION);

Loading…
Cancel
Save