]> git.mdlowis.com Git - proto/labwc.git/commitdiff
damage: render deco in output local coordinates
authorJohan Malm <jgm323@gmail.com>
Sun, 10 Jan 2021 13:00:30 +0000 (13:00 +0000)
committerJohan Malm <jgm323@gmail.com>
Sun, 10 Jan 2021 13:00:30 +0000 (13:00 +0000)
src/output.c

index d4b99534dcf3be343bb2d413f6a05cd20108dac6..a499927eba5e10a04ae462ac532d5271554685bd 100644 (file)
@@ -315,6 +315,12 @@ render_rect(struct output *output, pixman_region32_t *output_damage,
        struct wlr_box box;
        memcpy(&box, _box, sizeof(struct wlr_box));
 
+       double ox = 0, oy = 0;
+       wlr_output_layout_output_coords(output->server->output_layout,
+               output->wlr_output, &ox, &oy);
+       box.x += ox;
+       box.y += oy;
+
        pixman_region32_t damage;
        pixman_region32_init(&damage);
        pixman_region32_union_rect(&damage, &damage, box.x, box.y,