From 44557dc7cf2749469c0f093034f19491f710f540 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 14 Aug 2020 07:35:01 +0200 Subject: input: don't crash on mouse motion events on the render timer surface --- terminal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index 1c97ee53..70763aa6 100644 --- a/terminal.c +++ b/terminal.c @@ -2412,12 +2412,14 @@ term_print(struct terminal *term, wchar_t wc, int width) enum term_surface term_surface_kind(const struct terminal *term, const struct wl_surface *surface) { - if (surface == term->window->surface) + if (likely(surface == term->window->surface)) return TERM_SURF_GRID; else if (surface == term->window->search_surface) return TERM_SURF_SEARCH; else if (surface == term->window->scrollback_indicator_surface) return TERM_SURF_SCROLLBACK_INDICATOR; + else if (surface == term->window->render_timer_surface) + return TERM_SURF_RENDER_TIMER; else if (surface == term->window->csd.surface[CSD_SURF_TITLE]) return TERM_SURF_TITLE; else if (surface == term->window->csd.surface[CSD_SURF_LEFT]) -- cgit v1.3