aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
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 /sway/desktop/output.c
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
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c14
1 files changed, 10 insertions, 4 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