diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-08 08:07:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-08 08:07:25 +0000 |
| commit | a3d56262564955b803995ddb58f7c64d056b9984 (patch) | |
| tree | 8869d0c4c76b94c3552ae58673d1428734388268 /input.c | |
| parent | input: motion: regression: check for RMB when updating selection (diff) | |
input: pointer-enter: add comment describing what we're doing
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1048,6 +1048,12 @@ wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, switch ((term->active_surface = term_surface_kind(term, surface))) { case TERM_SURF_GRID: { + /* + * Translate x,y pixel coordinate to a cell coordinate, or -1 + * if the cursor is outside the grid. I.e. if it is inside the + * margins. + */ + if (x < term->margins.left || x >= term->width - term->margins.right) seat->mouse.col = -1; else |
