diff options
author | Tudor Brindus <me@tbrindus.ca> | 2020-05-02 12:15:39 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-02 18:28:06 +0200 |
commit | e262f93d0a93c52b72fa1e64c29021ef2784d5fb (patch) | |
tree | c7e091dae7181c289520b44f3984d9cd7854a8ca /sway/input/seatop_down.c | |
parent | input: refactor tablet motion into seatop handler (diff) | |
download | sway-e262f93d0a93c52b72fa1e64c29021ef2784d5fb.tar.gz sway-e262f93d0a93c52b72fa1e64c29021ef2784d5fb.tar.zst sway-e262f93d0a93c52b72fa1e64c29021ef2784d5fb.zip |
input: rename pointer handlers to be unambiguous
This commit renames `motion` and `axis` handlers to `pointer_motion` and
`pointer_axis`, respectively, to disambiguate them from their tablet
(and future touch) handlers. `button` is left as-is, as it is generic
across input devices.
Diffstat (limited to 'sway/input/seatop_down.c')
-rw-r--r-- | sway/input/seatop_down.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c index 04de894d..358d5c59 100644 --- a/sway/input/seatop_down.c +++ b/sway/input/seatop_down.c | |||
@@ -12,7 +12,7 @@ struct seatop_down_event { | |||
12 | double ref_con_lx, ref_con_ly; // container's x/y at start of op | 12 | double ref_con_lx, ref_con_ly; // container's x/y at start of op |
13 | }; | 13 | }; |
14 | 14 | ||
15 | static void handle_axis(struct sway_seat *seat, | 15 | static void handle_pointer_axis(struct sway_seat *seat, |
16 | struct wlr_event_pointer_axis *event) { | 16 | struct wlr_event_pointer_axis *event) { |
17 | struct sway_input_device *input_device = | 17 | struct sway_input_device *input_device = |
18 | event->device ? event->device->data : NULL; | 18 | event->device ? event->device->data : NULL; |
@@ -36,7 +36,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | static void handle_motion(struct sway_seat *seat, uint32_t time_msec, | 39 | static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec, |
40 | double dx, double dy) { | 40 | double dx, double dy) { |
41 | struct seatop_down_event *e = seat->seatop_data; | 41 | struct seatop_down_event *e = seat->seatop_data; |
42 | struct sway_container *con = e->con; | 42 | struct sway_container *con = e->con; |
@@ -57,9 +57,9 @@ static void handle_unref(struct sway_seat *seat, struct sway_container *con) { | |||
57 | } | 57 | } |
58 | 58 | ||
59 | static const struct sway_seatop_impl seatop_impl = { | 59 | static const struct sway_seatop_impl seatop_impl = { |
60 | .axis = handle_axis, | ||
61 | .button = handle_button, | 60 | .button = handle_button, |
62 | .motion = handle_motion, | 61 | .pointer_motion = handle_pointer_motion, |
62 | .pointer_axis = handle_pointer_axis, | ||
63 | .unref = handle_unref, | 63 | .unref = handle_unref, |
64 | .allow_set_cursor = true, | 64 | .allow_set_cursor = true, |
65 | }; | 65 | }; |