mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
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:
parent
15ac580b28
commit
ed5aafd90b
19 changed files with 924 additions and 646 deletions
|
|
@ -360,7 +360,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) {
|
|||
struct wlr_xdg_toplevel_move_event *e = data;
|
||||
struct sway_seat *seat = e->seat->seat->data;
|
||||
if (e->serial == seat->last_button_serial) {
|
||||
seat_begin_move_floating(seat, view->container, seat->last_button);
|
||||
seatop_begin_move_floating(seat, view->container, seat->last_button);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -374,7 +374,7 @@ static void handle_request_resize(struct wl_listener *listener, void *data) {
|
|||
struct wlr_xdg_toplevel_resize_event *e = data;
|
||||
struct sway_seat *seat = e->seat->seat->data;
|
||||
if (e->serial == seat->last_button_serial) {
|
||||
seat_begin_resize_floating(seat, view->container,
|
||||
seatop_begin_resize_floating(seat, view->container,
|
||||
seat->last_button, e->edges);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue