diff options
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index f314db73..20832cc4 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c | |||
@@ -346,8 +346,8 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage, | |||
346 | if (state->border_left) { | 346 | if (state->border_left) { |
347 | memcpy(&color, colors->child_border, sizeof(float) * 4); | 347 | memcpy(&color, colors->child_border, sizeof(float) * 4); |
348 | premultiply_alpha(color, con->alpha); | 348 | premultiply_alpha(color, con->alpha); |
349 | box.x = state->x; | 349 | box.x = floor(state->x); |
350 | box.y = state->content_y; | 350 | box.y = floor(state->content_y); |
351 | box.width = state->border_thickness; | 351 | box.width = state->border_thickness; |
352 | box.height = state->content_height; | 352 | box.height = state->content_height; |
353 | scale_box(&box, output_scale); | 353 | scale_box(&box, output_scale); |
@@ -365,8 +365,8 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage, | |||
365 | memcpy(&color, colors->child_border, sizeof(float) * 4); | 365 | memcpy(&color, colors->child_border, sizeof(float) * 4); |
366 | } | 366 | } |
367 | premultiply_alpha(color, con->alpha); | 367 | premultiply_alpha(color, con->alpha); |
368 | box.x = state->content_x + state->content_width; | 368 | box.x = floor(state->content_x + state->content_width); |
369 | box.y = state->content_y; | 369 | box.y = floor(state->content_y); |
370 | box.width = state->border_thickness; | 370 | box.width = state->border_thickness; |
371 | box.height = state->content_height; | 371 | box.height = state->content_height; |
372 | scale_box(&box, output_scale); | 372 | scale_box(&box, output_scale); |
@@ -380,8 +380,8 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage, | |||
380 | memcpy(&color, colors->child_border, sizeof(float) * 4); | 380 | memcpy(&color, colors->child_border, sizeof(float) * 4); |
381 | } | 381 | } |
382 | premultiply_alpha(color, con->alpha); | 382 | premultiply_alpha(color, con->alpha); |
383 | box.x = state->x; | 383 | box.x = floor(state->x); |
384 | box.y = state->content_y + state->content_height; | 384 | box.y = floor(state->content_y + state->content_height); |
385 | box.width = state->width; | 385 | box.width = state->width; |
386 | box.height = state->border_thickness; | 386 | box.height = state->border_thickness; |
387 | scale_box(&box, output_scale); | 387 | scale_box(&box, output_scale); |
@@ -662,8 +662,8 @@ static void render_top_border(struct sway_output *output, | |||
662 | // Child border - top edge | 662 | // Child border - top edge |
663 | memcpy(&color, colors->child_border, sizeof(float) * 4); | 663 | memcpy(&color, colors->child_border, sizeof(float) * 4); |
664 | premultiply_alpha(color, con->alpha); | 664 | premultiply_alpha(color, con->alpha); |
665 | box.x = state->x; | 665 | box.x = floor(state->x); |
666 | box.y = state->y; | 666 | box.y = floor(state->y); |
667 | box.width = state->width; | 667 | box.width = state->width; |
668 | box.height = state->border_thickness; | 668 | box.height = state->border_thickness; |
669 | scale_box(&box, output_scale); | 669 | scale_box(&box, output_scale); |
@@ -718,8 +718,8 @@ static void render_containers_linear(struct sway_output *output, | |||
718 | } | 718 | } |
719 | 719 | ||
720 | if (state->border == B_NORMAL) { | 720 | if (state->border == B_NORMAL) { |
721 | render_titlebar(output, damage, child, state->x, | 721 | render_titlebar(output, damage, child, floor(state->x), |
722 | state->y, state->width, colors, | 722 | floor(state->y), state->width, colors, |
723 | title_texture, marks_texture); | 723 | title_texture, marks_texture); |
724 | } else if (state->border == B_PIXEL) { | 724 | } else if (state->border == B_PIXEL) { |
725 | render_top_border(output, damage, child, colors); | 725 | render_top_border(output, damage, child, colors); |
@@ -773,7 +773,7 @@ static void render_containers_tabbed(struct sway_output *output, | |||
773 | marks_texture = child->marks_unfocused; | 773 | marks_texture = child->marks_unfocused; |
774 | } | 774 | } |
775 | 775 | ||
776 | int x = cstate->x + tab_width * i; | 776 | int x = floor(cstate->x + tab_width * i); |
777 | 777 | ||
778 | // Make last tab use the remaining width of the parent | 778 | // Make last tab use the remaining width of the parent |
779 | if (i == parent->children->length - 1) { | 779 | if (i == parent->children->length - 1) { |
@@ -886,8 +886,8 @@ static void render_container(struct sway_output *output, | |||
886 | struct parent_data data = { | 886 | struct parent_data data = { |
887 | .layout = con->current.layout, | 887 | .layout = con->current.layout, |
888 | .box = { | 888 | .box = { |
889 | .x = con->current.x, | 889 | .x = floor(con->current.x), |
890 | .y = con->current.y, | 890 | .y = floor(con->current.y), |
891 | .width = con->current.width, | 891 | .width = con->current.width, |
892 | .height = con->current.height, | 892 | .height = con->current.height, |
893 | }, | 893 | }, |
@@ -903,8 +903,8 @@ static void render_workspace(struct sway_output *output, | |||
903 | struct parent_data data = { | 903 | struct parent_data data = { |
904 | .layout = ws->current.layout, | 904 | .layout = ws->current.layout, |
905 | .box = { | 905 | .box = { |
906 | .x = ws->current.x, | 906 | .x = floor(ws->current.x), |
907 | .y = ws->current.y, | 907 | .y = floor(ws->current.y), |
908 | .width = ws->current.width, | 908 | .width = ws->current.width, |
909 | .height = ws->current.height, | 909 | .height = ws->current.height, |
910 | }, | 910 | }, |
@@ -938,8 +938,8 @@ static void render_floating_container(struct sway_output *soutput, | |||
938 | } | 938 | } |
939 | 939 | ||
940 | if (con->current.border == B_NORMAL) { | 940 | if (con->current.border == B_NORMAL) { |
941 | render_titlebar(soutput, damage, con, con->current.x, | 941 | render_titlebar(soutput, damage, con, floor(con->current.x), |
942 | con->current.y, con->current.width, colors, | 942 | floor(con->current.y), con->current.width, colors, |
943 | title_texture, marks_texture); | 943 | title_texture, marks_texture); |
944 | } else if (con->current.border == B_PIXEL) { | 944 | } else if (con->current.border == B_PIXEL) { |
945 | render_top_border(soutput, damage, con, colors); | 945 | render_top_border(soutput, damage, con, colors); |