|
|
|
@ -1217,13 +1217,17 @@ noop_grab_focus(struct weston_pointer_grab *grab) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
move_grab_motion(struct weston_pointer_grab *grab, uint32_t time) |
|
|
|
|
move_grab_motion(struct weston_pointer_grab *grab, uint32_t time, |
|
|
|
|
wl_fixed_t x, wl_fixed_t y) |
|
|
|
|
{ |
|
|
|
|
struct weston_move_grab *move = (struct weston_move_grab *) grab; |
|
|
|
|
struct weston_pointer *pointer = grab->pointer; |
|
|
|
|
struct shell_surface *shsurf = move->base.shsurf; |
|
|
|
|
int dx = wl_fixed_to_int(pointer->x + move->dx); |
|
|
|
|
int dy = wl_fixed_to_int(pointer->y + move->dy); |
|
|
|
|
int dx, dy; |
|
|
|
|
|
|
|
|
|
weston_pointer_move(pointer, x, y); |
|
|
|
|
dx = wl_fixed_to_int(pointer->x + move->dx); |
|
|
|
|
dy = wl_fixed_to_int(pointer->y + move->dy); |
|
|
|
|
|
|
|
|
|
if (!shsurf) |
|
|
|
|
return; |
|
|
|
@ -1327,7 +1331,8 @@ struct weston_resize_grab { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time) |
|
|
|
|
resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time, |
|
|
|
|
wl_fixed_t x, wl_fixed_t y) |
|
|
|
|
{ |
|
|
|
|
struct weston_resize_grab *resize = (struct weston_resize_grab *) grab; |
|
|
|
|
struct weston_pointer *pointer = grab->pointer; |
|
|
|
@ -1336,6 +1341,8 @@ resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time) |
|
|
|
|
wl_fixed_t from_x, from_y; |
|
|
|
|
wl_fixed_t to_x, to_y; |
|
|
|
|
|
|
|
|
|
weston_pointer_move(pointer, x, y); |
|
|
|
|
|
|
|
|
|
if (!shsurf) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
@ -1513,8 +1520,10 @@ busy_cursor_grab_focus(struct weston_pointer_grab *base) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
busy_cursor_grab_motion(struct weston_pointer_grab *grab, uint32_t time) |
|
|
|
|
busy_cursor_grab_motion(struct weston_pointer_grab *grab, uint32_t time, |
|
|
|
|
wl_fixed_t x, wl_fixed_t y) |
|
|
|
|
{ |
|
|
|
|
weston_pointer_move(grab->pointer, x, y); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
@ -2270,12 +2279,15 @@ popup_grab_focus(struct weston_pointer_grab *grab) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
popup_grab_motion(struct weston_pointer_grab *grab, uint32_t time) |
|
|
|
|
popup_grab_motion(struct weston_pointer_grab *grab, uint32_t time, |
|
|
|
|
wl_fixed_t x, wl_fixed_t y) |
|
|
|
|
{ |
|
|
|
|
struct weston_pointer *pointer = grab->pointer; |
|
|
|
|
struct wl_resource *resource; |
|
|
|
|
wl_fixed_t sx, sy; |
|
|
|
|
|
|
|
|
|
weston_pointer_move(pointer, x, y); |
|
|
|
|
|
|
|
|
|
wl_resource_for_each(resource, &pointer->focus_resource_list) { |
|
|
|
|
weston_view_from_global_fixed(pointer->focus, |
|
|
|
|
pointer->x, pointer->y, |
|
|
|
@ -3086,7 +3098,8 @@ terminate_binding(struct weston_seat *seat, uint32_t time, uint32_t key, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
rotate_grab_motion(struct weston_pointer_grab *grab, uint32_t time) |
|
|
|
|
rotate_grab_motion(struct weston_pointer_grab *grab, uint32_t time, |
|
|
|
|
wl_fixed_t x, wl_fixed_t y) |
|
|
|
|
{ |
|
|
|
|
struct rotate_grab *rotate = |
|
|
|
|
container_of(grab, struct rotate_grab, base.grab); |
|
|
|
@ -3094,6 +3107,8 @@ rotate_grab_motion(struct weston_pointer_grab *grab, uint32_t time) |
|
|
|
|
struct shell_surface *shsurf = rotate->base.shsurf; |
|
|
|
|
float cx, cy, dx, dy, cposx, cposy, dposx, dposy, r; |
|
|
|
|
|
|
|
|
|
weston_pointer_move(pointer, x, y); |
|
|
|
|
|
|
|
|
|
if (!shsurf) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|