Fix another of @orestisf1993's issues

This commit is contained in:
Drew DeVault 2018-04-06 13:57:04 -04:00
parent 1f70b94f34
commit c8be7bfc1e
2 changed files with 17 additions and 11 deletions

View file

@ -364,8 +364,8 @@ void container_move(struct sway_container *container,
return;
}
} else {
wlr_log(L_DEBUG, "Selecting sibling");
sibling = parent->children->items[index + offs];
wlr_log(L_DEBUG, "Selecting sibling id:%zd", sibling->id);
}
} else {
wlr_log(L_DEBUG, "Moving up to find a parallel container");
@ -419,9 +419,12 @@ void container_move(struct sway_container *container,
container_remove_child(container);
struct sway_container *focus_inactive = seat_get_focus_inactive(
config->handler_context.seat, sibling);
wlr_log(L_DEBUG, "Focus inactive: %zd", focus_inactive ?
focus_inactive->id : 0);
if (focus_inactive) {
while (focus_inactive->parent != sibling) {
focus_inactive = focus_inactive->parent;
}
wlr_log(L_DEBUG, "Focus inactive: id:%zd",
focus_inactive->id);
sibling = focus_inactive;
continue;
} else if (sibling->children->length) {