diff options
Diffstat (limited to 'sway/input/seatop_down.c')
-rw-r--r-- | sway/input/seatop_down.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c index c2256c9a..33f9b31a 100644 --- a/sway/input/seatop_down.c +++ b/sway/input/seatop_down.c | |||
@@ -24,7 +24,7 @@ static void handle_motion(struct sway_seat *seat, uint32_t time_msec) { | |||
24 | e->moved = true; | 24 | e->moved = true; |
25 | } | 25 | } |
26 | 26 | ||
27 | static void handle_finish(struct sway_seat *seat) { | 27 | static void handle_finish(struct sway_seat *seat, uint32_t time_msec) { |
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 | struct sway_cursor *cursor = seat->cursor; |
30 | // 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 |
@@ -40,6 +40,8 @@ static void handle_finish(struct sway_seat *seat) { | |||
40 | cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy); | 40 | cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy); |
41 | cursor_send_pointer_motion(cursor, 0, node, surface, sx, sy); | 41 | cursor_send_pointer_motion(cursor, 0, node, surface, sx, sy); |
42 | } | 42 | } |
43 | seat_pointer_notify_button(seat, time_msec, | ||
44 | seat->seatop_button, WLR_BUTTON_RELEASED); | ||
43 | } | 45 | } |
44 | 46 | ||
45 | static void handle_abort(struct sway_seat *seat) { | 47 | static void handle_abort(struct sway_seat *seat) { |
@@ -60,8 +62,8 @@ static const struct sway_seatop_impl seatop_impl = { | |||
60 | .unref = handle_unref, | 62 | .unref = handle_unref, |
61 | }; | 63 | }; |
62 | 64 | ||
63 | void seatop_begin_down(struct sway_seat *seat, | 65 | void seatop_begin_down(struct sway_seat *seat, struct sway_container *con, |
64 | struct sway_container *con, uint32_t button, int sx, int sy) { | 66 | uint32_t time_msec, uint32_t button, int sx, int sy) { |
65 | seatop_abort(seat); | 67 | seatop_abort(seat); |
66 | 68 | ||
67 | struct seatop_down_event *e = | 69 | struct seatop_down_event *e = |
@@ -80,5 +82,6 @@ void seatop_begin_down(struct sway_seat *seat, | |||
80 | seat->seatop_data = e; | 82 | seat->seatop_data = e; |
81 | seat->seatop_button = button; | 83 | seat->seatop_button = button; |
82 | 84 | ||
85 | seat_pointer_notify_button(seat, time_msec, button, WLR_BUTTON_PRESSED); | ||
83 | container_raise_floating(con); | 86 | container_raise_floating(con); |
84 | } | 87 | } |