]> git.sur5r.net Git - i3/i3/commitdiff
Don't mess with the percentages in tree_flatten.
authorFernando Tarlá Cardoso Lemos <fernandotcl@gmail.com>
Thu, 27 Jan 2011 22:58:49 +0000 (20:58 -0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Jan 2011 23:12:26 +0000 (00:12 +0100)
src/tree.c

index 98f501622a230091b48a4636ec88e2ad78eb5392..aa79587ba64762940f24e58164f4835cad2c5c26 100644 (file)
@@ -438,7 +438,7 @@ void tree_move(char way, orientation_t orientation) {
     /* If we have no tiling cons (when moving a window out of a floating con to
      * an otherwise empty workspace for example), we just attach the window to
      * the workspace. */
-    bool fix_percent = 0;
+    bool fix_percent = false;
     if (TAILQ_EMPTY(&(parent->nodes_head))) {
         con_detach(focused);
         con_fix_percent(focused->parent);
@@ -473,7 +473,7 @@ void tree_move(char way, orientation_t orientation) {
             if (focused->parent != next->parent) {
                 con_fix_percent(focused->parent);
                 focused->parent = next->parent;
-                fix_percent = 1;
+                fix_percent = true;
             }
 
             TAILQ_INSERT_AFTER(&(next->parent->nodes_head), next, focused, nodes);
@@ -503,7 +503,7 @@ void tree_move(char way, orientation_t orientation) {
             if (focused->parent != next->parent) {
                 con_fix_percent(focused->parent);
                 focused->parent = next->parent;
-                fix_percent = 1;
+                fix_percent = true;
             }
 
             /* After going down in the tree, we insert the container *after*
@@ -597,6 +597,7 @@ void tree_flatten(Con *con) {
         TAILQ_INSERT_BEFORE(con, current, nodes);
         DLOG("attaching to focus list\n");
         TAILQ_INSERT_TAIL(&(parent->focus_head), current, focused);
+        current->percent = con->percent;
     }
     DLOG("re-attached all\n");