aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/output.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rootston/output.c b/rootston/output.c
index aecb0d76..6abd60ae 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -146,6 +146,9 @@ 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;
+
if (box != NULL) {
box->x = ox * wlr_output->scale;
box->y = oy * wlr_output->scale;
@@ -694,8 +697,9 @@ static void damage_from_surface(struct wlr_surface *surface, int sx, int sy,
pixman_region32_t damage;
pixman_region32_init(&damage);
- pixman_region32_copy(&damage, &surface->current.surface_damage);
- wlr_region_scale(&damage, &damage, wlr_output->scale);
+ pixman_region32_copy(&damage, &surface->current.damage);
+ wlr_region_scale(&damage, &damage,
+ wlr_output->scale / (float)surface->current.scale);
if (ceil(wlr_output->scale) > surface->current.scale) {
// When scaling up a surface, it'll become blurry so we need to
// expand the damage region