aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/input.c b/input.c
index 07809cfe..d2c85ea3 100644
--- a/input.c
+++ b/input.c
@@ -404,8 +404,9 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
{
struct terminal *term = data;
- int x = wl_fixed_to_int(surface_x) * 1;//backend->monitor->scale;
- int y = wl_fixed_to_int(surface_y) * 1;//backend->monitor->scale;
+ const int scale = term->scale >= 1 ? term->scale : 1;
+ int x = wl_fixed_to_int(surface_x) * scale;
+ int y = wl_fixed_to_int(surface_y) * scale;
int col = (x - term->x_margin) / term->cell_width;
int row = (y - term->y_margin) / term->cell_height;