about summary refs log tree commit diff stats
path: root/main.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-20 13:56:21 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-20 13:56:21 +0100
commitd180ba418cd56f3a743d9a5863f86f7eae21602f (patch)
treed1d8936d9d97a49577163f6e8be13af713753dd8 /main.c
parent138b7fbd0563e176e4f4dce8ac771263f74ff6cb (diff)
downloaddwm-d180ba418cd56f3a743d9a5863f86f7eae21602f.tar.gz
renamed setfont to initfont, getcolor to initcolor
Diffstat (limited to 'main.c')
-rw-r--r--main.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/main.c b/main.c
index 1015017..73b713f 100644
--- a/main.c
+++ b/main.c
@@ -62,7 +62,7 @@ cleanup(void) {
 }
 
 static unsigned long
-getcolor(const char *colstr) {
+initcolor(const char *colstr) {
 	Colormap cmap = DefaultColormap(dpy, screen);
 	XColor color;
 
@@ -72,27 +72,7 @@ getcolor(const char *colstr) {
 }
 
 static void
-scan(void) {
-	unsigned int i, num;
-	Window *wins, d1, d2;
-	XWindowAttributes wa;
-
-	wins = NULL;
-	if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) {
-		for(i = 0; i < num; i++) {
-			if(!XGetWindowAttributes(dpy, wins[i], &wa)
-			|| wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))
-				continue;
-			if(wa.map_state == IsViewable)
-				manage(wins[i], &wa);
-		}
-	}
-	if(wins)
-		XFree(wins);
-}
-
-static void
-setfont(const char *fontstr) {
+initfont(const char *fontstr) {
 	char *def, **missing;
 	int i, n;
 
@@ -133,6 +113,26 @@ setfont(const char *fontstr) {
 }
 
 static void
+scan(void) {
+	unsigned int i, num;
+	Window *wins, d1, d2;
+	XWindowAttributes wa;
+
+	wins = NULL;
+	if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) {
+		for(i = 0; i < num; i++) {
+			if(!XGetWindowAttributes(dpy, wins[i], &wa)
+			|| wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))
+				continue;
+			if(wa.map_state == IsViewable)
+				manage(wins[i], &wa);
+		}
+	}
+	if(wins)
+		XFree(wins);
+}
+
+static void
 setup(void) {
 	int i, j;
 	unsigned int mask;
@@ -173,13 +173,13 @@ setup(void) {
 	seltag = emallocz(sizeof(Bool) * ntags);
 	seltag[0] = True;
 	/* style */
-	dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR);
-	dc.norm[ColBG] = getcolor(NORMBGCOLOR);
-	dc.norm[ColFG] = getcolor(NORMFGCOLOR);
-	dc.sel[ColBorder] = getcolor(SELBORDERCOLOR);
-	dc.sel[ColBG] = getcolor(SELBGCOLOR);
-	dc.sel[ColFG] = getcolor(SELFGCOLOR);
-	setfont(FONT);
+	dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR);
+	dc.norm[ColBG] = initcolor(NORMBGCOLOR);
+	dc.norm[ColFG] = initcolor(NORMFGCOLOR);
+	dc.sel[ColBorder] = initcolor(SELBORDERCOLOR);
+	dc.sel[ColBG] = initcolor(SELBGCOLOR);
+	dc.sel[ColFG] = initcolor(SELFGCOLOR);
+	initfont(FONT);
 	/* geometry */
 	sx = sy = 0;
 	sw = DisplayWidth(dpy, screen);