From 1801b725e267b2fba6b98171adcd2de8f7db9235 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 17 Aug 2018 20:25:33 +1000 Subject: Add using_csd variable to transaction state This fixes a race condition flicker when unfloating a view which uses client side decorations. When the view is floated it has using_csd = true, so the decorations are not drawn. When unfloating it it changes to false, but this change wasn't part of transactions so it could potentially render the decorations around the view while it's waiting for the transaction to apply. --- sway/desktop/render.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sway/desktop/render.c') diff --git a/sway/desktop/render.c b/sway/desktop/render.c index cdac9c72..6e1e31f0 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -266,7 +266,7 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage, render_view_toplevels(view, output, damage, view->swayc->alpha); } - if (view->using_csd) { + if (view->swayc->current.using_csd) { return; } @@ -585,7 +585,7 @@ static void render_container_simple(struct sway_output *output, marks_texture = view->marks_unfocused; } - if (!view->using_csd) { + if (!view->swayc->current.using_csd) { if (state->border == B_NORMAL) { render_titlebar(output, damage, child, state->swayc_x, state->swayc_y, state->swayc_width, colors, @@ -777,7 +777,7 @@ static void render_floating_container(struct sway_output *soutput, marks_texture = view->marks_unfocused; } - if (!view->using_csd) { + if (!view->swayc->current.using_csd) { if (con->current.border == B_NORMAL) { render_titlebar(soutput, damage, con, con->current.swayc_x, con->current.swayc_y, con->current.swayc_width, colors, -- cgit v1.2.3-54-g00ecf