[PATCH xserver v3] input: Track wayland protocol changes.
Scott Moreau
oreaus at gmail.com
Sun May 13 08:30:31 PDT 2012
Use wl_fixed_t types in the input handler. Without this,
button click x/y values are way off target. Thanks to
Martin Minarik for bisecting to track down the problem.
---
Changed the commit message to explain what was fixed.
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 ;
--
1.7.7.6
More information about the wayland-devel
mailing list