[hackers] [dwm] I change the style of init somewhat, init as early as possible.

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Wed Jun 06 11:20:07 2007

changeset: 917:434e10a35d3c
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Wed Jun 06 11:17:56 2007 +0200
summary: I change the style of init somewhat, init as early as possible.

diff -r b0dfa4fe6c63 -r 434e10a35d3c main.c
--- a/main.c Mon Jun 04 14:38:24 2007 +0200
+++ b/main.c Wed Jun 06 11:17:56 2007 +0200
@@ -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);
Received on Wed Jun 06 2007 - 11:20:07 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:16 UTC