Implement default border styles (thanks litemotiv).
This commit is contained in:
committed by
Michael Stapelberg
parent
41eb810531
commit
a1dd74da5a
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user