diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-11 09:09:34 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-11 15:38:02 +0000 |
| commit | c43b49dab6a22dc557cd6dd791bfb2e092130604 (patch) | |
| tree | 26c8d208259b3022302d00c710590dcea71307ab | |
| parent | selection: disable debug logging (diff) | |
input: ignore mouse motion outside our window
| -rw-r--r-- | input.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |
