# HG changeset patch # User anselm@anselm1 # Date 1208712239 -3600 # Node ID 22d8c2fb999fb35d6ca0a8948fc561aa1a09ed50 # Parent 44df4a068f31589d44737bc422afc5f00b2d48a7 applied Ph's patch regarding geom and lt initialization diff -r 44df4a068f31 -r 22d8c2fb999f dwm.c --- a/dwm.c Sun Apr 20 18:17:33 2008 +0100 +++ b/dwm.c Sun Apr 20 18:23:59 2008 +0100 @@ -239,14 +239,14 @@ 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 @@ 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 @@ sh = DisplayHeight(dpy, screen); bh = dc.font.height + 2; mfact = MFACT; - geom = &geoms[0]; geom->apply(); /* init atoms */ @@ -1519,9 +1517,6 @@ 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 @@ XCloseDisplay(dpy); return 0; } +