mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
input: ignore mouse motion outside our window
This commit is contained in:
parent
18070cf286
commit
c43b49dab6
1 changed files with 3 additions and 0 deletions
3
input.c
3
input.c
|
|
@ -307,6 +307,9 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
|
|||
int col = x / term->cell_width;
|
||||
int row = y / term->cell_height;
|
||||
|
||||
if (col < 0 || row < 0 || col >= term->cols || row >= term->rows)
|
||||
return;
|
||||
|
||||
bool update_selection = term->mouse.button == BTN_LEFT;
|
||||
bool update_selection_early = term->selection.end.row == -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue