mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Add support for nested tabbed/stacked containers
This commit is contained in:
parent
3955c66ce8
commit
3e1f78ab26
8 changed files with 234 additions and 78 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue