]> git.sur5r.net Git - i3/i3/blobdiff - src/con.c
Fix the percentages when moving containers.
[i3/i3] / src / con.c
index 598033c752d31dd495300b9f733431b72af3cb68..5e3f9283c27e8b1afd56f2440db3c325af50d892 100644 (file)
--- a/src/con.c
+++ b/src/con.c
@@ -509,10 +509,14 @@ void con_move_to_workspace(Con *con, Con *workspace) {
     con_detach(con);
     con_attach(con, next, false);
 
-    /* 6: keep focus on the current workspace */
+    /* 6: fix the percentages */
+    con_fix_percent(parent);
+    con_fix_percent(next);
+
+    /* 7: keep focus on the current workspace */
     con_focus(focus_next);
 
-    /* 7: check if the parent container is empty now and close it */
+    /* 8: check if the parent container is empty now and close it */
     if (parent->type != CT_WORKSPACE &&
         TAILQ_EMPTY(&(parent->nodes_head))) {
         DLOG("Closing empty parent container\n");