summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authoroga <oga>2008-06-15 02:47:46 +0000
committeroga <oga>2008-06-15 02:47:46 +0000
commit07cd0b1ac55f819f42b2936339843bb85e7630bb (patch)
tree0e40db1dce753062bb6d979553e426b18cb71269 /conf.c
parent96d7310b4a224d50aeb2e5e94031d14b9bd6daf5 (diff)
downloadcwm-07cd0b1ac55f819f42b2936339843bb85e7630bb.tar.gz
cwm-07cd0b1ac55f819f42b2936339843bb85e7630bb.tar.xz
cwm-07cd0b1ac55f819f42b2936339843bb85e7630bb.zip
Rip out and burn the HASH_* stuff. We don't need a SPLAY tree for one font.
makes the code a lot simpler. While here rearrange the font handling functions
to be less shit.

ok and help okan@.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 4d1577d..2f65efa 100644
--- a/conf.c
+++ b/conf.c
@@ -50,6 +50,15 @@ conf_cmd_add(struct conf *c, char *image, char *label, int flags)
 	}
 }
 
+void
+conf_font(struct conf *c)
+{
+	struct screen_ctx *sc = screen_current();
+
+	c->DefaultFont = font_make(sc, Conf.DefaultFontName);
+	c->FontHeight = font_ascent() + font_descent() + 1;
+}
+
 int
 conf_changed(char *path)
 {
@@ -78,7 +87,7 @@ conf_reload(struct conf *c)
 		return;
 	}
 
-	DefaultFont = font_getx(Curscreen, c->DefaultFontName);
+	conf_font(c);
 }
 
 void