diff options
author | emersion <contact@emersion.fr> | 2018-06-28 23:49:40 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-07-04 19:12:17 +0100 |
commit | 78555abba3fdd272f50dcb8b8bf3b7811ddd9fc5 (patch) | |
tree | c62002bf3d25cbd168ac233ab8ea89a9fda685e2 /rootston | |
parent | 233bfe2f4f7859fa293a33a5b4022eaae7eb6cb3 (diff) |
surface: move position and scale out of wlr_surface_state
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/output.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/rootston/output.c b/rootston/output.c index 6abd60ae..fd7df99c 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -146,8 +146,8 @@ static bool surface_intersect_output(struct wlr_surface *surface, double ox = lx, oy = ly; wlr_output_layout_output_coords(output_layout, wlr_output, &ox, &oy); - ox += surface->current.sx; - oy += surface->current.sy; + ox += surface->sx; + oy += surface->sy; if (box != NULL) { box->x = ox * wlr_output->scale; @@ -695,9 +695,14 @@ static void damage_from_surface(struct wlr_surface *surface, int sx, int sy, int center_x = box.x + box.width/2; int center_y = box.y + box.height/2; + enum wl_output_transform transform = + wlr_output_transform_invert(surface->current.transform); + pixman_region32_t damage; pixman_region32_init(&damage); - pixman_region32_copy(&damage, &surface->current.damage); + pixman_region32_copy(&damage, &surface->buffer_damage); + wlr_region_transform(&damage, &damage, transform, + surface->current.buffer_width, surface->current.buffer_height); wlr_region_scale(&damage, &damage, wlr_output->scale / (float)surface->current.scale); if (ceil(wlr_output->scale) > surface->current.scale) { |