aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-29 21:10:28 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-29 21:10:28 +0000
commitc8724fe65694c991c4f6bd1916ca12f6218770d3 (patch)
tree4eff9d34a356fb64617b32939ffc6e28f7487cf3
parentwayland: always flush after dispatching messages (diff)
wayland: terminal_from_surface: recognize scrollback search surfaces
This fixes an assertion when hovering over the input field for scrollback searches.
-rw-r--r--wayland.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wayland.c b/wayland.c
index 60b4f80d..3cc86429 100644
--- a/wayland.c
+++ b/wayland.c
@@ -862,11 +862,15 @@ struct terminal *
wayl_terminal_from_surface(struct wayland *wayl, struct wl_surface *surface)
{
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;
+ }
}
assert(false);
+ LOG_WARN("surface %p doesn't map to a terminal", surface);
return NULL;
}