diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-29 10:40:41 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-29 10:40:41 +0000 |
| commit | 601dc02ea1758f6690fffa925bffb959ba300739 (patch) | |
| tree | 4791b89f5507033bdd552d5cd09cfe28185d8891 /render.c | |
| parent | config: change default geometry from 800x600 -> 700x500 (diff) | |
render: wl_subsurface_set_position() uses un-scaled coordinates
This fixes an issue where the CSDs and the search box was incorrectly
positioned when output's scale != 1.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -744,7 +744,7 @@ render_csd(struct terminal *term) &(pixman_rectangle16_t){0, 0, buf->width, buf->height}); pixman_image_unref(src); - wl_subsurface_set_position(sub, x, y); + wl_subsurface_set_position(sub, x / term->scale, y / term->scale); wl_surface_attach(surf, buf->wl_buf, 0, 0); //wl_surface_set_opaque_region(surf, region); @@ -1156,8 +1156,8 @@ render_search_box(struct terminal *term) wl_subsurface_set_position( term->window->search_sub_surface, - max(0, (int32_t)term->width - width - margin), - max(0, (int32_t)term->height - height - margin)); + max(0, (int32_t)term->width - width - margin) / scale, + max(0, (int32_t)term->height - height - margin) / scale); wl_surface_commit(term->window->search_surface); } |
