input: pointer-motion/button: ignore actions in non-main surfaces

This commit is contained in:
Daniel Eklöf 2020-02-24 22:42:04 +01:00
parent 7b18f8394e
commit 551170d940
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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) {