From 961a04cef08f6475ec82df5608b28a470832b096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 25 Nov 2008 22:38:56 -0500 Subject: [PATCH] Correct pointer hotspot location. --- egl-compositor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/egl-compositor.c b/egl-compositor.c index 4471753a..c1de51aa 100644 --- a/egl-compositor.c +++ b/egl-compositor.c @@ -671,9 +671,10 @@ notify_pointer_motion(struct wl_compositor *compositor, struct wl_object *source, int x, int y) { struct egl_compositor *ec = (struct egl_compositor *) compositor; + const int hotspot_x = 16, hotspot_y = 16; - ec->pointer->map.x = x; - ec->pointer->map.y = y; + ec->pointer->map.x = x - hotspot_x; + ec->pointer->map.y = y - hotspot_y; schedule_repaint(ec); }