diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-10 11:47:34 -0500 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-10 11:47:34 -0500 |
commit | aa1c838f9733f9b5e90e8267a10e455790cd2642 (patch) | |
tree | cf88e53cff1e0d49a52df4d5a38ad5d1e1d7e959 /include | |
parent | Merge pull request #3400 from ianyfan/config-brace (diff) | |
download | sway-aa1c838f9733f9b5e90e8267a10e455790cd2642.tar.gz sway-aa1c838f9733f9b5e90e8267a10e455790cd2642.tar.zst sway-aa1c838f9733f9b5e90e8267a10e455790cd2642.zip |
seat_cmd_cursor: utilize mouse button helpers
This modifies `seat_cmd_cursor` to utilize `get_mouse_button` when
parsing mouse buttons for the `press` and `release` operations. All x11
buttons, button event names, and button event codes are supported.
For x11 axis buttons, `dispatch_cursor_axis` is used instead of
`dispatch_cursor_button`. However the `press`/`release` state is ignored
and the either axis event is processed. This also removes support for
`left` and `right` in favor of `BTN_LEFT` and `BTN_RIGHT`.
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/input/cursor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index 4636bf6b..e6477b4a 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h | |||
@@ -74,6 +74,9 @@ void dispatch_cursor_button(struct sway_cursor *cursor, | |||
74 | struct wlr_input_device *device, uint32_t time_msec, uint32_t button, | 74 | struct wlr_input_device *device, uint32_t time_msec, uint32_t button, |
75 | enum wlr_button_state state); | 75 | enum wlr_button_state state); |
76 | 76 | ||
77 | void dispatch_cursor_axis(struct sway_cursor *cursor, | ||
78 | struct wlr_event_pointer_axis *event); | ||
79 | |||
77 | void cursor_set_image(struct sway_cursor *cursor, const char *image, | 80 | void cursor_set_image(struct sway_cursor *cursor, const char *image, |
78 | struct wl_client *client); | 81 | struct wl_client *client); |
79 | 82 | ||