summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-05-21 19:30:43 +0100
committerLibravatar GitHub <noreply@github.com>2018-05-21 19:30:43 +0100
commit54818a1c98a2e6fa3a4f6b7537b73c5d58e1a076 (patch)
tree2a482d99f195e268ceb94a44f550610a6f3a95d0
parentMerge pull request #2005 from RyanDwyer/tabbed-layout (diff)
parentFix hide_edge_borders smart for tabs and stacks (diff)
downloadsway-54818a1c98a2e6fa3a4f6b7537b73c5d58e1a076.tar.gz
sway-54818a1c98a2e6fa3a4f6b7537b73c5d58e1a076.tar.zst
sway-54818a1c98a2e6fa3a4f6b7537b73c5d58e1a076.zip
Merge pull request #2016 from RedSoxFan/fix-tab-smart-borders
Fix hide_edge_borders smart for tabs and stacks
-rw-r--r--sway/tree/view.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 64597c02..c013e635 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -141,9 +141,18 @@ void view_autoconfigure(struct sway_view *view) {
141 141
142 struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); 142 struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
143 143
144 int other_views = 1; 144 int other_views = 0;
145 if (config->hide_edge_borders == E_SMART) { 145 if (config->hide_edge_borders == E_SMART) {
146 other_views = container_count_descendants_of_type(ws, C_VIEW) - 1; 146 struct sway_container *con = view->swayc;
147 while (con != output) {
148 if (con->layout != L_TABBED && con->layout != L_STACKED) {
149 other_views += con->children ? con->children->length - 1 : 0;
150 if (other_views > 0) {
151 break;
152 }
153 }
154 con = con->parent;
155 }
147 } 156 }
148 157
149 view->border_top = view->border_bottom = true; 158 view->border_top = view->border_bottom = true;