changeset 960 | b5f856fcef4c |
parent 953 | d7de5c7bdbe4 |
child 964 | 777a9d9ce70b |
959:0aeefb841608 | 960:b5f856fcef4c |
---|---|
19 int screen, sx, sy, sw, sh, wax, way, waw, wah; |
19 int screen, sx, sy, sw, sh, wax, way, waw, wah; |
20 unsigned int bh, ntags; |
20 unsigned int bh, ntags; |
21 unsigned int bpos = BARPOS; |
21 unsigned int bpos = BARPOS; |
22 unsigned int numlockmask = 0; |
22 unsigned int numlockmask = 0; |
23 Atom dwmconfig, wmatom[WMLast], netatom[NetLast]; |
23 Atom dwmconfig, wmatom[WMLast], netatom[NetLast]; |
24 Bool *seltag; |
24 Bool *seltags; |
25 Bool selscreen = True; |
25 Bool selscreen = True; |
26 Client *clients = NULL; |
26 Client *clients = NULL; |
27 Client *sel = NULL; |
27 Client *sel = NULL; |
28 Client *stack = NULL; |
28 Client *stack = NULL; |
29 Cursor cursor[CurLast]; |
29 Cursor cursor[CurLast]; |
55 XFreeCursor(dpy, cursor[CurNormal]); |
55 XFreeCursor(dpy, cursor[CurNormal]); |
56 XFreeCursor(dpy, cursor[CurResize]); |
56 XFreeCursor(dpy, cursor[CurResize]); |
57 XFreeCursor(dpy, cursor[CurMove]); |
57 XFreeCursor(dpy, cursor[CurMove]); |
58 XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); |
58 XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); |
59 XSync(dpy, False); |
59 XSync(dpy, False); |
60 free(seltag); |
60 free(seltags); |
61 } |
61 } |
62 |
62 |
63 static unsigned long |
63 static unsigned long |
64 initcolor(const char *colstr) { |
64 initcolor(const char *colstr) { |
65 Colormap cmap = DefaultColormap(dpy, screen); |
65 Colormap cmap = DefaultColormap(dpy, screen); |
168 XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); |
168 XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); |
169 XSelectInput(dpy, root, wa.event_mask); |
169 XSelectInput(dpy, root, wa.event_mask); |
170 grabkeys(); |
170 grabkeys(); |
171 compileregs(); |
171 compileregs(); |
172 for(ntags = 0; tags[ntags]; ntags++); |
172 for(ntags = 0; tags[ntags]; ntags++); |
173 seltag = emallocz(sizeof(Bool) * ntags); |
173 seltags = emallocz(sizeof(Bool) * ntags); |
174 seltag[0] = True; |
174 seltags[0] = True; |
175 /* style */ |
175 /* style */ |
176 dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR); |
176 dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR); |
177 dc.norm[ColBG] = initcolor(NORMBGCOLOR); |
177 dc.norm[ColBG] = initcolor(NORMBGCOLOR); |
178 dc.norm[ColFG] = initcolor(NORMFGCOLOR); |
178 dc.norm[ColFG] = initcolor(NORMFGCOLOR); |
179 dc.sel[ColBorder] = initcolor(SELBORDERCOLOR); |
179 dc.sel[ColBorder] = initcolor(SELBORDERCOLOR); |