|
|
@ -49,8 +49,8 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
|
|
|
|
} else if (strcasecmp(argv[0], "splitv") == 0) {
|
|
|
|
} else if (strcasecmp(argv[0], "splitv") == 0) {
|
|
|
|
swayc_change_layout(parent, L_VERT);
|
|
|
|
swayc_change_layout(parent, L_VERT);
|
|
|
|
} else if (strcasecmp(argv[0], "toggle") == 0 && argc == 2 && strcasecmp(argv[1], "split") == 0) {
|
|
|
|
} else if (strcasecmp(argv[0], "toggle") == 0 && argc == 2 && strcasecmp(argv[1], "split") == 0) {
|
|
|
|
if (parent->layout == L_HORIZ && (parent->workspace_layout == L_NONE ||
|
|
|
|
if (parent->layout == L_HORIZ && (parent->workspace_layout == L_NONE
|
|
|
|
parent->workspace_layout == L_HORIZ)) {
|
|
|
|
|| parent->workspace_layout == L_HORIZ)) {
|
|
|
|
swayc_change_layout(parent, L_VERT);
|
|
|
|
swayc_change_layout(parent, L_VERT);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
swayc_change_layout(parent, L_HORIZ);
|
|
|
|
swayc_change_layout(parent, L_HORIZ);
|
|
|
@ -81,8 +81,8 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
|
|
|
|
is_auto_layout(container->parent->layout) &&
|
|
|
|
is_auto_layout(container->parent->layout) &&
|
|
|
|
((int)container->parent->nb_master + inc >= 0)) {
|
|
|
|
((int)container->parent->nb_master + inc >= 0)) {
|
|
|
|
for (int i = container->parent->nb_master;
|
|
|
|
for (int i = container->parent->nb_master;
|
|
|
|
i >= 0 && i < container->parent->children->length &&
|
|
|
|
i >= 0 && i < container->parent->children->length
|
|
|
|
i != (int) container->parent->nb_master + inc;) {
|
|
|
|
&& i != (int) container->parent->nb_master + inc;) {
|
|
|
|
((swayc_t *) container->parent->children->items[i])->height = -1;
|
|
|
|
((swayc_t *) container->parent->children->items[i])->height = -1;
|
|
|
|
((swayc_t *) container->parent->children->items[i])->width = -1;
|
|
|
|
((swayc_t *) container->parent->children->items[i])->width = -1;
|
|
|
|
i += inc > 0 ? 1 : -1;
|
|
|
|
i += inc > 0 ? 1 : -1;
|
|
|
|