seatop_down: End if surface is destroyed or other seatop starts

If the surface the pointer started to interact with is destroyed we also
want the seatop_down to end. In case a drag is initiated we receive a
call to handle_end.
This commit is contained in:
Simon Plakolb 2021-08-24 16:53:03 +02:00 committed by Tudor Brindus
parent 9e58425cb3
commit 4baf845a3a
3 changed files with 25 additions and 19 deletions

View file

@ -374,7 +374,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
transaction_commit_dirty();
}
if (state == WLR_BUTTON_PRESSED) {
seatop_begin_down_on_layer_surface(seat, surface, time_msec, sx, sy);
seatop_begin_down_on_surface(seat, surface, time_msec, sx, sy);
}
seat_pointer_notify_button(seat, time_msec, button, state);
return;