From 27093d146aaafd778c49498446e7054cd6056e33 Mon Sep 17 00:00:00 2001 From: Akos Horvath Date: Fri, 24 Feb 2023 18:06:25 +0100 Subject: [PATCH] avoid unfocused workspace closing if window in the workspace is closed --- src/con.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/con.c b/src/con.c index 5ecc2700..fe20dd02 100644 --- a/src/con.c +++ b/src/con.c @@ -2073,7 +2073,8 @@ static void con_on_remove_child(Con *con) { /* For workspaces, close them only if they're not visible anymore */ if (con->type == CT_WORKSPACE) { - if (TAILQ_EMPTY(&(con->focus_head)) && !workspace_is_visible(con)) { + if (TAILQ_EMPTY(&(con->focus_head)) && !workspace_is_visible(con) && + !config.empty_workspaces) { LOG("Closing old workspace (%p / %s), it is empty\n", con, con->name); yajl_gen gen = ipc_marshal_workspace_event("empty", con, NULL); tree_close_internal(con, DONT_KILL_WINDOW, false);