mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-08 08:20:59 -04:00
wayland: terminal_from_surface: recognize scrollback search surfaces
This fixes an assertion when hovering over the input field for scrollback searches.
This commit is contained in:
parent
304ee33fd6
commit
c8724fe656
1 changed files with 5 additions and 1 deletions
|
|
@ -862,11 +862,15 @@ struct terminal *
|
||||||
wayl_terminal_from_surface(struct wayland *wayl, struct wl_surface *surface)
|
wayl_terminal_from_surface(struct wayland *wayl, struct wl_surface *surface)
|
||||||
{
|
{
|
||||||
tll_foreach(wayl->terms, it) {
|
tll_foreach(wayl->terms, it) {
|
||||||
if (it->item->window->surface == surface)
|
if (it->item->window->surface == surface ||
|
||||||
|
it->item->window->search_surface == surface)
|
||||||
|
{
|
||||||
return it->item;
|
return it->item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(false);
|
assert(false);
|
||||||
|
LOG_WARN("surface %p doesn't map to a terminal", surface);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue