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/xdg_shell_v6.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/xdg_shell_v6.c')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 4bc83b8e..9f6741c8 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -357,7 +357,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) { | |||
357 | struct wlr_xdg_toplevel_v6_move_event *e = data; | 357 | struct wlr_xdg_toplevel_v6_move_event *e = data; |
358 | struct sway_seat *seat = e->seat->seat->data; | 358 | struct sway_seat *seat = e->seat->seat->data; |
359 | if (e->serial == seat->last_button_serial) { | 359 | if (e->serial == seat->last_button_serial) { |
360 | seat_begin_move_floating(seat, view->container, seat->last_button); | 360 | seatop_begin_move_floating(seat, view->container, seat->last_button); |
361 | } | 361 | } |
362 | } | 362 | } |
363 | 363 | ||
@@ -371,7 +371,7 @@ static void handle_request_resize(struct wl_listener *listener, void *data) { | |||
371 | struct wlr_xdg_toplevel_v6_resize_event *e = data; | 371 | struct wlr_xdg_toplevel_v6_resize_event *e = data; |
372 | struct sway_seat *seat = e->seat->seat->data; | 372 | struct sway_seat *seat = e->seat->seat->data; |
373 | if (e->serial == seat->last_button_serial) { | 373 | if (e->serial == seat->last_button_serial) { |
374 | seat_begin_resize_floating(seat, view->container, | 374 | seatop_begin_resize_floating(seat, view->container, |
375 | seat->last_button, e->edges); | 375 | seat->last_button, e->edges); |
376 | } | 376 | } |
377 | } | 377 | } |