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:
Brian Ashworth 2019-01-10 11:47:34 -05:00
parent 212baf2f75
commit aa1c838f97
5 changed files with 54 additions and 23 deletions

View file

@ -491,15 +491,6 @@ The default colors are:
*seat* <seat> <seat-subcommands...>
For details on seat subcommands, see *sway-input*(5).
*seat* <seat> cursor move|set <x> <y>
Move specified seat's cursor relative to current position or wrap to
absolute coordinates (with respect to the global coordinate space).
Specifying either value as 0 will not update that coordinate.
*seat* <seat> cursor press|release left|right|1|2|3...
Simulate pressing (or releasing) the specified mouse button on the
specified seat.
*kill*
Kills (closes) the currently focused container and all of its children.