summaryrefslogtreecommitdiffstats
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-17 20:25:33 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-17 20:25:33 +1000
commit1801b725e267b2fba6b98171adcd2de8f7db9235 (patch)
tree0add5e55f85331938043eb5b0962b259d7a4af0a /sway/desktop/render.c
parentMerge pull request #2465 from DonnieWest/master (diff)
downloadsway-1801b725e267b2fba6b98171adcd2de8f7db9235.tar.gz
sway-1801b725e267b2fba6b98171adcd2de8f7db9235.tar.zst
sway-1801b725e267b2fba6b98171adcd2de8f7db9235.zip
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.
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c6
1 files changed, 3 insertions, 3 deletions
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,
266 render_view_toplevels(view, output, damage, view->swayc->alpha); 266 render_view_toplevels(view, output, damage, view->swayc->alpha);
267 } 267 }
268 268
269 if (view->using_csd) { 269 if (view->swayc->current.using_csd) {
270 return; 270 return;
271 } 271 }
272 272
@@ -585,7 +585,7 @@ static void render_container_simple(struct sway_output *output,
585 marks_texture = view->marks_unfocused; 585 marks_texture = view->marks_unfocused;
586 } 586 }
587 587
588 if (!view->using_csd) { 588 if (!view->swayc->current.using_csd) {
589 if (state->border == B_NORMAL) { 589 if (state->border == B_NORMAL) {
590 render_titlebar(output, damage, child, state->swayc_x, 590 render_titlebar(output, damage, child, state->swayc_x,
591 state->swayc_y, state->swayc_width, colors, 591 state->swayc_y, state->swayc_width, colors,
@@ -777,7 +777,7 @@ static void render_floating_container(struct sway_output *soutput,
777 marks_texture = view->marks_unfocused; 777 marks_texture = view->marks_unfocused;
778 } 778 }
779 779
780 if (!view->using_csd) { 780 if (!view->swayc->current.using_csd) {
781 if (con->current.border == B_NORMAL) { 781 if (con->current.border == B_NORMAL) {
782 render_titlebar(soutput, damage, con, con->current.swayc_x, 782 render_titlebar(soutput, damage, con, con->current.swayc_x,
783 con->current.swayc_y, con->current.swayc_width, colors, 783 con->current.swayc_y, con->current.swayc_width, colors,