summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-05-12 12:56:26 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-05-12 12:56:26 -0400
commit2adf23c2a3b80f19fd5e9114192a3dbb88ade2be (patch)
tree304c278c4a835fb1b6fc9d477a78385656984846
parentMerge branch 'master' into edge-borders (diff)
downloadsway-2adf23c2a3b80f19fd5e9114192a3dbb88ade2be.tar.gz
sway-2adf23c2a3b80f19fd5e9114192a3dbb88ade2be.tar.zst
sway-2adf23c2a3b80f19fd5e9114192a3dbb88ade2be.zip
Only count views for hide_edge_borders smart
-rw-r--r--sway/desktop/output.c14
-rw-r--r--sway/tree/view.c7
2 files changed, 15 insertions, 6 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index b99e9a91..974cd56c 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -322,8 +322,11 @@ static void render_container_simple_border_normal(struct sway_output *output,
322 struct wlr_box box; 322 struct wlr_box box;
323 float color[4]; 323 float color[4];
324 324
325 struct sway_container *ws = container_parent(con, C_WORKSPACE); 325 int other_views = 1;
326 int other_views = container_count_descendants_of_type(ws, C_VIEW) - 1; 326 if (config->hide_edge_borders == E_SMART) {
327 struct sway_container *ws = container_parent(con, C_WORKSPACE);
328 other_views = container_count_descendants_of_type(ws, C_VIEW) - 1;
329 }
327 330
328 if (config->hide_edge_borders != E_VERTICAL 331 if (config->hide_edge_borders != E_VERTICAL
329 && config->hide_edge_borders != E_BOTH 332 && config->hide_edge_borders != E_BOTH
@@ -424,8 +427,11 @@ static void render_container_simple_border_pixel(struct sway_output *output,
424 struct wlr_box box; 427 struct wlr_box box;
425 float color[4]; 428 float color[4];
426 429
427 struct sway_container *ws = container_parent(con, C_WORKSPACE); 430 int other_views = 1;
428 int other_views = container_count_descendants_of_type(ws, C_VIEW) - 1; 431 if (config->hide_edge_borders == E_SMART) {
432 struct sway_container *ws = container_parent(con, C_WORKSPACE);
433 other_views = container_count_descendants_of_type(ws, C_VIEW) - 1;
434 }
429 435
430 if (config->hide_edge_borders != E_VERTICAL 436 if (config->hide_edge_borders != E_VERTICAL
431 && config->hide_edge_borders != E_BOTH 437 && config->hide_edge_borders != E_BOTH
diff --git a/sway/tree/view.c b/sway/tree/view.c
index ae8709ba..e2cb8a7a 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -100,8 +100,11 @@ void view_autoconfigure(struct sway_view *view) {
100 return; 100 return;
101 } 101 }
102 102
103 struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); 103 int other_views = 1;
104 int other_views = container_count_descendants_of_type(ws, C_VIEW) - 1; 104 if (config->hide_edge_borders == E_SMART) {
105 struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
106 other_views = container_count_descendants_of_type(ws, C_VIEW) - 1;
107 }
105 108
106 double x, y, width, height; 109 double x, y, width, height;
107 x = y = width = height = 0; 110 x = y = width = height = 0;