Refactor seat operations to use an interface

This splits each seat operation (drag/move tiling/floating etc) into a
separate file and introduces a struct sway_seatop_impl to abstract the
operation.

The move_tiling_threshold operation has been merged into move_tiling.

The main logic for each operation is untouched aside from variable
renames.

The following previously-static functions have been made public:
* node_at_coords
* container_raise_floating
* render_rect
* premultiply_alpha
* scale_box
This commit is contained in:
Ryan Dwyer 2019-01-10 22:04:42 +10:00
parent 15ac580b28
commit ed5aafd90b
19 changed files with 924 additions and 646 deletions

View file

@ -50,6 +50,12 @@ struct sway_cursor {
size_t pressed_button_count;
};
struct sway_node;
struct sway_node *node_at_coords(
struct sway_seat *seat, double lx, double ly,
struct wlr_surface **surface, double *sx, double *sy);
void sway_cursor_destroy(struct sway_cursor *cursor);
struct sway_cursor *sway_cursor_create(struct sway_seat *seat);