diff options
author | Jasen Borisov <tajjada@gmail.com> | 2016-05-18 04:25:32 +0100 |
---|---|---|
committer | Jasen Borisov <tajjada@gmail.com> | 2016-05-18 04:25:32 +0100 |
commit | 870a7aaad998a566db2ef80648f44c14fef76c66 (patch) | |
tree | 37370af4463c0e7d62d4769e7f504db48ea11e16 /sway/border.c | |
parent | ae027aad5a4a1c83cb4dd073aaeb2276b2e659ac (diff) |
Fix issue #661.
Borders are now drawn correctly (same behavior as i3) for tabbed and
stacked containers, when the children have 'border none' set.
Diffstat (limited to 'sway/border.c')
-rw-r--r-- | sway/border.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; } |