[PATCH xserver v4] input: Track wayland protocol changes.

Scott Moreau oreaus at gmail.com
Sun May 13 09:03:19 PDT 2012

Use wl_fixed_t types in the input handler. Without this,
pointer x/y values are incorrect for X clients and thus,
pointer input will not work. Thanks to Martin Minarik for
bisecting to track down the problem.

Changed the commit message again to be more correct about
what was fixed. Sorry for all the noise.

 hw/xfree86/xwayland/xwayland-input.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
index 7cc7a1f..82c53c4 100644
--- a/hw/xfree86/xwayland/xwayland-input.c
+++ b/hw/xfree86/xwayland/xwayland-input.c
@@ -268,11 +268,13 @@ device_added(struct xwl_input_device *xwl_input_device, const char *driver)
 static void
 input_device_handle_motion(void *data, struct wl_input_device *input_device,
-			   uint32_t time, int32_t sx, int32_t sy)
+			   uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w)
     struct xwl_input_device *xwl_input_device = data;
     struct xwl_screen *xwl_screen = xwl_input_device->xwl_screen;
     int32_t dx, dy, lx, ly;
+    float sx = wl_fixed_to_double(sx_w);
+    float sy = wl_fixed_to_double(sy_w);
     if (!xwl_input_device->focus_window)
 	return ;

More information about the wayland-devel mailing list