From fced953bb524376afe511f2dd2bdb6720cdf87ef Mon Sep 17 00:00:00 2001 From: tiosgz Date: Sat, 2 Jul 2022 08:18:41 +0000 Subject: [PATCH] output: wlr_renderer_begin with physical size The rendered region size is independent on the output transform and scale. Until now, an output with scale > 1 would render only its (1 / scale) part; so with a scale of 2, only the top-left quarter (ie. the left 1/2 of the top 1/2) would be visible. Similarly, a portrait output (constructed as landscape, rotated by 90 degrees) would have an empty area at its bottom. This bug was found while testing the output-management PR (#62). --- kiwmi/desktop/output.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kiwmi/desktop/output.c b/kiwmi/desktop/output.c index 432cd67..14b1c9b 100644 --- a/kiwmi/desktop/output.c +++ b/kiwmi/desktop/output.c @@ -194,11 +194,7 @@ output_frame_notify(struct wl_listener *listener, void *data) struct kiwmi_server *server = wl_container_of(desktop, server, desktop); struct wlr_renderer *renderer = server->renderer; - int width; - int height; - wlr_output_effective_resolution(wlr_output, &width, &height); - - wlr_renderer_begin(renderer, width, height); + wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height); wlr_renderer_clear(renderer, desktop->bg_color); double output_lx = 0;