[PATCH xserver] xwayland: fix EnterNotify position

Tiago Vignatti tiago.vignatti at intel.com
Fri Jul 13 05:32:53 PDT 2012


enter handler wasn't updating sprite coordinates based on the Wayland event
just sent, failing when forwarding the correct EnterNotify to the X client.
This should fix it.

Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 hw/xfree86/xwayland/xwayland-input.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
index a06cf20..ebff96f 100644
--- a/hw/xfree86/xwayland/xwayland-input.c
+++ b/hw/xfree86/xwayland/xwayland-input.c
@@ -268,12 +268,17 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
     struct xwl_seat *xwl_seat = data;
     DeviceIntPtr dev = xwl_seat->pointer;
     int i;
+    int sx = wl_fixed_to_int(sx_w);
+    int sy = wl_fixed_to_int(sy_w);
 
     xwl_seat->xwl_screen->serial = serial;
     xwl_seat->pointer_enter_serial = serial;
 
     xwl_seat->focus_window = wl_surface_get_user_data(surface);
 
+    dev->spriteInfo->sprite->hot.x = sx;
+    dev->spriteInfo->sprite->hot.y = sy;
+
     SetDeviceRedirectWindow(xwl_seat->pointer, xwl_seat->focus_window->window);
 
     /* Ideally, X clients shouldn't see these button releases.  When
-- 
1.7.9.5



More information about the wayland-devel mailing list