]> git.sur5r.net Git - i3/i3/blobdiff - src/floating.c
Merge pull request #3342 from orestisf1993/tree_close_internal
[i3/i3] / src / floating.c
index 080413347899b4d36007d990dae0196f86af729d..fac14a7a8a9bf0bec8ce4833902b9877df81c041 100644 (file)
@@ -246,7 +246,7 @@ void floating_enable(Con *con, bool automatic) {
         Con *parent = con->parent;
         /* clear the pointer before calling tree_close_internal in which the memory is freed */
         con->parent = NULL;
-        tree_close_internal(parent, DONT_KILL_WINDOW, false, false);
+        tree_close_internal(parent, DONT_KILL_WINDOW, false);
     }
 
     char *name;
@@ -366,13 +366,17 @@ void floating_disable(Con *con, bool automatic) {
     }
 
     Con *ws = con_get_workspace(con);
+    if (con_is_internal(ws)) {
+        LOG("Can't disable floating for container in internal workspace.\n");
+        return;
+    }
     Con *tiling_focused = con_descend_tiling_focused(ws);
 
     if (tiling_focused->type == CT_WORKSPACE) {
         Con *parent = con->parent;
         con_detach(con);
         con->parent = NULL;
-        tree_close_internal(parent, DONT_KILL_WINDOW, true, false);
+        tree_close_internal(parent, DONT_KILL_WINDOW, true);
         con_attach(con, tiling_focused, false);
         con->percent = 0.0;
         con_fix_percent(con->parent);