aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2019-03-06 18:54:41 +1000
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-03-11 10:57:16 -0400
commit9bfb38521a6016042dffbe7e3242265b8134bda5 (patch)
tree4432120c30514af3e664f115c338b9a5cd5edb53 /sway/input/seat.c
parentstringop.c: refactor a few functions (diff)
downloadsway-9bfb38521a6016042dffbe7e3242265b8134bda5.tar.gz
sway-9bfb38521a6016042dffbe7e3242265b8134bda5.tar.zst
sway-9bfb38521a6016042dffbe7e3242265b8134bda5.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 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 3a68904b..be523539 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1234,3 +1234,7 @@ void seatop_render(struct sway_seat *seat, struct sway_output *output,
1234 seat->seatop_impl->render(seat, output, damage); 1234 seat->seatop_impl->render(seat, output, damage);
1235 } 1235 }
1236} 1236}
1237
1238bool seatop_allows_events(struct sway_seat *seat) {
1239 return seat->seatop_impl && seat->seatop_impl->allows_events;
1240}