summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moreau <oreaus@gmail.com>2012-05-14 11:21:37 -0600
committerChristopher James Halse Rogers <christopher.halse.rogers@canonical.com>2012-06-13 15:26:20 +1000
commit823bc5f5bc6b0b4f511b990816df36a82f7c71ca (patch)
treee9e42627ff15fc601bc72d0ae9086a0523dcd682
parent31c3f5f87c11f2b4d60f41d2b470e4f4d8602b07 (diff)
xwayland-input: Track wayland protocol changes.
Use wl_fixed_t types in the motion and enter handlers so xwayland clients get the correct x/y values. Without this, all pointer input is broken. Thanks to Martin Minarik for bisecting to track down the initial problem.
-rw-r--r--hw/xfree86/xwayland/xwayland-input.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
index 7cc7a1f37..e8779ff01 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;
+ int sx = wl_fixed_to_int(sx_w);
+ int sy = wl_fixed_to_int(sy_w);
if (!xwl_input_device->focus_window)
return ;
@@ -345,7 +347,7 @@ static void
input_device_handle_pointer_enter(void *data,
struct wl_input_device *input_device,
uint32_t serial, struct wl_surface *surface,
- int32_t sx, int32_t sy)
+ wl_fixed_t sx_w, wl_fixed_t sy_w)
{
struct xwl_input_device *xwl_input_device = data;
@@ -428,7 +430,7 @@ input_device_handle_touch_down(void *data,
struct wl_input_device *wl_input_device,
uint32_t serial, uint32_t time,
struct wl_surface *surface,
- int32_t id, int32_t x, int32_t y)
+ int32_t id, wl_fixed_t x, wl_fixed_t y)
{
}
@@ -442,8 +444,8 @@ input_device_handle_touch_up(void *data,
static void
input_device_handle_touch_motion(void *data,
struct wl_input_device *wl_input_device,
- uint32_t time,
- int32_t id, int32_t x, int32_t y)
+ uint32_t time, int32_t id,
+ wl_fixed_t x, wl_fixed_t y)
{
}