diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-24 17:38:11 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-24 17:38:11 +0000 |
| commit | d804bc8579c93a57f16214a04b5b625ae380eb78 (patch) | |
| tree | 3f0409c4233726c8e3a49c86c8cbcee8160e5758 /input.c | |
| parent | csi: delete all sixels on the 'alt' grid when switching back to 'normal' (diff) | |
term: resize: pre-calculate right/bottom margins
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -687,8 +687,8 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer, int x = wl_fixed_to_int(surface_x) * term->scale; int y = wl_fixed_to_int(surface_y) * term->scale; - int col = (x - term->x_margin) / term->cell_width; - int row = (y - term->y_margin) / term->cell_height; + int col = (x - term->margins.left) / term->cell_width; + int row = (y - term->margins.top) / term->cell_height; if (col < 0 || row < 0 || col >= term->cols || row >= term->rows) return; |
