mirror of
https://github.com/swaywm/sway.git
synced 2025-11-29 06:59:46 -05: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
|
|
@ -300,7 +300,7 @@ static int scale_length(int length, int offset, float scale) {
|
|||
return round((offset + length) * scale) - round(offset * scale);
|
||||
}
|
||||
|
||||
static void scale_box(struct wlr_box *box, float scale) {
|
||||
void scale_box(struct wlr_box *box, float scale) {
|
||||
box->width = scale_length(box->width, box->x, scale);
|
||||
box->height = scale_length(box->height, box->y, scale);
|
||||
box->x = round(box->x * scale);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue