Don't send button events to surfaces when dragging or resizing

It turns out sending button events during all seat operations is not
desirable. This patch introduces a new property
`seatop_impl.allows_events` which allows each operation to define
whether button events should be passed to the surface or not.

The `down` seat operation is the only one that supports this. As all the
other seatops don't support it, the calls to seat_pointer_notify_button
prior to starting them have been removed.
This commit is contained in:
Ryan Dwyer 2019-03-06 18:54:41 +10:00 committed by emersion
parent 00570c139e
commit d16845d5f0
4 changed files with 11 additions and 8 deletions

View file

@ -1234,3 +1234,7 @@ void seatop_render(struct sway_seat *seat, struct sway_output *output,
seat->seatop_impl->render(seat, output, damage);
}
}
bool seatop_allows_events(struct sway_seat *seat) {
return seat->seatop_impl && seat->seatop_impl->allows_events;
}