mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
input: pointer-motion/button: ignore actions in non-main surfaces
This commit is contained in:
parent
7b18f8394e
commit
551170d940
1 changed files with 7 additions and 0 deletions
7
input.c
7
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue