diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 3445dacec..49a0557f5 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -982,7 +982,7 @@ surface_keyboard_focus_lost(struct weston_surface *surface) static void touch_move_grab_down(struct weston_touch_grab *grab, const struct timespec *time, - int touch_id, wl_fixed_t x, wl_fixed_t y) + int touch_id, struct weston_coord_global c) { } @@ -1006,7 +1006,7 @@ touch_move_grab_up(struct weston_touch_grab *grab, const struct timespec *time, static void touch_move_grab_motion(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t x, wl_fixed_t y) + struct weston_coord_global unused) { struct weston_touch_move_grab *move = (struct weston_touch_move_grab *) grab; struct shell_surface *shsurf = move->base.shsurf; diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index 6fef2902b..bbe26b45a 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -668,16 +668,14 @@ struct weston_touch_grab_interface { void (*down)(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t sx, - wl_fixed_t sy); + struct weston_coord_global c); void (*up)(struct weston_touch_grab *grab, const struct timespec *time, int touch_id); void (*motion)(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t sx, - wl_fixed_t sy); + struct weston_coord_global c); void (*frame)(struct weston_touch_grab *grab); void (*cancel)(struct weston_touch_grab *grab); }; diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c index 279e24716..ce5f1013c 100644 --- a/ivi-shell/hmi-controller.c +++ b/ivi-shell/hmi-controller.c @@ -1712,7 +1712,7 @@ pointer_move_grab_motion(struct weston_pointer_grab *grab, static void touch_move_grab_motion(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t x, wl_fixed_t y) + struct weston_coord_global c) { struct touch_move_grab *tch_move_grab = (struct touch_move_grab *)grab; struct hmi_controller *hmi_ctrl = @@ -1748,7 +1748,7 @@ pointer_move_workspace_grab_button(struct weston_pointer_grab *grab, static void touch_nope_grab_down(struct weston_touch_grab *grab, const struct timespec *time, - int touch_id, wl_fixed_t sx, wl_fixed_t sy) + int touch_id, struct weston_coord_global c) { } diff --git a/kiosk-shell/kiosk-shell-grab.c b/kiosk-shell/kiosk-shell-grab.c index fb68f6b8d..bff706fb3 100644 --- a/kiosk-shell/kiosk-shell-grab.c +++ b/kiosk-shell/kiosk-shell-grab.c @@ -133,7 +133,7 @@ static const struct weston_pointer_grab_interface pointer_move_grab_interface = static void touch_move_grab_down(struct weston_touch_grab *grab, const struct timespec *time, - int touch_id, wl_fixed_t x, wl_fixed_t y) + int touch_id, struct weston_coord_global c) { } @@ -154,7 +154,7 @@ touch_move_grab_up(struct weston_touch_grab *touch_grab, static void touch_move_grab_motion(struct weston_touch_grab *touch_grab, const struct timespec *time, int touch_id, - wl_fixed_t x, wl_fixed_t y) + struct weston_coord_global unused) { struct kiosk_shell_grab *shgrab = container_of(touch_grab, struct kiosk_shell_grab, touch_grab); diff --git a/libweston/data-device.c b/libweston/data-device.c index 3abfa9221..1c6698756 100644 --- a/libweston/data-device.c +++ b/libweston/data-device.c @@ -753,7 +753,7 @@ static const struct weston_pointer_grab_interface pointer_drag_grab_interface = static void drag_grab_touch_down(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t sx, wl_fixed_t sy) + struct weston_coord_global c) { } @@ -801,7 +801,7 @@ drag_grab_touch_focus(struct weston_touch_drag *drag) static void drag_grab_touch_motion(struct weston_touch_grab *grab, const struct timespec *time, - int touch_id, wl_fixed_t x, wl_fixed_t y) + int touch_id, struct weston_coord_global unused) { struct weston_touch_drag *touch_drag = container_of(grab, struct weston_touch_drag, grab); diff --git a/libweston/desktop/seat.c b/libweston/desktop/seat.c index bc6b310af..ecdeaf178 100644 --- a/libweston/desktop/seat.c +++ b/libweston/desktop/seat.c @@ -190,11 +190,8 @@ static void weston_desktop_seat_popup_grab_touch_down(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t sx, wl_fixed_t sy) + struct weston_coord_global pos) { - struct weston_coord_global pos; - - pos.c = weston_coord_from_fixed(sx, sy); weston_touch_send_down(grab->touch, time, touch_id, pos); } @@ -210,11 +207,8 @@ static void weston_desktop_seat_popup_grab_touch_motion(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t sx, wl_fixed_t sy) + struct weston_coord_global pos) { - struct weston_coord_global pos; - - pos.c = weston_coord_from_fixed(sx, sy); weston_touch_send_motion(grab->touch, time, touch_id, pos); } diff --git a/libweston/input.c b/libweston/input.c index eb05fde21..21080f99b 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -874,11 +874,8 @@ weston_touch_send_down(struct weston_touch *touch, const struct timespec *time, static void default_grab_touch_down(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t x, wl_fixed_t y) + struct weston_coord_global pos) { - struct weston_coord_global pos; - - pos.c = weston_coord_from_fixed(x, y); weston_touch_send_down(grab->touch, time, touch_id, pos); } @@ -966,11 +963,8 @@ weston_touch_send_motion(struct weston_touch *touch, static void default_grab_touch_motion(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, - wl_fixed_t x, wl_fixed_t y) + struct weston_coord_global pos) { - struct weston_coord_global pos; - - pos.c = weston_coord_from_fixed(x, y); weston_touch_send_motion(grab->touch, time, touch_id, pos); } @@ -2878,15 +2872,9 @@ process_touch_normal(struct weston_touch_device *device, struct weston_touch_grab *grab = device->aggregate->grab; struct weston_compositor *ec = device->aggregate->seat->compositor; struct weston_view *ev; - wl_fixed_t x, y; - if (pos) { - assert(touch_type != WL_TOUCH_UP); - x = wl_fixed_from_double(pos->c.x); - y = wl_fixed_from_double(pos->c.y); - } else { - assert(touch_type == WL_TOUCH_UP); - } + if (touch_type != WL_TOUCH_UP) + assert(pos); /* Update grab's global coordinates. */ if (touch_id == touch->grab_touch_id && touch_type != WL_TOUCH_UP) @@ -2912,7 +2900,7 @@ process_touch_normal(struct weston_touch_device *device, weston_compositor_run_touch_binding(ec, touch, time, touch_type); - grab->interface->down(grab, time, touch_id, x, y); + grab->interface->down(grab, time, touch_id, *pos); if (touch->num_tp == 1) { touch->grab_serial = wl_display_get_serial(ec->wl_display); @@ -2927,7 +2915,7 @@ process_touch_normal(struct weston_touch_device *device, if (!ev) break; - grab->interface->motion(grab, time, touch_id, x, y); + grab->interface->motion(grab, time, touch_id, *pos); break; case WL_TOUCH_UP: grab->interface->up(grab, time, touch_id);