summaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <[email protected]>2016-04-20 00:22:15 +0200
committerMikkel Oscar Lyderik <[email protected]>2016-04-25 00:00:49 +0200
commit3e1f78ab26e8bc6b6cefd53ee137e97533c2695e (patch)
treef158bcae9fce9af29a35bd3ec0e32b81bff87662 /sway/commands.c
parent3955c66ce80989fa9d784eb9644fd41b096b3338 (diff)
Add support for nested tabbed/stacked containers
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index ad5416f7..ff1ddc5b 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1759,6 +1759,8 @@ static struct cmd_results *cmd_layout(int argc, char **argv) {
parent = parent->parent;
}
+ enum swayc_layouts old_layout = parent->layout;
+
if (strcasecmp(argv[0], "default") == 0) {
parent->layout = parent->prev_layout;
if (parent->layout == L_NONE) {
@@ -1795,6 +1797,8 @@ static struct cmd_results *cmd_layout(int argc, char **argv) {
}
}
+ update_layout_geometry(parent, old_layout);
+
arrange_windows(parent, parent->width, parent->height);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
@@ -2032,6 +2036,7 @@ static struct cmd_results *_do_split(int argc, char **argv, int layout) {
/* regular case where new split container is build around focused container
* or in case of workspace, container inherits its children */
sway_log(L_DEBUG, "Adding new container around current focused container");
+ sway_log(L_INFO, "FOCUSED SIZE: %.f %.f", focused->width, focused->height);
swayc_t *parent = new_container(focused, layout);
set_focused_container(focused);
arrange_windows(parent, -1, -1);