aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-24 17:47:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-24 17:47:08 +0000
commit01a11457a522b36fd22d46d2b539133f253ab187 (patch)
treeac37795ea39ee7417889a335effe03dc917b6349 /input.c
parentcsd: wip: something to get started... (diff)
parentsixel: CSI setters also write a reply to the client (diff)
Merge branch 'master' into csd
Diffstat (limited to 'input.c')
-rw-r--r--input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/input.c b/input.c
index c8f920b3..d04b228d 100644
--- a/input.c
+++ b/input.c
@@ -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;