aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-10-07 16:37:02 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-10-12 21:42:57 -0400
commit59babac69d35284a39865243a7e067604abeeaec (patch)
tree896ee887cc0f7ee5192aaebba19a0d99d638523b
parentMerge pull request #937 from alkino/fix_scale_factor (diff)
downloadsway-59babac69d35284a39865243a7e067604abeeaec.tar.gz
sway-59babac69d35284a39865243a7e067604abeeaec.tar.zst
sway-59babac69d35284a39865243a7e067604abeeaec.zip
Merge pull request #938 from alkino/fix_sibling
Fix creating of sibling floating/children
-rw-r--r--sway/layout.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 3629df24..4f2ea09a 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -99,11 +99,20 @@ void add_floating(swayc_t *ws, swayc_t *child) {
99 99
100swayc_t *add_sibling(swayc_t *fixed, swayc_t *active) { 100swayc_t *add_sibling(swayc_t *fixed, swayc_t *active) {
101 swayc_t *parent = fixed->parent; 101 swayc_t *parent = fixed->parent;
102 int i = index_child(fixed);
103 if (fixed->is_floating) { 102 if (fixed->is_floating) {
104 list_insert(parent->floating, i + 1, active); 103 if (active->is_floating) {
104 int i = index_child(fixed);
105 list_insert(parent->floating, i + 1, active);
106 } else {
107 list_add(parent->children, active);
108 }
105 } else { 109 } else {
106 list_insert(parent->children, i + 1, active); 110 if (active->is_floating) {
111 list_add(parent->floating, active);
112 } else {
113 int i = index_child(fixed);
114 list_insert(parent->children, i + 1, active);
115 }
107 } 116 }
108 active->parent = parent; 117 active->parent = parent;
109 // focus new child 118 // focus new child