diff options
author | Kenny Levinsen <kl@kl.wtf> | 2023-05-09 15:13:39 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-05-09 15:55:31 +0200 |
commit | 0a951517aed2375b972bbd70cb164bf7acb25e00 (patch) | |
tree | 80225139a682a8207b5f398a8aff44dad1c5b4c2 | |
parent | render: Apply clip to rendered texture correctly (diff) | |
download | sway-0a951517aed2375b972bbd70cb164bf7acb25e00.tar.gz sway-0a951517aed2375b972bbd70cb164bf7acb25e00.tar.zst sway-0a951517aed2375b972bbd70cb164bf7acb25e00.zip |
render: Clear using wlr_output dimensions
Clear was done using sway_output's logical dimensions, instead of the
wlr_output physical dimensions. This meant that when output scaling was
applied, only a part of the screen would be cleared.
Use the wlr_output dimensions instead.
Regressed by: https://github.com/swaywm/sway/pull/7552
-rw-r--r-- | sway/desktop/render.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 552502aa..edefa658 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c | |||
@@ -1027,7 +1027,7 @@ void output_render(struct render_context *ctx) { | |||
1027 | 1027 | ||
1028 | if (debug.damage == DAMAGE_HIGHLIGHT) { | 1028 | if (debug.damage == DAMAGE_HIGHLIGHT) { |
1029 | wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ | 1029 | wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ |
1030 | .box = { .width = output->width, .height = output->height }, | 1030 | .box = { .width = wlr_output->width, .height = wlr_output->height }, |
1031 | .color = { .r = 1, .g = 1, .b = 0, .a = 1 }, | 1031 | .color = { .r = 1, .g = 1, .b = 0, .a = 1 }, |
1032 | }); | 1032 | }); |
1033 | } | 1033 | } |
@@ -1047,7 +1047,7 @@ void output_render(struct render_context *ctx) { | |||
1047 | } | 1047 | } |
1048 | 1048 | ||
1049 | wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ | 1049 | wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ |
1050 | .box = { .width = output->width, .height = output->height }, | 1050 | .box = { .width = wlr_output->width, .height = wlr_output->height }, |
1051 | .color = clear_color, | 1051 | .color = clear_color, |
1052 | .clip = &transformed_damage, | 1052 | .clip = &transformed_damage, |
1053 | }); | 1053 | }); |
@@ -1080,7 +1080,7 @@ void output_render(struct render_context *ctx) { | |||
1080 | 1080 | ||
1081 | if (fullscreen_con) { | 1081 | if (fullscreen_con) { |
1082 | wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ | 1082 | wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ |
1083 | .box = { .width = output->width, .height = output->height }, | 1083 | .box = { .width = wlr_output->width, .height = wlr_output->height }, |
1084 | .color = { .r = 0, .g = 0, .b = 0, .a = 1 }, | 1084 | .color = { .r = 0, .g = 0, .b = 0, .a = 1 }, |
1085 | .clip = &transformed_damage, | 1085 | .clip = &transformed_damage, |
1086 | }); | 1086 | }); |
@@ -1108,7 +1108,7 @@ void output_render(struct render_context *ctx) { | |||
1108 | #endif | 1108 | #endif |
1109 | } else { | 1109 | } else { |
1110 | wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ | 1110 | wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ |
1111 | .box = { .width = output->width, .height = output->height }, | 1111 | .box = { .width = wlr_output->width, .height = wlr_output->height }, |
1112 | .color = { .r = 0.25f, .g = 0.25f, .b = 0.25f, .a = 1 }, | 1112 | .color = { .r = 0.25f, .g = 0.25f, .b = 0.25f, .a = 1 }, |
1113 | .clip = &transformed_damage, | 1113 | .clip = &transformed_damage, |
1114 | }); | 1114 | }); |