Skip to content

Commit

Permalink
add focus changing between floating containers
Browse files Browse the repository at this point in the history
It will also wrap if needed.
  • Loading branch information
D.B committed Oct 7, 2016
1 parent d3f5ac8 commit bf605f4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sway/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,13 @@ swayc_t *get_swayc_in_direction_under(swayc_t *container, enum movement_directio
if (can_move) {
int desired = index_child(container) + diff;
if (container->is_floating) {
can_move = false;
if (desired < 0) {
return parent->floating->items[parent->floating->length-1];
} else if (desired >= parent->floating->length){
return parent->floating->items[0];
} else {
return parent->floating->items[desired];
}
} else if (desired < 0 || desired >= parent->children->length) {
can_move = false;
int len = parent->children->length;
Expand Down

0 comments on commit bf605f4

Please sign in to comment.