diff options
Diffstat (limited to 'sway/input/seatop_down.c')
-rw-r--r-- | sway/input/seatop_down.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c index c491e9c2..c2256c9a 100644 --- a/sway/input/seatop_down.c +++ b/sway/input/seatop_down.c | |||
@@ -26,14 +26,19 @@ static void handle_motion(struct sway_seat *seat, uint32_t time_msec) { | |||
26 | 26 | ||
27 | static void handle_finish(struct sway_seat *seat) { | 27 | static void handle_finish(struct sway_seat *seat) { |
28 | struct seatop_down_event *e = seat->seatop_data; | 28 | struct seatop_down_event *e = seat->seatop_data; |
29 | struct sway_cursor *cursor = seat->cursor; | ||
29 | // Set the cursor's previous coords to the x/y at the start of the | 30 | // Set the cursor's previous coords to the x/y at the start of the |
30 | // operation, so the container change will be detected if using | 31 | // operation, so the container change will be detected if using |
31 | // focus_follows_mouse and the cursor moved off the original container | 32 | // focus_follows_mouse and the cursor moved off the original container |
32 | // during the operation. | 33 | // during the operation. |
33 | seat->cursor->previous.x = e->ref_lx; | 34 | cursor->previous.x = e->ref_lx; |
34 | seat->cursor->previous.y = e->ref_ly; | 35 | cursor->previous.y = e->ref_ly; |
35 | if (e->moved) { | 36 | if (e->moved) { |
36 | cursor_send_pointer_motion(seat->cursor, 0); | 37 | struct wlr_surface *surface = NULL; |
38 | double sx, sy; | ||
39 | struct sway_node *node = node_at_coords(seat, | ||
40 | cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy); | ||
41 | cursor_send_pointer_motion(cursor, 0, node, surface, sx, sy); | ||
37 | } | 42 | } |
38 | } | 43 | } |
39 | 44 | ||