mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
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`.
This commit is contained in:
parent
212baf2f75
commit
aa1c838f97
5 changed files with 54 additions and 23 deletions
|
|
@ -74,6 +74,9 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
|
|||
struct wlr_input_device *device, uint32_t time_msec, uint32_t button,
|
||||
enum wlr_button_state state);
|
||||
|
||||
void dispatch_cursor_axis(struct sway_cursor *cursor,
|
||||
struct wlr_event_pointer_axis *event);
|
||||
|
||||
void cursor_set_image(struct sway_cursor *cursor, const char *image,
|
||||
struct wl_client *client);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue