From c1d574f84ecab0e6e90e4d73329cc914da01b5c9 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 12 Nov 2010 17:33:59 +0100 Subject: [PATCH] enumerate workspaces when initializing outputs --- src/tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tree.c b/src/tree.c index f695f944..f170386e 100644 --- a/src/tree.c +++ b/src/tree.c @@ -59,6 +59,7 @@ void tree_init() { croot->type = CT_ROOT; Con *ws; + int c = 1; /* add the outputs */ TAILQ_FOREACH(output, &outputs, outputs) { if (!output->active) @@ -72,7 +73,8 @@ void tree_init() { /* add a workspace to this output */ ws = con_new(oc); ws->type = CT_WORKSPACE; - ws->name = strdup("1"); + asprintf(&(ws->name), "%d", c); + c++; ws->fullscreen_mode = CF_OUTPUT; ws->orientation = HORIZ; } -- 2.39.5