aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2019-02-28 19:22:47 +0100
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-03-04 12:50:47 -0500
commitacb23fe89199c3c7a86f2bc94904114f2fbab4a7 (patch)
tree215c1173962ae6ae179b5fc9d2268af9c112f22c /include/sway/input/seat.h
parenttray: fix pixmap colors (diff)
downloadsway-acb23fe89199c3c7a86f2bc94904114f2fbab4a7.tar.gz
sway-acb23fe89199c3c7a86f2bc94904114f2fbab4a7.tar.zst
sway-acb23fe89199c3c7a86f2bc94904114f2fbab4a7.zip
seat: don't send button release when not pressed
All seat operations except "down" eat the button pressed event and don't send it to clients. Thus, when ending such seat operations we shouldn't send the button released event. This commit moves the logic used to send pressed/released into the "down" operation.
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r--include/sway/input/seat.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 8fedf797..0f5dab98 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -10,7 +10,7 @@ struct sway_seat;
10 10
11struct sway_seatop_impl { 11struct sway_seatop_impl {
12 void (*motion)(struct sway_seat *seat, uint32_t time_msec); 12 void (*motion)(struct sway_seat *seat, uint32_t time_msec);
13 void (*finish)(struct sway_seat *seat); 13 void (*finish)(struct sway_seat *seat, uint32_t time_msec);
14 void (*abort)(struct sway_seat *seat); 14 void (*abort)(struct sway_seat *seat);
15 void (*unref)(struct sway_seat *seat, struct sway_container *con); 15 void (*unref)(struct sway_seat *seat, struct sway_container *con);
16 void (*render)(struct sway_seat *seat, struct sway_output *output, 16 void (*render)(struct sway_seat *seat, struct sway_output *output,
@@ -185,8 +185,8 @@ bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface);
185 185
186void drag_icon_update_position(struct sway_drag_icon *icon); 186void drag_icon_update_position(struct sway_drag_icon *icon);
187 187
188void seatop_begin_down(struct sway_seat *seat, 188void seatop_begin_down(struct sway_seat *seat, struct sway_container *con,
189 struct sway_container *con, uint32_t button, int sx, int sy); 189 uint32_t time_msec, uint32_t button, int sx, int sy);
190 190
191void seatop_begin_move_floating(struct sway_seat *seat, 191void seatop_begin_move_floating(struct sway_seat *seat,
192 struct sway_container *con, uint32_t button); 192 struct sway_container *con, uint32_t button);
@@ -218,7 +218,7 @@ void seatop_motion(struct sway_seat *seat, uint32_t time_msec);
218/** 218/**
219 * End a seatop and apply the affects. 219 * End a seatop and apply the affects.
220 */ 220 */
221void seatop_finish(struct sway_seat *seat); 221void seatop_finish(struct sway_seat *seat, uint32_t time_msec);
222 222
223/** 223/**
224 * End a seatop without applying the affects. 224 * End a seatop without applying the affects.
@@ -239,5 +239,4 @@ void seatop_unref(struct sway_seat *seat, struct sway_container *con);
239void seatop_render(struct sway_seat *seat, struct sway_output *output, 239void seatop_render(struct sway_seat *seat, struct sway_output *output,
240 pixman_region32_t *damage); 240 pixman_region32_t *damage);
241 241
242
243#endif 242#endif