summary refs log tree commit diff
path: root/calmwm.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 /calmwm.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 'calmwm.c')
-rw-r--r--calmwm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/calmwm.c b/calmwm.c
index c00e46a..f635b92 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -38,7 +38,6 @@ struct client_ctx_q		 Clientq;
 int				 Doshape, Shape_ev;
 int				 Starting;
 struct conf			 Conf;
-struct fontdesc			*DefaultFont = NULL;
 
 /* From TWM */
 #define gray_width 2
@@ -149,6 +148,8 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
 	XSetWindowAttributes rootattr;
 	struct keybinding *kb;
 
+	Curscreen = sc;
+
 	sc->display = x_screenname(which);
 	sc->which = which;
 	sc->rootwin = RootWindow(X_Dpy, which);
@@ -203,9 +204,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
 	    GCLineWidth|GCSubwindowMode, &gv);
 
 	font_init(sc);
-	DefaultFont = font_getx(sc, Conf.DefaultFontName);
-	sc->fontheight = font_ascent(DefaultFont) +
-	    font_descent(DefaultFont) + 1;
+	conf_font(&Conf);
 
 	/*
 	 * XXX - this should *really* be in screen_init().  ordering
@@ -231,7 +230,6 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
 	}
 	XFree(wins);
 
-	Curscreen = sc;	/* XXX */
 	screen_init();
 	screen_updatestackingorder();