diff --git a/statusbar.c b/statusbar.c index db2f27446..89751a70d 100644 --- a/statusbar.c +++ b/statusbar.c @@ -46,8 +46,15 @@ statusbar_draw(int screen) return; DrawCtx *ctx = draw_get_context(globalconf.display, phys_screen, - vscreen.statusbar.width, vscreen.statusbar.height); - + vscreen.statusbar.width, + vscreen.statusbar.height); + drawrectangle(ctx, + 0, + 0, + vscreen.statusbar.width, + vscreen.statusbar.height, + True, + vscreen.colors_normal[ColBG]); for(widget = vscreen.statusbar.widgets; widget; widget = widget->next) if (widget->alignment == AlignLeft) left += widget->draw(widget, ctx, left, (left + right)); @@ -58,13 +65,22 @@ statusbar_draw(int screen) if (widget->alignment == AlignFlex) left += widget->draw(widget, ctx, left, (left + right)); - if(vscreen.statusbar.position == BarRight || vscreen.statusbar.position == BarLeft) + if(vscreen.statusbar.position == BarRight || + vscreen.statusbar.position == BarLeft) { Drawable d; if(vscreen.statusbar.position == BarRight) - d = draw_rotate(ctx, phys_screen, M_PI_2, vscreen.statusbar.height, 0); + d = draw_rotate(ctx, + phys_screen, + M_PI_2, + vscreen.statusbar.height, + 0); else - d = draw_rotate(ctx, phys_screen, - M_PI_2, 0, vscreen.statusbar.width); + d = draw_rotate(ctx, + phys_screen, + - M_PI_2, + 0, + vscreen.statusbar.width); XCopyArea(globalconf.display, d, vscreen.statusbar.window, DefaultGC(globalconf.display, phys_screen), 0, 0, diff --git a/widgets/focustitle.c b/widgets/focustitle.c index 08dab7a4c..6be53c05e 100644 --- a/widgets/focustitle.c +++ b/widgets/focustitle.c @@ -39,8 +39,8 @@ focustitle_new(Statusbar *statusbar, const char *name) Widget *w; w = p_new(Widget, 1); w->draw = focustitle_draw; - common_new(w, statusbar, name); w->alignment = AlignFlex; + common_new(w, statusbar, name); return w; }