From 9e42f8c238793c4b9e7022656bd058789a55f8ba Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Mon, 26 Aug 2024 18:39:14 -0400 Subject: [PATCH] scene: Use wlr_output_transformed_resolution --- types/scene/wlr_scene.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 713bfdfd..d1b44e14 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -336,19 +336,15 @@ static void transform_output_box(struct wlr_box *box, const struct render_data * static void scene_output_damage(struct wlr_scene_output *scene_output, const pixman_region32_t *region) { if (wlr_damage_ring_add(&scene_output->damage_ring, region)) { + int width, height; + wlr_output_transformed_resolution(scene_output->output, &width, &height); + wlr_output_schedule_frame(scene_output->output); struct wlr_output *output = scene_output->output; enum wl_output_transform transform = wlr_output_transform_invert(scene_output->output->transform); - int width = output->width; - int height = output->height; - if (transform & WL_OUTPUT_TRANSFORM_90) { - width = output->height; - height = output->width; - } - pixman_region32_t frame_damage; pixman_region32_init(&frame_damage); wlr_region_transform(&frame_damage, region, transform, width, height);