Borders are now drawn correctly (same behavior as i3) for tabbed and
stacked containers, when the children have 'border none' set.
This commit is contained in:
Jasen Borisov 2016-05-18 04:25:32 +01:00
parent ae027aad5a
commit 870a7aaad9
2 changed files with 9 additions and 3 deletions

View file

@ -402,7 +402,13 @@ void update_view_border(swayc_t *view) {
void render_view_borders(wlc_handle view) {
swayc_t *c = swayc_by_handle(view);
if (!c || c->border_type == B_NONE) {
// emulate i3 behavior for drawing borders for tabbed and stacked layouts:
// if we are not the only child in the container, always draw borders,
// regardless of the border setting on the individual view
if (!c || (c->border_type == B_NONE
&& !((c->parent->layout == L_TABBED || c->parent->layout == L_STACKED)
&& c->parent->children->length > 1))) {
return;
}