From 9b5dca52e24c76c1625fde12f2c852fb6430cb80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 5 Jul 2019 10:27:33 +0200 Subject: [PATCH] bar/wayland: scale mouse position on mouse entry --- bar/wayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bar/wayland.c b/bar/wayland.c index f6ac6e8..f53bce4 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -149,8 +149,8 @@ wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, { struct wayland_backend *backend = data; backend->pointer.serial = serial; - backend->pointer.x = wl_fixed_to_int(surface_x); - backend->pointer.y = wl_fixed_to_int(surface_y); + backend->pointer.x = wl_fixed_to_int(surface_x) * backend->monitor->scale; + backend->pointer.y = wl_fixed_to_int(surface_y) * backend->monitor->scale; update_cursor_surface(backend); }