diff --git a/src/infobar.c b/src/infobar.c index a2f96a7..0d3f527 100644 --- a/src/infobar.c +++ b/src/infobar.c @@ -127,8 +127,7 @@ infobar_init(void) barwin_refresh(infobar[sc].bar); /* Default statustext is set here */ - for(i = 0; i < s; ++i) - infobar[i].statustext = _strdup(WMFS_VERSION); + infobar[sc].statustext = _strdup(WMFS_VERSION); infobar_draw(sc); } @@ -264,6 +263,7 @@ infobar_destroy(void) barwin_delete_subwin(infobar[sc].tags_board); barwin_delete(infobar[sc].tags_board); + barwin_delete(infobar[sc].selbar); barwin_delete_subwin(infobar[sc].bar); barwin_delete(infobar[sc].bar); } diff --git a/src/menu.c b/src/menu.c index c952edf..3e572c1 100644 --- a/src/menu.c +++ b/src/menu.c @@ -74,8 +74,10 @@ menu_draw(Menu menu, int x, int y) /* Frame barwin */ screen_get_sel(); - if((out = x + width - spgeo[selscreen].width) > 0) x -= out; - if((out = y + height - spgeo[selscreen].height) > 0) y -= out; + if((out = x + width - MAXW) > 0) + x -= out; + if((out = y + height - MAXH) > 0) + y -= out; frame = barwin_create(ROOT, x, y, width + SHADH, height + SHADH * 2, menu.colors.normal.bg, menu.colors.normal.fg, False, False, True);