summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2019-03-06 18:54:41 +1000
committerFurkan Sahin <furkan-dev@proton.me>2019-03-06 18:54:41 +1000
commitae9f22c6a71ef069bd5a2c0b42099c627dee6369 (patch)
tree4432120c30514af3e664f115c338b9a5cd5edb53 /include
parent8ad03b81902bc0818cb5cdc17752082040b447a1 (diff)
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')
-rw-r--r--include/sway/input/seat.h3
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 {
void (*unref)(struct sway_seat *seat, struct sway_container *con);
void (*render)(struct sway_seat *seat, struct sway_output *output,
pixman_region32_t *damage);
+ bool allows_events;
};
struct sway_seat_device {
@@ -239,4 +240,6 @@ void seatop_unref(struct sway_seat *seat, struct sway_container *con);
void seatop_render(struct sway_seat *seat, struct sway_output *output,
pixman_region32_t *damage);
+bool seatop_allows_events(struct sway_seat *seat);
+
#endif