applied Ph's patch regarding geom and lt initialization
5fa559db
1 file(s) · +4 −8
| 239 | 239 | Cursor cursor[CurLast]; |
|
| 240 | 240 | Display *dpy; |
|
| 241 | 241 | DC dc = {0}; |
|
| 242 | - | Geom *geom = NULL; |
|
| 243 | - | Layout *lt = NULL; |
|
| 244 | 242 | Window root, barwin; |
|
| 245 | 243 | ||
| 246 | 244 | /* configuration, allows nested code to access above variables */ |
|
| 247 | 245 | #include "config.h" |
|
| 248 | 246 | #define TAGSZ (LENGTH(tags) * sizeof(Bool)) |
|
| 249 | - | static Bool tmp[LENGTH(tags)]; |
|
| 247 | + | Bool tmp[LENGTH(tags)]; |
|
| 248 | + | Layout *lt = layouts; |
|
| 249 | + | Geom *geom = geoms; |
|
| 250 | 250 | ||
| 251 | 251 | /* function implementations */ |
|
| 252 | 252 | ||
| 264 | 264 | if((!r->title || strstr(c->name, r->title)) |
|
| 265 | 265 | && (!r->class || (ch.res_class && strstr(ch.res_class, r->class))) |
|
| 266 | 266 | && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) { |
|
| 267 | - | { |
|
| 268 | 267 | c->isfloating = r->isfloating; |
|
| 269 | 268 | if(r->tag) { |
|
| 270 | 269 | c->tags[idxoftag(r->tag)] = True; |
|
| 1483 | 1482 | sh = DisplayHeight(dpy, screen); |
|
| 1484 | 1483 | bh = dc.font.height + 2; |
|
| 1485 | 1484 | mfact = MFACT; |
|
| 1486 | - | geom = &geoms[0]; |
|
| 1487 | 1485 | geom->apply(); |
|
| 1488 | 1486 | ||
| 1489 | 1487 | /* init atoms */ |
|
| 1518 | 1516 | seltags = emallocz(TAGSZ); |
|
| 1519 | 1517 | prevtags = emallocz(TAGSZ); |
|
| 1520 | 1518 | seltags[0] = prevtags[0] = True; |
|
| 1521 | - | ||
| 1522 | - | /* init layouts */ |
|
| 1523 | - | lt = &layouts[0]; |
|
| 1524 | 1519 | ||
| 1525 | 1520 | /* init bar */ |
|
| 1526 | 1521 | for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) { |
|
| 1934 | 1929 | XCloseDisplay(dpy); |
|
| 1935 | 1930 | return 0; |
|
| 1936 | 1931 | } |
|
| 1932 | + | ||