applied Ph's patch regarding geom and lt initialization
This commit is contained in:
parent
146ff227fe
commit
5fa559dbfc
12
dwm.c
12
dwm.c
@ -239,14 +239,14 @@ Client *stack = NULL;
|
|||||||
Cursor cursor[CurLast];
|
Cursor cursor[CurLast];
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
DC dc = {0};
|
DC dc = {0};
|
||||||
Geom *geom = NULL;
|
|
||||||
Layout *lt = NULL;
|
|
||||||
Window root, barwin;
|
Window root, barwin;
|
||||||
|
|
||||||
/* configuration, allows nested code to access above variables */
|
/* configuration, allows nested code to access above variables */
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#define TAGSZ (LENGTH(tags) * sizeof(Bool))
|
#define TAGSZ (LENGTH(tags) * sizeof(Bool))
|
||||||
static Bool tmp[LENGTH(tags)];
|
Bool tmp[LENGTH(tags)];
|
||||||
|
Layout *lt = layouts;
|
||||||
|
Geom *geom = geoms;
|
||||||
|
|
||||||
/* function implementations */
|
/* function implementations */
|
||||||
|
|
||||||
@ -264,7 +264,6 @@ applyrules(Client *c) {
|
|||||||
if((!r->title || strstr(c->name, r->title))
|
if((!r->title || strstr(c->name, r->title))
|
||||||
&& (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
|
&& (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
|
||||||
&& (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
|
&& (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
|
||||||
{
|
|
||||||
c->isfloating = r->isfloating;
|
c->isfloating = r->isfloating;
|
||||||
if(r->tag) {
|
if(r->tag) {
|
||||||
c->tags[idxoftag(r->tag)] = True;
|
c->tags[idxoftag(r->tag)] = True;
|
||||||
@ -1483,7 +1482,6 @@ setup(void) {
|
|||||||
sh = DisplayHeight(dpy, screen);
|
sh = DisplayHeight(dpy, screen);
|
||||||
bh = dc.font.height + 2;
|
bh = dc.font.height + 2;
|
||||||
mfact = MFACT;
|
mfact = MFACT;
|
||||||
geom = &geoms[0];
|
|
||||||
geom->apply();
|
geom->apply();
|
||||||
|
|
||||||
/* init atoms */
|
/* init atoms */
|
||||||
@ -1519,9 +1517,6 @@ setup(void) {
|
|||||||
prevtags = emallocz(TAGSZ);
|
prevtags = emallocz(TAGSZ);
|
||||||
seltags[0] = prevtags[0] = True;
|
seltags[0] = prevtags[0] = True;
|
||||||
|
|
||||||
/* init layouts */
|
|
||||||
lt = &layouts[0];
|
|
||||||
|
|
||||||
/* init bar */
|
/* init bar */
|
||||||
for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
|
for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
|
||||||
w = textw(layouts[i].symbol);
|
w = textw(layouts[i].symbol);
|
||||||
@ -1934,3 +1929,4 @@ main(int argc, char *argv[]) {
|
|||||||
XCloseDisplay(dpy);
|
XCloseDisplay(dpy);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user