aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
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 /sway/input/seat.c
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 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index a16d3f27..9888ddfc 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1211,9 +1211,9 @@ void seatop_motion(struct sway_seat *seat, uint32_t time_msec) {
1211 } 1211 }
1212} 1212}
1213 1213
1214void seatop_finish(struct sway_seat *seat) { 1214void seatop_finish(struct sway_seat *seat, uint32_t time_msec) {
1215 if (seat->seatop_impl && seat->seatop_impl->finish) { 1215 if (seat->seatop_impl && seat->seatop_impl->finish) {
1216 seat->seatop_impl->finish(seat); 1216 seat->seatop_impl->finish(seat, time_msec);
1217 } 1217 }
1218 free(seat->seatop_data); 1218 free(seat->seatop_data);
1219 seat->seatop_data = NULL; 1219 seat->seatop_data = NULL;