From 870a7aaad998a566db2ef80648f44c14fef76c66 Mon Sep 17 00:00:00 2001 From: Jasen Borisov Date: Wed, 18 May 2016 04:25:32 +0100 Subject: Fix issue #661. Borders are now drawn correctly (same behavior as i3) for tabbed and stacked containers, when the children have 'border none' set. --- sway/border.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sway/border.c') diff --git a/sway/border.c b/sway/border.c index 0d1be970..7600351a 100644 --- a/sway/border.c +++ b/sway/border.c @@ -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; } -- cgit v1.2.3