diff options
author | emersion <contact@emersion.fr> | 2018-01-30 12:01:10 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-30 12:01:10 +0100 |
commit | 2a855e62824653f7634617a2c19d88ba1c650911 (patch) | |
tree | 4ca2aa91f44d8742c10ede61e000e8b57620f632 /rootston | |
parent | d498855b9d6f8d7f0ccde42a026fb0619d99b8a2 (diff) |
rootston: fix urxvt damage on HiDPI outputs
util/region: add wlr_region_expand
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/output.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rootston/output.c b/rootston/output.c index e90f0491..de4922ba 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -600,6 +600,12 @@ static void damage_from_surface(struct wlr_surface *surface, pixman_region32_init(&damage); pixman_region32_copy(&damage, &surface->current->surface_damage); wlr_region_scale(&damage, &damage, output->wlr_output->scale); + if (ceil(output->wlr_output->scale) > surface->current->scale) { + // When scaling up a surface, it'll become blurry so we need to expand + // the damage region + wlr_region_expand(&damage, &damage, + ceil(output->wlr_output->scale) - surface->current->scale); + } pixman_region32_translate(&damage, box.x, box.y); pixman_region32_union(&output->damage, &output->damage, &damage); pixman_region32_fini(&damage); |