Introduce orientation_from_direction

This commit is contained in:
Orestis Floros
2018-08-23 15:36:23 +03:00
parent 72cc719c5d
commit 6e1b79e057
4 changed files with 16 additions and 2 deletions

View File

@ -57,7 +57,7 @@ bool resize_find_tiling_participants(Con **current, Con **other, direction_t dir
}
/* Go up in the tree and search for a container to resize */
const orientation_t search_orientation = ((direction == D_LEFT || direction == D_RIGHT) ? HORIZ : VERT);
const orientation_t search_orientation = orientation_from_direction(direction);
const bool dir_backwards = (direction == D_UP || direction == D_LEFT);
while (first->type != CT_WORKSPACE &&
first->type != CT_FLOATING_CON &&