aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-09-26 16:41:26 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-09-26 16:41:26 +0000
commitf862f173f588b0b177626ab40a0019d683299ac7 (patch)
tree191ea1356add2d21ec3f43853f88cbf351be6774
parentmain: initialize scale to '1' (diff)
input: scale coordinates in wl_pointer_enter()
-rw-r--r--input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/input.c b/input.c
index 77856a9e..00397974 100644
--- a/input.c
+++ b/input.c
@@ -383,8 +383,8 @@ wl_pointer_enter(void *data, struct wl_pointer *wl_pointer,
{
struct terminal *term = data;
- int x = wl_fixed_to_int(surface_x) * 1; //scale
- int y = wl_fixed_to_int(surface_y) * 1; //scale
+ int x = wl_fixed_to_int(surface_x) * term->scale;
+ int y = wl_fixed_to_int(surface_y) * term->scale;
term->mouse.col = x / term->cell_width;
term->mouse.row = y / term->cell_height;