mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: search: set clip region
Fixes crash when the search box has been reduced in height, due to limited window space.
This commit is contained in:
parent
628fd39098
commit
5e64c67c25
2 changed files with 8 additions and 0 deletions
|
|
@ -57,6 +57,8 @@
|
|||
rows.
|
||||
* Some box-drawing characters were rendered incorrectly on big-endian
|
||||
architectures.
|
||||
* Crash when resizing the window to the smallest possible size while
|
||||
scrollback search is active.
|
||||
* Scrollback indicator being incorrectly rendered when window size is
|
||||
very small.
|
||||
|
||||
|
|
|
|||
6
render.c
6
render.c
|
|
@ -2626,6 +2626,12 @@ render_search_box(struct terminal *term)
|
|||
unsigned long cookie = shm_cookie_search(term);
|
||||
struct buffer *buf = shm_get_buffer(term->wl->shm, width, height, cookie, false, 1);
|
||||
|
||||
pixman_region32_t clip;
|
||||
pixman_region32_init_rect(&clip, 0, 0, width, height);
|
||||
pixman_image_set_clip_region32(buf->pix[0], &clip);
|
||||
pixman_region32_fini(&clip);
|
||||
|
||||
|
||||
#define WINDOW_X(x) (margin + x)
|
||||
#define WINDOW_Y(y) (term->height - margin - height + y)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue