From b484b9ab32170781a482a2dd5b2478a5ac50ca49 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 3 Mar 2011 14:55:02 +0100 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20create=20floating=20containers?= =?utf8?q?=20from=20whole=20workspaces=20when=20they=20are=20empty=20(Than?= =?utf8?q?ks=20mseed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes #327 --- src/floating.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/floating.c b/src/floating.c index 558f7f9a..349056a7 100644 --- a/src/floating.c +++ b/src/floating.c @@ -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; -- 2.39.5