aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-11 11:03:43 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-11 11:03:43 +1000
commit9e96cfd310c4e5dc60f07d772e60b139ff7dc448 (patch)
tree9961c8705208b2f127133f0533bd305a6f75015e /sway/tree/layout.c
parentRefactor everything that needs to arrange windows (diff)
parentMerge pull request #2124 from emersion/drag-icons (diff)
downloadsway-9e96cfd310c4e5dc60f07d772e60b139ff7dc448.tar.gz
sway-9e96cfd310c4e5dc60f07d772e60b139ff7dc448.tar.zst
sway-9e96cfd310c4e5dc60f07d772e60b139ff7dc448.zip
Merge remote-tracking branch 'upstream/master' into atomic
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 65b61495..3724361d 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -37,6 +37,7 @@ void layout_init(void) {
37 root_container.sway_root->output_layout = wlr_output_layout_create(); 37 root_container.sway_root->output_layout = wlr_output_layout_create();
38 wl_list_init(&root_container.sway_root->outputs); 38 wl_list_init(&root_container.sway_root->outputs);
39 wl_list_init(&root_container.sway_root->xwayland_unmanaged); 39 wl_list_init(&root_container.sway_root->xwayland_unmanaged);
40 wl_list_init(&root_container.sway_root->drag_icons);
40 wl_signal_init(&root_container.sway_root->events.new_container); 41 wl_signal_init(&root_container.sway_root->events.new_container);
41 42
42 root_container.sway_root->output_layout_change.notify = 43 root_container.sway_root->output_layout_change.notify =
@@ -839,6 +840,8 @@ struct sway_container *container_split(struct sway_container *child,
839 840
840 wlr_log(L_DEBUG, "creating container %p around %p", cont, child); 841 wlr_log(L_DEBUG, "creating container %p around %p", cont, child);
841 842
843 remove_gaps(child);
844
842 cont->prev_layout = L_NONE; 845 cont->prev_layout = L_NONE;
843 cont->width = child->width; 846 cont->width = child->width;
844 cont->height = child->height; 847 cont->height = child->height;
@@ -847,6 +850,9 @@ struct sway_container *container_split(struct sway_container *child,
847 850
848 struct sway_seat *seat = input_manager_get_default_seat(input_manager); 851 struct sway_seat *seat = input_manager_get_default_seat(input_manager);
849 bool set_focus = (seat_get_focus(seat) == child); 852 bool set_focus = (seat_get_focus(seat) == child);
853
854 add_gaps(cont);
855
850 if (child->type == C_WORKSPACE) { 856 if (child->type == C_WORKSPACE) {
851 struct sway_container *workspace = child; 857 struct sway_container *workspace = child;
852 while (workspace->children->length) { 858 while (workspace->children->length) {
@@ -874,7 +880,6 @@ struct sway_container *container_split(struct sway_container *child,
874 } 880 }
875 881
876 container_notify_subtree_changed(cont); 882 container_notify_subtree_changed(cont);
877
878 return cont; 883 return cont;
879} 884}
880 885