Implement default border styles (thanks litemotiv).

This commit is contained in:
Fernando Tarlá Cardoso Lemos
2010-12-07 21:32:04 -02:00
committed by Michael Stapelberg
parent 41eb810531
commit a1dd74da5a
6 changed files with 24 additions and 5 deletions

View File

@ -35,6 +35,7 @@ Con *con_new(Con *parent) {
TAILQ_INSERT_TAIL(&all_cons, new, all_cons);
new->type = CT_CON;
new->name = strdup("");
new->border_style = config.default_border;
static int cnt = 0;
LOG("opening window %d\n", cnt);
@ -554,6 +555,9 @@ int con_border_style(Con *con) {
if (con->parent->layout == L_STACKED)
return BS_NORMAL;
if (con->parent->layout == L_TABBED && con->border_style != BS_NORMAL)
return con_num_children(con->parent) == 1 ? con->border_style : BS_NORMAL;
return con->border_style;
}