summaryrefslogtreecommitdiffstats
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
parentapplied Gottox' applyrules() fix (diff)
downloaddwm-5fa559dbfc6238a911c210ae4124586c6886df23.tar.gz
dwm-5fa559dbfc6238a911c210ae4124586c6886df23.zip
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;
239Cursor cursor[CurLast]; 239Cursor cursor[CurLast];
240Display *dpy; 240Display *dpy;
241DC dc = {0}; 241DC dc = {0};
242Geom *geom = NULL;
243Layout *lt = NULL;
244Window root, barwin; 242Window root, barwin;
245 243
246/* configuration, allows nested code to access above variables */ 244/* configuration, allows nested code to access above variables */
247#include "config.h" 245#include "config.h"
248#define TAGSZ (LENGTH(tags) * sizeof(Bool)) 246#define TAGSZ (LENGTH(tags) * sizeof(Bool))
249static Bool tmp[LENGTH(tags)]; 247Bool tmp[LENGTH(tags)];
248Layout *lt = layouts;
249Geom *geom = geoms;
250 250
251/* function implementations */ 251/* function implementations */
252 252
@@ -264,7 +264,6 @@ applyrules(Client *c) {
264 if((!r->title || strstr(c->name, r->title)) 264 if((!r->title || strstr(c->name, r->title))
265 && (!r->class || (ch.res_class && strstr(ch.res_class, r->class))) 265 && (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
266 && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) { 266 && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
267 {
268 c->isfloating = r->isfloating; 267 c->isfloating = r->isfloating;
269 if(r->tag) { 268 if(r->tag) {
270 c->tags[idxoftag(r->tag)] = True; 269 c->tags[idxoftag(r->tag)] = True;
@@ -1483,7 +1482,6 @@ setup(void) {
1483 sh = DisplayHeight(dpy, screen); 1482 sh = DisplayHeight(dpy, screen);
1484 bh = dc.font.height + 2; 1483 bh = dc.font.height + 2;
1485 mfact = MFACT; 1484 mfact = MFACT;
1486 geom = &geoms[0];
1487 geom->apply(); 1485 geom->apply();
1488 1486
1489 /* init atoms */ 1487 /* init atoms */
@@ -1519,9 +1517,6 @@ setup(void) {
1519 prevtags = emallocz(TAGSZ); 1517 prevtags = emallocz(TAGSZ);
1520 seltags[0] = prevtags[0] = True; 1518 seltags[0] = prevtags[0] = True;
1521 1519
1522 /* init layouts */
1523 lt = &layouts[0];
1524
1525 /* init bar */ 1520 /* init bar */
1526 for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) { 1521 for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
1527 w = textw(layouts[i].symbol); 1522 w = textw(layouts[i].symbol);
@@ -1934,3 +1929,4 @@ main(int argc, char *argv[]) {
1934 XCloseDisplay(dpy); 1929 XCloseDisplay(dpy);
1935 return 0; 1930 return 0;
1936} 1931}
1932