]> git.sur5r.net Git - i3/i3/commitdiff
Don’t create floating containers from whole workspaces when they are empty (Thanks...
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 3 Mar 2011 13:55:02 +0000 (14:55 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 3 Mar 2011 13:55:02 +0000 (14:55 +0100)
This fixes #327

src/floating.c

index 558f7f9aa8dae10cf322efbd447ec45d4040f4e8..349056a7880be6ad74b90321517dda8253585166 100644 (file)
@@ -30,6 +30,10 @@ void floating_enable(Con *con, bool automatic) {
      * are children of the workspace. */
     if (con->type == CT_WORKSPACE) {
         LOG("This is a workspace, creating new container around content\n");
+        if (con_num_children(con) == 0) {
+            LOG("Workspace is empty, aborting\n");
+            return;
+        }
         /* TODO: refactor this with src/con.c:con_set_layout */
         Con *new = con_new(NULL);
         new->parent = con;