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.
This commit is contained in:
emersion 2019-02-28 19:22:47 +01:00 committed by Brian Ashworth
parent 416c6ecb99
commit 88b283c557
8 changed files with 18 additions and 18 deletions

View file

@ -1211,9 +1211,9 @@ void seatop_motion(struct sway_seat *seat, uint32_t time_msec) {
}
}
void seatop_finish(struct sway_seat *seat) {
void seatop_finish(struct sway_seat *seat, uint32_t time_msec) {
if (seat->seatop_impl && seat->seatop_impl->finish) {
seat->seatop_impl->finish(seat);
seat->seatop_impl->finish(seat, time_msec);
}
free(seat->seatop_data);
seat->seatop_data = NULL;