diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-02-21 11:45:51 +0100 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-02-21 11:45:51 +0100 |
| commit | 52f0b9e2e3e7eba1e7d2b940863d9a72fa8112d6 (patch) | |
| tree | 5b304916446359a964c8ba03bbab946dfdb573d7 /main.c | |
| parent | moved focus{next,prev} and nexttiled from client.c to layout.c (because those... (diff) | |
| download | dwm-52f0b9e2e3e7eba1e7d2b940863d9a72fa8112d6.tar.gz dwm-52f0b9e2e3e7eba1e7d2b940863d9a72fa8112d6.zip | |
removed some global vars which should be static instead
Diffstat (limited to '')
| -rw-r--r-- | main.c | 11 |
1 files changed, 5 insertions, 6 deletions
| @@ -18,10 +18,9 @@ | |||
| 18 | /* extern */ | 18 | /* extern */ |
| 19 | 19 | ||
| 20 | char stext[256]; | 20 | char stext[256]; |
| 21 | int screen, sx, sy, sw, sh, wax, way, waw, wah; | 21 | int screen, sw, sh, wax, way, waw, wah; |
| 22 | unsigned int bh, ntags, numlockmask; | 22 | unsigned int bh, ntags, numlockmask; |
| 23 | Atom wmatom[WMLast], netatom[NetLast]; | 23 | Atom wmatom[WMLast], netatom[NetLast]; |
| 24 | Bool running = True; | ||
| 25 | Bool *seltag; | 24 | Bool *seltag; |
| 26 | Bool selscreen = True; | 25 | Bool selscreen = True; |
| 27 | Client *clients = NULL; | 26 | Client *clients = NULL; |
| @@ -36,6 +35,7 @@ Window root, barwin; | |||
| 36 | 35 | ||
| 37 | static int (*xerrorxlib)(Display *, XErrorEvent *); | 36 | static int (*xerrorxlib)(Display *, XErrorEvent *); |
| 38 | static Bool otherwm, readin; | 37 | static Bool otherwm, readin; |
| 38 | static Bool running = True; | ||
| 39 | 39 | ||
| 40 | static void | 40 | static void |
| 41 | cleanup(void) { | 41 | cleanup(void) { |
| @@ -181,7 +181,6 @@ setup(void) { | |||
| 181 | dc.sel[ColFG] = initcolor(SELFGCOLOR); | 181 | dc.sel[ColFG] = initcolor(SELFGCOLOR); |
| 182 | initfont(FONT); | 182 | initfont(FONT); |
| 183 | /* geometry */ | 183 | /* geometry */ |
| 184 | sx = sy = 0; | ||
| 185 | sw = DisplayWidth(dpy, screen); | 184 | sw = DisplayWidth(dpy, screen); |
| 186 | sh = DisplayHeight(dpy, screen); | 185 | sh = DisplayHeight(dpy, screen); |
| 187 | initlayouts(); | 186 | initlayouts(); |
| @@ -190,15 +189,15 @@ setup(void) { | |||
| 190 | wa.override_redirect = 1; | 189 | wa.override_redirect = 1; |
| 191 | wa.background_pixmap = ParentRelative; | 190 | wa.background_pixmap = ParentRelative; |
| 192 | wa.event_mask = ButtonPressMask | ExposureMask; | 191 | wa.event_mask = ButtonPressMask | ExposureMask; |
| 193 | barwin = XCreateWindow(dpy, root, sx, sy + (TOPBAR ? 0 : sh - bh), sw, bh, 0, | 192 | barwin = XCreateWindow(dpy, root, 0, (TOPBAR ? 0 : sh - bh), sw, bh, 0, |
| 194 | DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), | 193 | DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), |
| 195 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); | 194 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); |
| 196 | XDefineCursor(dpy, barwin, cursor[CurNormal]); | 195 | XDefineCursor(dpy, barwin, cursor[CurNormal]); |
| 197 | XMapRaised(dpy, barwin); | 196 | XMapRaised(dpy, barwin); |
| 198 | strcpy(stext, "dwm-"VERSION); | 197 | strcpy(stext, "dwm-"VERSION); |
| 199 | /* windowarea */ | 198 | /* windowarea */ |
| 200 | wax = sx; | 199 | wax = 0; |
| 201 | way = sy + (TOPBAR ? bh : 0); | 200 | way = (TOPBAR ? bh : 0); |
| 202 | wah = sh - bh; | 201 | wah = sh - bh; |
| 203 | waw = sw; | 202 | waw = sw; |
| 204 | /* pixmap for everything */ | 203 | /* pixmap for everything */ |
