summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranselm@anselm1 <unknown>2008-04-20 18:23:59 +0100
committeranselm@anselm1 <unknown>2008-04-20 18:23:59 +0100
commit5fa559dbfc6238a911c210ae4124586c6886df23 (patch)
tree4693d4c6a64a091a4a03db00971e555720baa683
parent146ff227fe0d231bcfc59268364461ab8850c5fe (diff)
downloaddwm-5fa559dbfc6238a911c210ae4124586c6886df23.tar.gz
applied Ph's patch regarding geom and lt initialization
-rw-r--r--dwm.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/dwm.c b/dwm.c
index 852f7ac..c174994 100644
--- a/dwm.c
+++ b/dwm.c
@@ -239,14 +239,14 @@ Client *stack = NULL;
Cursor cursor[CurLast];
Display *dpy;
DC dc = {0};
-Geom *geom = NULL;
-Layout *lt = NULL;
Window root, barwin;
/* configuration, allows nested code to access above variables */
#include "config.h"
#define TAGSZ (LENGTH(tags) * sizeof(Bool))
-static Bool tmp[LENGTH(tags)];
+Bool tmp[LENGTH(tags)];
+Layout *lt = layouts;
+Geom *geom = geoms;
/* function implementations */
@@ -264,7 +264,6 @@ applyrules(Client *c) {
if((!r->title || strstr(c->name, r->title))
&& (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
&& (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
- {
c->isfloating = r->isfloating;
if(r->tag) {
c->tags[idxoftag(r->tag)] = True;
@@ -1483,7 +1482,6 @@ setup(void) {
sh = DisplayHeight(dpy, screen);
bh = dc.font.height + 2;
mfact = MFACT;
- geom = &geoms[0];
geom->apply();
/* init atoms */
@@ -1519,9 +1517,6 @@ setup(void) {
prevtags = emallocz(TAGSZ);
seltags[0] = prevtags[0] = True;
- /* init layouts */
- lt = &layouts[0];
-
/* init bar */
for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
w = textw(layouts[i].symbol);
@@ -1934,3 +1929,4 @@ main(int argc, char *argv[]) {
XCloseDisplay(dpy);
return 0;
}
+