set statusbar->height in initstatusbar()

This commit is contained in:
Julien Danjou 2007-10-11 18:43:42 +02:00
parent f20c729d64
commit e22b1e2a73
3 changed files with 4 additions and 4 deletions

View File

@ -198,8 +198,7 @@ setup(awesome_config *awesomeconf)
compileregs(awesomeconf->rules, awesomeconf->nrules); compileregs(awesomeconf->rules, awesomeconf->nrules);
/* bar */ /* bar */
awesomeconf->statusbar.height = awesomeconf->font->height + 2; initstatusbar(awesomeconf->display, awesomeconf->screen, &awesomeconf->statusbar, awesomeconf->cursor[CurNormal], awesomeconf->font);
initstatusbar(awesomeconf->display, awesomeconf->screen, &awesomeconf->statusbar, awesomeconf->cursor[CurNormal]);
} }
/** Startup Error handler to check if another window manager /** Startup Error handler to check if another window manager

View File

@ -179,7 +179,7 @@ drawstatusbar(Display *disp, awesome_config * awesomeconf)
} }
void void
initstatusbar(Display *disp, int screen, Statusbar *statusbar, Cursor cursor) initstatusbar(Display *disp, int screen, Statusbar *statusbar, Cursor cursor, XftFont *font)
{ {
XSetWindowAttributes wa; XSetWindowAttributes wa;
int phys_screen; int phys_screen;
@ -209,6 +209,7 @@ initstatusbar(Display *disp, int screen, Statusbar *statusbar, Cursor cursor)
statusbar->height, statusbar->height,
DefaultDepth(disp, phys_screen)); DefaultDepth(disp, phys_screen));
statusbar->width = si[screen].width; statusbar->width = si[screen].width;
statusbar->height = font->height + 2;
} }
void void

View File

@ -24,7 +24,7 @@
#include "common.h" #include "common.h"
void initstatusbar(Display *, int, Statusbar *, Cursor); void initstatusbar(Display *, int, Statusbar *, Cursor, XftFont *);
void drawstatusbar(Display *, awesome_config *); void drawstatusbar(Display *, awesome_config *);
void updatebarpos(Display *, Statusbar); void updatebarpos(Display *, Statusbar);