diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-01-10 22:04:42 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-01-10 22:04:42 +1000 |
commit | ed5aafd90bd850ad27dcb36ac4438ed926480394 (patch) | |
tree | 46d0b5fe8488e5d9415cbc9a732e86c1e7100ffe /sway/desktop/output.c | |
parent | Merge pull request #3341 from RedSoxFan/mouse-bindings-improved (diff) | |
download | sway-ed5aafd90bd850ad27dcb36ac4438ed926480394.tar.gz sway-ed5aafd90bd850ad27dcb36ac4438ed926480394.tar.zst sway-ed5aafd90bd850ad27dcb36ac4438ed926480394.zip |
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
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 79ad7faa..04c9b4f6 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -300,7 +300,7 @@ static int scale_length(int length, int offset, float scale) { | |||
300 | return round((offset + length) * scale) - round(offset * scale); | 300 | return round((offset + length) * scale) - round(offset * scale); |
301 | } | 301 | } |
302 | 302 | ||
303 | static void scale_box(struct wlr_box *box, float scale) { | 303 | void scale_box(struct wlr_box *box, float scale) { |
304 | box->width = scale_length(box->width, box->x, scale); | 304 | box->width = scale_length(box->width, box->x, scale); |
305 | box->height = scale_length(box->height, box->y, scale); | 305 | box->height = scale_length(box->height, box->y, scale); |
306 | box->x = round(box->x * scale); | 306 | box->x = round(box->x * scale); |