|
|
@ -1782,17 +1782,15 @@ clip_pointer_motion(struct weston_seat *seat, wl_fixed_t *fx, wl_fixed_t *fy) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Takes absolute values */ |
|
|
|
static void |
|
|
|
static void |
|
|
|
move_pointer(struct weston_seat *seat, wl_fixed_t dx, wl_fixed_t dy) |
|
|
|
move_pointer(struct weston_seat *seat, wl_fixed_t x, wl_fixed_t y) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_compositor *ec = seat->compositor; |
|
|
|
struct weston_compositor *ec = seat->compositor; |
|
|
|
struct wl_pointer *pointer = seat->seat.pointer; |
|
|
|
struct wl_pointer *pointer = seat->seat.pointer; |
|
|
|
struct weston_output *output; |
|
|
|
struct weston_output *output; |
|
|
|
wl_fixed_t x, y; |
|
|
|
|
|
|
|
int32_t ix, iy; |
|
|
|
int32_t ix, iy; |
|
|
|
|
|
|
|
|
|
|
|
x = pointer->x + dx; |
|
|
|
|
|
|
|
y = pointer->y + dy; |
|
|
|
|
|
|
|
clip_pointer_motion(seat, &x, &y); |
|
|
|
clip_pointer_motion(seat, &x, &y); |
|
|
|
|
|
|
|
|
|
|
|
weston_seat_update_drag_surface(seat, x - pointer->x, y - pointer->y); |
|
|
|
weston_seat_update_drag_surface(seat, x - pointer->x, y - pointer->y); |
|
|
@ -1829,7 +1827,24 @@ notify_motion(struct weston_seat *seat, |
|
|
|
|
|
|
|
|
|
|
|
weston_compositor_wake(ec); |
|
|
|
weston_compositor_wake(ec); |
|
|
|
|
|
|
|
|
|
|
|
move_pointer(seat, dx, dy); |
|
|
|
move_pointer(seat, pointer->x + dx, pointer->y + dy); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface = pointer->grab->interface; |
|
|
|
|
|
|
|
interface->motion(pointer->grab, time, |
|
|
|
|
|
|
|
pointer->grab->x, pointer->grab->y); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WL_EXPORT void |
|
|
|
|
|
|
|
notify_motion_absolute(struct weston_seat *seat, |
|
|
|
|
|
|
|
uint32_t time, wl_fixed_t x, wl_fixed_t y) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
const struct wl_pointer_grab_interface *interface; |
|
|
|
|
|
|
|
struct weston_compositor *ec = seat->compositor; |
|
|
|
|
|
|
|
struct wl_pointer *pointer = seat->seat.pointer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
weston_compositor_wake(ec); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
move_pointer(seat, x, y); |
|
|
|
|
|
|
|
|
|
|
|
interface = pointer->grab->interface; |
|
|
|
interface = pointer->grab->interface; |
|
|
|
interface->motion(pointer->grab, time, |
|
|
|
interface->motion(pointer->grab, time, |
|
|
|