diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2016-12-05 10:01:33 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2016-12-05 10:01:33 +0100 |
| commit | 975c8983762246b50026d43079c60a78b341f81c (patch) | |
| tree | ba1d30bb037c3c3c2f7d6ac6a93dc64413b20d8a /dwm.c | |
| parent | applied Markus' clarify status text padding patch (diff) | |
| download | dwm-975c8983762246b50026d43079c60a78b341f81c.tar.gz dwm-975c8983762246b50026d43079c60a78b341f81c.zip | |
applied Markus' decouple color-scheme patch
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 12 |
1 files changed, 7 insertions, 5 deletions
| @@ -60,7 +60,7 @@ | |||
| 60 | 60 | ||
| 61 | /* enums */ | 61 | /* enums */ |
| 62 | enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ | 62 | enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ |
| 63 | enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */ | 63 | enum { SchemeNorm, SchemeSel }; /* color schemes */ |
| 64 | enum { NetSupported, NetWMName, NetWMState, | 64 | enum { NetSupported, NetWMName, NetWMState, |
| 65 | NetWMFullscreen, NetActiveWindow, NetWMWindowType, | 65 | NetWMFullscreen, NetActiveWindow, NetWMWindowType, |
| 66 | NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ | 66 | NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ |
| @@ -263,7 +263,7 @@ static void (*handler[LASTEvent]) (XEvent *) = { | |||
| 263 | static Atom wmatom[WMLast], netatom[NetLast]; | 263 | static Atom wmatom[WMLast], netatom[NetLast]; |
| 264 | static int running = 1; | 264 | static int running = 1; |
| 265 | static Cur *cursor[CurLast]; | 265 | static Cur *cursor[CurLast]; |
| 266 | static Scm scheme[SchemeLast]; | 266 | static Scm *scheme; |
| 267 | static Display *dpy; | 267 | static Display *dpy; |
| 268 | static Drw *drw; | 268 | static Drw *drw; |
| 269 | static Monitor *mons, *selmon; | 269 | static Monitor *mons, *selmon; |
| @@ -483,7 +483,7 @@ cleanup(void) | |||
| 483 | cleanupmon(mons); | 483 | cleanupmon(mons); |
| 484 | for (i = 0; i < CurLast; i++) | 484 | for (i = 0; i < CurLast; i++) |
| 485 | drw_cur_free(drw, cursor[i]); | 485 | drw_cur_free(drw, cursor[i]); |
| 486 | for (i = 0; i < SchemeLast; i++) | 486 | for (i = 0; i < LENGTH(colors); i++) |
| 487 | free(scheme[i]); | 487 | free(scheme[i]); |
| 488 | drw_free(drw); | 488 | drw_free(drw); |
| 489 | XSync(dpy, False); | 489 | XSync(dpy, False); |
| @@ -1549,6 +1549,7 @@ setmfact(const Arg *arg) | |||
| 1549 | void | 1549 | void |
| 1550 | setup(void) | 1550 | setup(void) |
| 1551 | { | 1551 | { |
| 1552 | int i; | ||
| 1552 | XSetWindowAttributes wa; | 1553 | XSetWindowAttributes wa; |
| 1553 | 1554 | ||
| 1554 | /* clean up any zombies immediately */ | 1555 | /* clean up any zombies immediately */ |
| @@ -1583,8 +1584,9 @@ setup(void) | |||
| 1583 | cursor[CurResize] = drw_cur_create(drw, XC_sizing); | 1584 | cursor[CurResize] = drw_cur_create(drw, XC_sizing); |
| 1584 | cursor[CurMove] = drw_cur_create(drw, XC_fleur); | 1585 | cursor[CurMove] = drw_cur_create(drw, XC_fleur); |
| 1585 | /* init appearance */ | 1586 | /* init appearance */ |
| 1586 | scheme[SchemeNorm] = drw_scm_create(drw, colors[SchemeNorm], 3); | 1587 | scheme = ecalloc(LENGTH(colors), sizeof(Scm)); |
| 1587 | scheme[SchemeSel] = drw_scm_create(drw, colors[SchemeSel], 3); | 1588 | for (i = 0; i < LENGTH(colors); i++) |
| 1589 | scheme[i] = drw_scm_create(drw, colors[i], 3); | ||
| 1588 | /* init bars */ | 1590 | /* init bars */ |
| 1589 | updatebars(); | 1591 | updatebars(); |
| 1590 | updatestatus(); | 1592 | updatestatus(); |
