The function expects dx,dy arguments as ints. Fix the passed values, so that they really match the types used.
Signed-off-by: Pekka Paalanen <[email protected]> --- src/compositor.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index b548cf7..b5c630f 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1621,8 +1621,8 @@ notify_motion(struct wl_seat *seat, uint32_t time, wl_fixed_t x, wl_fixed_t y) clip_pointer_motion(ws, &x, &y); weston_seat_update_drag_surface(seat, - x - seat->pointer->x, - y - seat->pointer->y); + wl_fixed_to_int(wl_fixed_sub(x, seat->pointer->x)), + wl_fixed_to_int(wl_fixed_sub(y, seat->pointer->y))); seat->pointer->x = x; seat->pointer->y = y; @@ -1853,8 +1853,8 @@ notify_pointer_focus(struct wl_seat *seat, struct weston_output *output, if (output) { weston_seat_update_drag_surface(seat, - x - seat->pointer->x, - y - seat->pointer->y); + wl_fixed_to_int(wl_fixed_sub(x, seat->pointer->x)), + wl_fixed_to_int(wl_fixed_sub(y, seat->pointer->y))); seat->pointer->x = x; seat->pointer->y = y; @@ -2573,8 +2573,8 @@ weston_seat_update_drag_surface(struct wl_seat *seat, return; weston_surface_set_position(ws->drag_surface, - ws->drag_surface->geometry.x + wl_fixed_to_double(dx), - ws->drag_surface->geometry.y + wl_fixed_to_double(dy)); + ws->drag_surface->geometry.x + dx, + ws->drag_surface->geometry.y + dy); } WL_EXPORT void -- 1.7.3.4 _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
