diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-04-02 15:40:40 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-02 15:40:40 -0400 |
commit | d070244362f7d34bc15418154e52f8c968fbad41 (patch) | |
tree | 6817e56203e5241d4a3231b231f4e2cbe567b51d /sway/commands | |
parent | 357a4401fa117416f3182a5f91d27b52b114f3ee (diff) | |
download | sway-d070244362f7d34bc15418154e52f8c968fbad41.tar.xz |
fix workspace splits
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/split.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/sway/commands/split.c b/sway/commands/split.c index fe4013e9..ca116aef 100644 --- a/sway/commands/split.c +++ b/sway/commands/split.c @@ -25,29 +25,8 @@ static struct cmd_results *_do_split(int argc, char **argv, int layout) { } struct sway_container *focused = config->handler_context.current_container; - - // TODO floating: dont split - - /* Case that focus is on an workspace with 0/1 children.change its layout */ - if (focused->type == C_WORKSPACE && focused->children->length <= 1) { - wlr_log(L_DEBUG, "changing workspace layout"); - container_set_layout(focused, layout); - } else if (focused->type != C_WORKSPACE && - focused->parent->children->length == 1) { - /* Case of no siblings. change parent layout */ - wlr_log(L_DEBUG, "changing container layout"); - container_set_layout(focused->parent, layout); - } else { - // regular case where new split container is build around focused - // container or in case of workspace, container inherits its children - wlr_log(L_DEBUG, - "Adding new container around current focused container"); - wlr_log(L_INFO, "FOCUSED SIZE: %.f %.f", - focused->width, focused->height); - - struct sway_container *parent = container_split(focused, layout); - arrange_windows(parent, -1, -1); - } + struct sway_container *parent = container_split(focused, layout); + arrange_windows(parent, -1, -1); // TODO borders: update borders |