mirror of
https://github.com/labwc/labwc.git
synced 2026-03-10 05:33:47 -04:00
damage: render deco in output local coordinates
This commit is contained in:
parent
54804fd3df
commit
29b9e3334d
1 changed files with 6 additions and 0 deletions
|
|
@ -315,6 +315,12 @@ render_rect(struct output *output, pixman_region32_t *output_damage,
|
||||||
struct wlr_box box;
|
struct wlr_box box;
|
||||||
memcpy(&box, _box, sizeof(struct wlr_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_t damage;
|
||||||
pixman_region32_init(&damage);
|
pixman_region32_init(&damage);
|
||||||
pixman_region32_union_rect(&damage, &damage, box.x, box.y,
|
pixman_region32_union_rect(&damage, &damage, box.x, box.y,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue