diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-03-16 09:18:54 +1000 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-17 10:02:04 -0600 |
commit | fb3475e291ea6be94131c19fdc006e9ad873ea5f (patch) | |
tree | edf7a13eb1ee74f8efd14a8d7b5355f820a8b10a /sway/input/seatop_down.c | |
parent | config/output: revamp identifier/name layering (diff) | |
download | sway-fb3475e291ea6be94131c19fdc006e9ad873ea5f.tar.gz sway-fb3475e291ea6be94131c19fdc006e9ad873ea5f.tar.zst sway-fb3475e291ea6be94131c19fdc006e9ad873ea5f.zip |
Replace seatup allows_events with button callback
Diffstat (limited to 'sway/input/seatop_down.c')
-rw-r--r-- | sway/input/seatop_down.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c index 895571b1..fb2cf1d0 100644 --- a/sway/input/seatop_down.c +++ b/sway/input/seatop_down.c | |||
@@ -11,6 +11,12 @@ struct seatop_down_event { | |||
11 | bool moved; | 11 | bool moved; |
12 | }; | 12 | }; |
13 | 13 | ||
14 | static void handle_button(struct sway_seat *seat, uint32_t time_msec, | ||
15 | struct wlr_input_device *device, uint32_t button, | ||
16 | enum wlr_button_state state) { | ||
17 | seat_pointer_notify_button(seat, time_msec, button, state); | ||
18 | } | ||
19 | |||
14 | static void handle_motion(struct sway_seat *seat, uint32_t time_msec) { | 20 | static void handle_motion(struct sway_seat *seat, uint32_t time_msec) { |
15 | struct seatop_down_event *e = seat->seatop_data; | 21 | struct seatop_down_event *e = seat->seatop_data; |
16 | struct sway_container *con = e->con; | 22 | struct sway_container *con = e->con; |
@@ -54,11 +60,11 @@ static void handle_unref(struct sway_seat *seat, struct sway_container *con) { | |||
54 | } | 60 | } |
55 | 61 | ||
56 | static const struct sway_seatop_impl seatop_impl = { | 62 | static const struct sway_seatop_impl seatop_impl = { |
63 | .button = handle_button, | ||
57 | .motion = handle_motion, | 64 | .motion = handle_motion, |
58 | .finish = handle_finish, | 65 | .finish = handle_finish, |
59 | .abort = handle_abort, | 66 | .abort = handle_abort, |
60 | .unref = handle_unref, | 67 | .unref = handle_unref, |
61 | .allows_events = true, | ||
62 | }; | 68 | }; |
63 | 69 | ||
64 | void seatop_begin_down(struct sway_seat *seat, struct sway_container *con, | 70 | void seatop_begin_down(struct sway_seat *seat, struct sway_container *con, |