From ed5aafd90bd850ad27dcb36ac4438ed926480394 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 10 Jan 2019 22:04:42 +1000 Subject: 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 --- sway/desktop/xwayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sway/desktop/xwayland.c') diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 1838ad32..080f6c41 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -470,7 +470,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) { return; } struct sway_seat *seat = input_manager_current_seat(); - seat_begin_move_floating(seat, view->container, seat->last_button); + seatop_begin_move_floating(seat, view->container, seat->last_button); } static void handle_request_resize(struct wl_listener *listener, void *data) { @@ -486,7 +486,7 @@ static void handle_request_resize(struct wl_listener *listener, void *data) { } struct wlr_xwayland_resize_event *e = data; struct sway_seat *seat = input_manager_current_seat(); - seat_begin_resize_floating(seat, view->container, + seatop_begin_resize_floating(seat, view->container, seat->last_button, e->edges); } -- cgit v1.2.3-54-g00ecf