commit 0a951517aed2375b972bbd70cb164bf7acb25e00
parent 393c29fc591b6e0fb85328b638607d8b5784a0e3
Author: Kenny Levinsen <kl@kl.wtf>
Date: Tue, 9 May 2023 15:13:39 +0200
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
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
@@ -1027,7 +1027,7 @@ void output_render(struct render_context *ctx) {
if (debug.damage == DAMAGE_HIGHLIGHT) {
wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){
- .box = { .width = output->width, .height = output->height },
+ .box = { .width = wlr_output->width, .height = wlr_output->height },
.color = { .r = 1, .g = 1, .b = 0, .a = 1 },
});
}
@@ -1047,7 +1047,7 @@ void output_render(struct render_context *ctx) {
}
wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){
- .box = { .width = output->width, .height = output->height },
+ .box = { .width = wlr_output->width, .height = wlr_output->height },
.color = clear_color,
.clip = &transformed_damage,
});
@@ -1080,7 +1080,7 @@ void output_render(struct render_context *ctx) {
if (fullscreen_con) {
wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){
- .box = { .width = output->width, .height = output->height },
+ .box = { .width = wlr_output->width, .height = wlr_output->height },
.color = { .r = 0, .g = 0, .b = 0, .a = 1 },
.clip = &transformed_damage,
});
@@ -1108,7 +1108,7 @@ void output_render(struct render_context *ctx) {
#endif
} else {
wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){
- .box = { .width = output->width, .height = output->height },
+ .box = { .width = wlr_output->width, .height = wlr_output->height },
.color = { .r = 0.25f, .g = 0.25f, .b = 0.25f, .a = 1 },
.clip = &transformed_damage,
});