aboutsummaryrefslogtreecommitdiff
path: root/include/sway/input
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-02-28 19:22:47 +0100
committerBrian Ashworth <bosrsf04@gmail.com>2019-02-28 23:02:06 -0500
commit88b283c55713c45968e2df5f8b89a40a0b32f720 (patch)
tree4fad7681ca82cf833920731624ce9f52df709bc0 /include/sway/input
parent416c6ecb99f90a7c84cce0b106401652692a4681 (diff)
downloadsway-88b283c55713c45968e2df5f8b89a40a0b32f720.tar.xz
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')
-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;
struct sway_seatop_impl {
void (*motion)(struct sway_seat *seat, uint32_t time_msec);
- void (*finish)(struct sway_seat *seat);
+ void (*finish)(struct sway_seat *seat, uint32_t time_msec);
void (*abort)(struct sway_seat *seat);
void (*unref)(struct sway_seat *seat, struct sway_container *con);
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);
void drag_icon_update_position(struct sway_drag_icon *icon);
-void seatop_begin_down(struct sway_seat *seat,
- struct sway_container *con, uint32_t button, int sx, int sy);
+void seatop_begin_down(struct sway_seat *seat, struct sway_container *con,
+ uint32_t time_msec, uint32_t button, int sx, int sy);
void seatop_begin_move_floating(struct sway_seat *seat,
struct sway_container *con, uint32_t button);
@@ -218,7 +218,7 @@ void seatop_motion(struct sway_seat *seat, uint32_t time_msec);
/**
* End a seatop and apply the affects.
*/
-void seatop_finish(struct sway_seat *seat);
+void seatop_finish(struct sway_seat *seat, uint32_t time_msec);
/**
* End a seatop without applying the affects.
@@ -239,5 +239,4 @@ void seatop_unref(struct sway_seat *seat, struct sway_container *con);
void seatop_render(struct sway_seat *seat, struct sway_output *output,
pixman_region32_t *damage);
-
#endif