aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2023-05-09 15:13:39 +0200
committerSimon Ser <contact@emersion.fr>2023-05-09 15:55:31 +0200
commit0a951517aed2375b972bbd70cb164bf7acb25e00 (patch)
tree80225139a682a8207b5f398a8aff44dad1c5b4c2 /sway/desktop/render.c
parent393c29fc591b6e0fb85328b638607d8b5784a0e3 (diff)
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 (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c8
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) {
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,
});