diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-06-09 08:43:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-09 08:43:18 -0700 |
commit | d9fc381e0292519cccf2df6ea77a3356a2e621c7 (patch) | |
tree | 24e4ea6634a734ed303c7aaf611df682adbf746c /sway/tree/layout.c | |
parent | Merge pull request #2123 from emersion/fix-disabled-outputs (diff) | |
parent | Implement gaps (PR #2047) (diff) | |
download | sway-d9fc381e0292519cccf2df6ea77a3356a2e621c7.tar.gz sway-d9fc381e0292519cccf2df6ea77a3356a2e621c7.tar.zst sway-d9fc381e0292519cccf2df6ea77a3356a2e621c7.zip |
Merge pull request #2047 from natesymer/master
Implement Gaps
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 6d4cd088..a8aba618 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -871,6 +871,8 @@ struct sway_container *container_split(struct sway_container *child, | |||
871 | 871 | ||
872 | wlr_log(L_DEBUG, "creating container %p around %p", cont, child); | 872 | wlr_log(L_DEBUG, "creating container %p around %p", cont, child); |
873 | 873 | ||
874 | remove_gaps(child); | ||
875 | |||
874 | cont->prev_layout = L_NONE; | 876 | cont->prev_layout = L_NONE; |
875 | cont->width = child->width; | 877 | cont->width = child->width; |
876 | cont->height = child->height; | 878 | cont->height = child->height; |
@@ -879,6 +881,9 @@ struct sway_container *container_split(struct sway_container *child, | |||
879 | 881 | ||
880 | struct sway_seat *seat = input_manager_get_default_seat(input_manager); | 882 | struct sway_seat *seat = input_manager_get_default_seat(input_manager); |
881 | bool set_focus = (seat_get_focus(seat) == child); | 883 | bool set_focus = (seat_get_focus(seat) == child); |
884 | |||
885 | add_gaps(cont); | ||
886 | |||
882 | if (child->type == C_WORKSPACE) { | 887 | if (child->type == C_WORKSPACE) { |
883 | struct sway_container *workspace = child; | 888 | struct sway_container *workspace = child; |
884 | while (workspace->children->length) { | 889 | while (workspace->children->length) { |
@@ -906,7 +911,7 @@ struct sway_container *container_split(struct sway_container *child, | |||
906 | } | 911 | } |
907 | 912 | ||
908 | container_notify_subtree_changed(cont); | 913 | container_notify_subtree_changed(cont); |
909 | 914 | arrange_children_of(cont); | |
910 | return cont; | 915 | return cont; |
911 | } | 916 | } |
912 | 917 | ||