diff options
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/layout.c b/sway/layout.c index 192f09cf..4a9aa907 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -33,7 +33,7 @@ void add_child(swayc_t *parent, swayc_t *child) { | |||
33 | child->width, child->height, parent, parent->type, parent->width, parent->height); | 33 | child->width, child->height, parent, parent->type, parent->width, parent->height); |
34 | list_add(parent->children, child); | 34 | list_add(parent->children, child); |
35 | child->parent = parent; | 35 | child->parent = parent; |
36 | //set focus for this container | 36 | // set focus for this container |
37 | if (parent->children->length == 1) { | 37 | if (parent->children->length == 1) { |
38 | set_focused_container_for(parent, child); | 38 | set_focused_container_for(parent, child); |
39 | } | 39 | } |
@@ -97,7 +97,7 @@ swayc_t *remove_child(swayc_t *child) { | |||
97 | } | 97 | } |
98 | } | 98 | } |
99 | } | 99 | } |
100 | //Set focused to new container | 100 | // Set focused to new container |
101 | if (parent->focused == child) { | 101 | if (parent->focused == child) { |
102 | if (parent->children->length > 0) { | 102 | if (parent->children->length > 0) { |
103 | set_focused_container_for(parent, parent->children->items[i?i-1:0]); | 103 | set_focused_container_for(parent, parent->children->items[i?i-1:0]); |
@@ -191,7 +191,7 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
191 | switch (container->layout) { | 191 | switch (container->layout) { |
192 | case L_HORIZ: | 192 | case L_HORIZ: |
193 | default: | 193 | default: |
194 | //Calculate total width | 194 | // Calculate total width |
195 | for (i = 0; i < container->children->length; ++i) { | 195 | for (i = 0; i < container->children->length; ++i) { |
196 | int *old_width = &((swayc_t *)container->children->items[i])->width; | 196 | int *old_width = &((swayc_t *)container->children->items[i])->width; |
197 | if (*old_width <= 0) { | 197 | if (*old_width <= 0) { |
@@ -203,7 +203,7 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
203 | } | 203 | } |
204 | scale += *old_width; | 204 | scale += *old_width; |
205 | } | 205 | } |
206 | //Resize windows | 206 | // Resize windows |
207 | if (scale > 0.1) { | 207 | if (scale > 0.1) { |
208 | scale = width / scale; | 208 | scale = width / scale; |
209 | sway_log(L_DEBUG, "Arranging %p horizontally", container); | 209 | sway_log(L_DEBUG, "Arranging %p horizontally", container); |
@@ -218,7 +218,7 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
218 | } | 218 | } |
219 | break; | 219 | break; |
220 | case L_VERT: | 220 | case L_VERT: |
221 | //Calculate total height | 221 | // Calculate total height |
222 | for (i = 0; i < container->children->length; ++i) { | 222 | for (i = 0; i < container->children->length; ++i) { |
223 | int *old_height = &((swayc_t *)container->children->items[i])->height; | 223 | int *old_height = &((swayc_t *)container->children->items[i])->height; |
224 | if (*old_height <= 0) { | 224 | if (*old_height <= 0) { |
@@ -230,7 +230,7 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
230 | } | 230 | } |
231 | scale += *old_height; | 231 | scale += *old_height; |
232 | } | 232 | } |
233 | //Resize | 233 | // Resize |
234 | if (scale > 0.1) { | 234 | if (scale > 0.1) { |
235 | scale = height / scale; | 235 | scale = height / scale; |
236 | sway_log(L_DEBUG, "Arranging %p vertically", container); | 236 | sway_log(L_DEBUG, "Arranging %p vertically", container); |