mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
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.
This commit is contained in:
parent
5717a0dfb0
commit
601dc02ea1
1 changed files with 3 additions and 3 deletions
6
render.c
6
render.c
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue