diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2015-07-15 13:00:37 -0500 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-07-16 19:03:56 -0700 |
commit | b7674ae4dcd35ec68d1a66730e487059d0091a7f (patch) | |
tree | 4783008643bf57dfcfaba84b442780c9d97a04d4 /desktop-shell | |
parent | 8ae2db5b0cc5673e442938aa176cb44ada3e20ca (diff) |
desktop-shell: Make surface_touch_move take a touch instead of a seat
It never actually needs the seat, and we always verify the touch pointer
before calling it, so let's just pass a touch pointer instead of having
an assumption that the seat's touch pointer has been verified.
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index afc47998..5ae395da 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -1634,7 +1634,7 @@ static const struct weston_touch_grab_interface touch_move_grab_interface = { }; static int -surface_touch_move(struct shell_surface *shsurf, struct weston_seat *seat) +surface_touch_move(struct shell_surface *shsurf, struct weston_touch *touch) { struct weston_touch_move_grab *move; @@ -1650,12 +1650,12 @@ surface_touch_move(struct shell_surface *shsurf, struct weston_seat *seat) move->active = 1; move->dx = wl_fixed_from_double(shsurf->view->geometry.x) - - seat->touch->grab_x; + touch->grab_x; move->dy = wl_fixed_from_double(shsurf->view->geometry.y) - - seat->touch->grab_y; + touch->grab_y; shell_touch_grab_start(&move->base, &touch_move_grab_interface, shsurf, - seat->touch); + touch); return 0; } @@ -1797,7 +1797,7 @@ common_surface_move(struct wl_resource *resource, seat->touch->grab_serial == serial) { surface = weston_surface_get_main_surface(seat->touch->focus->surface); if ((surface == shsurf->surface) && - (surface_touch_move(shsurf, seat) < 0)) + (surface_touch_move(shsurf, seat->touch) < 0)) wl_resource_post_no_memory(resource); } } @@ -4681,7 +4681,7 @@ touch_move_binding(struct weston_touch *touch, uint32_t time, void *data) shsurf->state.maximized) return; - surface_touch_move(shsurf, touch->seat); + surface_touch_move(shsurf, touch); } static void |