Merge branch 'clean-resize' into next
This commit is contained in:
commit
71b4fe9e60
|
@ -857,6 +857,17 @@ resize:
|
||||||
double percentage = 1.0 / children;
|
double percentage = 1.0 / children;
|
||||||
LOG("default percentage = %f\n", percentage);
|
LOG("default percentage = %f\n", percentage);
|
||||||
|
|
||||||
|
orientation_t orientation = current->parent->orientation;
|
||||||
|
|
||||||
|
if ((orientation == HORIZ &&
|
||||||
|
(direction == TOK_UP || direction == TOK_DOWN)) ||
|
||||||
|
(orientation == VERT &&
|
||||||
|
(direction == TOK_LEFT || direction == TOK_RIGHT))) {
|
||||||
|
LOG("You cannot resize in that direction. Your focus is in a %s split container currently.\n",
|
||||||
|
(orientation == HORIZ ? "horizontal" : "vertical"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (direction == TOK_UP || direction == TOK_LEFT) {
|
if (direction == TOK_UP || direction == TOK_LEFT) {
|
||||||
other = TAILQ_PREV(current, nodes_head, nodes);
|
other = TAILQ_PREV(current, nodes_head, nodes);
|
||||||
} else {
|
} else {
|
||||||
|
@ -864,7 +875,7 @@ resize:
|
||||||
}
|
}
|
||||||
if (other == TAILQ_END(workspaces)) {
|
if (other == TAILQ_END(workspaces)) {
|
||||||
LOG("No other container in this direction found, cannot resize.\n");
|
LOG("No other container in this direction found, cannot resize.\n");
|
||||||
return 0;
|
break;
|
||||||
}
|
}
|
||||||
LOG("other->percent = %f\n", other->percent);
|
LOG("other->percent = %f\n", other->percent);
|
||||||
LOG("current->percent before = %f\n", current->percent);
|
LOG("current->percent before = %f\n", current->percent);
|
||||||
|
|
Loading…
Reference in New Issue