From f862f173f588b0b177626ab40a0019d683299ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 26 Sep 2019 18:41:26 +0200 Subject: [PATCH] input: scale coordinates in wl_pointer_enter() --- input.c | 4 ++-- 1 file 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;