From 551170d94067614ce42d853f09bee908ed8ff9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 24 Feb 2020 22:42:04 +0100 Subject: [PATCH] input: pointer-motion/button: ignore actions in non-main surfaces --- input.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/input.c b/input.c index 7d1c6c04..f0cac085 100644 --- a/input.c +++ b/input.c @@ -716,6 +716,9 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer, assert(term != NULL); + if (term->active_surface != TERM_SURF_GRID) + return; + int x = wl_fixed_to_int(surface_x) * term->scale; int y = wl_fixed_to_int(surface_y) * term->scale; @@ -771,6 +774,10 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, } assert(term != NULL); + + if (term->active_surface != TERM_SURF_GRID) + return; + search_cancel(term); switch (state) {