From e22b1e2a73c0d25be67a8e7433a6c18f7e2efbf7 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 11 Oct 2007 18:43:42 +0200 Subject: [PATCH] set statusbar->height in initstatusbar() --- awesome.c | 3 +-- statusbar.c | 3 ++- statusbar.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/awesome.c b/awesome.c index 9b5c48b43..0270dfdb9 100644 --- a/awesome.c +++ b/awesome.c @@ -198,8 +198,7 @@ setup(awesome_config *awesomeconf) compileregs(awesomeconf->rules, awesomeconf->nrules); /* bar */ - awesomeconf->statusbar.height = awesomeconf->font->height + 2; - initstatusbar(awesomeconf->display, awesomeconf->screen, &awesomeconf->statusbar, awesomeconf->cursor[CurNormal]); + initstatusbar(awesomeconf->display, awesomeconf->screen, &awesomeconf->statusbar, awesomeconf->cursor[CurNormal], awesomeconf->font); } /** Startup Error handler to check if another window manager diff --git a/statusbar.c b/statusbar.c index 021fd1603..bc043e021 100644 --- a/statusbar.c +++ b/statusbar.c @@ -179,7 +179,7 @@ drawstatusbar(Display *disp, awesome_config * awesomeconf) } void -initstatusbar(Display *disp, int screen, Statusbar *statusbar, Cursor cursor) +initstatusbar(Display *disp, int screen, Statusbar *statusbar, Cursor cursor, XftFont *font) { XSetWindowAttributes wa; int phys_screen; @@ -209,6 +209,7 @@ initstatusbar(Display *disp, int screen, Statusbar *statusbar, Cursor cursor) statusbar->height, DefaultDepth(disp, phys_screen)); statusbar->width = si[screen].width; + statusbar->height = font->height + 2; } void diff --git a/statusbar.h b/statusbar.h index ac49c0d68..d972572ae 100644 --- a/statusbar.h +++ b/statusbar.h @@ -24,7 +24,7 @@ #include "common.h" -void initstatusbar(Display *, int, Statusbar *, Cursor); +void initstatusbar(Display *, int, Statusbar *, Cursor, XftFont *); void drawstatusbar(Display *, awesome_config *); void updatebarpos(Display *, Statusbar);