sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit b977c02e354bd5b0282796a4b770f5a7888e81be
parent fd24b1afd874d6da8ae603c1d0919078803f132d
Author: Brian Ashworth <bosrsf04@gmail.com>
Date:   Sun,  5 Jan 2020 15:02:22 -0500

render: do not render indicator on floating views

This adds a check to make it so the indicator is only rendered on views
with a parent, which floating views do not. Since floating views do not
have a parent, the workspace layout was being incorrectly used to
determine whether to show the split indicator previously. This has no
impact on floating containers and a view within a floating container
will still have indicators rendered appropriately.

Diffstat:
Msway/desktop/render.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sway/desktop/render.c b/sway/desktop/render.c @@ -339,7 +339,7 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage, container_current_parent_layout(con); if (state->border_right) { - if (siblings->length == 1 && layout == L_HORIZ) { + if (con->current.parent && siblings->length == 1 && layout == L_HORIZ) { memcpy(&color, colors->indicator, sizeof(float) * 4); } else { memcpy(&color, colors->child_border, sizeof(float) * 4); @@ -354,7 +354,7 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage, } if (state->border_bottom) { - if (siblings->length == 1 && layout == L_VERT) { + if (con->current.parent && siblings->length == 1 && layout == L_VERT) { memcpy(&color, colors->indicator, sizeof(float) * 4); } else { memcpy(&color, colors->child_border, sizeof(float) * 4);