mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-25 01:40:19 -05:00
render: don't allow negative coordinates of the search surface
While the protocol allows this, it appears Sway offsets (moves) the parent surface when this happens, resulting in a window half without content.
This commit is contained in:
parent
0982210af2
commit
3c71389993
1 changed files with 2 additions and 1 deletions
3
render.c
3
render.c
|
|
@ -795,7 +795,8 @@ render_search_box(struct terminal *term)
|
|||
|
||||
wl_subsurface_set_position(
|
||||
term->window->search_sub_surface,
|
||||
term->width - width - margin, term->height - height - margin);
|
||||
max(0, term->width - width - margin),
|
||||
max(0, term->height - height - margin));
|
||||
|
||||
wl_surface_damage_buffer(term->window->search_surface, 0, 0, width, height);
|
||||
wl_surface_attach(term->window->search_surface, buf->wl_buf, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue