From 7be309710dcd679e0b570bc2f076ac00ae9ad65d Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 30 Oct 2018 23:27:49 +1000 Subject: Remove enum movement_direction There's no point having both movement_direction and wlr_direction. This replaces the former with the latter. As movement_direction also contained MOVE_PARENT and MOVE_CHILD items, these are now checked specifically in the focus command and handled in separate functions, just like the other focus variants. --- sway/tree/output.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/output.c b/sway/tree/output.c index 632501e1..b84053d9 100644 --- a/sway/tree/output.c +++ b/sway/tree/output.c @@ -274,16 +274,14 @@ struct sway_output *output_from_wlr_output(struct wlr_output *output) { } struct sway_output *output_get_in_direction(struct sway_output *reference, - enum movement_direction direction) { - enum wlr_direction wlr_dir = 0; - if (!sway_assert(sway_dir_to_wlr(direction, &wlr_dir), - "got invalid direction: %d", direction)) { + enum wlr_direction direction) { + if (!sway_assert(direction, "got invalid direction: %d", direction)) { return NULL; } int lx = reference->wlr_output->lx + reference->width / 2; int ly = reference->wlr_output->ly + reference->height / 2; struct wlr_output *wlr_adjacent = wlr_output_layout_adjacent_output( - root->output_layout, wlr_dir, reference->wlr_output, lx, ly); + root->output_layout, direction, reference->wlr_output, lx, ly); if (!wlr_adjacent) { return NULL; } -- cgit v1.2.3