diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-03-06 18:54:41 +1000 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-03-11 14:55:54 +0100 |
commit | d16845d5f0f7ea0316fb9d5e2b7d20b78ca41991 (patch) | |
tree | 3db6efe184aa5c311ecc89140f3f340f25db0687 /include/sway | |
parent | stringop.c: refactor a few functions (diff) | |
download | sway-d16845d5f0f7ea0316fb9d5e2b7d20b78ca41991.tar.gz sway-d16845d5f0f7ea0316fb9d5e2b7d20b78ca41991.tar.zst sway-d16845d5f0f7ea0316fb9d5e2b7d20b78ca41991.zip |
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.
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/input/seat.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index 0f5dab98..eb674b70 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h | |||
@@ -15,6 +15,7 @@ struct sway_seatop_impl { | |||
15 | void (*unref)(struct sway_seat *seat, struct sway_container *con); | 15 | void (*unref)(struct sway_seat *seat, struct sway_container *con); |
16 | void (*render)(struct sway_seat *seat, struct sway_output *output, | 16 | void (*render)(struct sway_seat *seat, struct sway_output *output, |
17 | pixman_region32_t *damage); | 17 | pixman_region32_t *damage); |
18 | bool allows_events; | ||
18 | }; | 19 | }; |
19 | 20 | ||
20 | struct sway_seat_device { | 21 | struct sway_seat_device { |
@@ -239,4 +240,6 @@ void seatop_unref(struct sway_seat *seat, struct sway_container *con); | |||
239 | void seatop_render(struct sway_seat *seat, struct sway_output *output, | 240 | void seatop_render(struct sway_seat *seat, struct sway_output *output, |
240 | pixman_region32_t *damage); | 241 | pixman_region32_t *damage); |
241 | 242 | ||
243 | bool seatop_allows_events(struct sway_seat *seat); | ||
244 | |||
242 | #endif | 245 | #endif |